The branch, frodo has been updated
       via  73ddeecf163c9aa6f47998209ee7f795f1996321 (commit)
       via  201749bdcca9db1095582fa80c9c8a999ba3f33c (commit)
       via  1060ed58b52efff47b0a4921091e1483fda0131b (commit)
      from  3f19c72d755c678e54035fe07c78285a02536db0 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=73ddeecf163c9aa6f47998209ee7f795f1996321

commit 73ddeecf163c9aa6f47998209ee7f795f1996321
Author: beenje <[email protected]>
Date:   Tue Nov 20 22:26:36 2012 +0100

    [plugin.video.bliptv] updated to version 0.7.0

diff --git a/plugin.video.bliptv/BlipTVScraper.py 
b/plugin.video.bliptv/BlipTVScraper.py
index 4937ddc..8057b00 100644
--- a/plugin.video.bliptv/BlipTVScraper.py
+++ b/plugin.video.bliptv/BlipTVScraper.py
@@ -80,7 +80,13 @@ class BlipTVScraper:
             self.common.log("found items " + repr(dom_pages), 4)
             for item in dom_pages:
                 thumbnail = self.extractAndResizeThumbnail(item)
-                title = self.common.parseDOM(item, "h1", attrs={"class": 
"ShowTitle"})[0]
+
+                title = self.common.parseDOM(item, "h1", attrs={"class": 
"ShowTitle"})
+                if not title:
+                    title = self.common.parseDOM(item, "div", attrs={"class": 
"ShowTitle"})[0]
+                else:
+                    title = title[0]
+
                 name = self.common.parseDOM(title, "a")[0]
                 link = self.common.parseDOM(title, "a", ret="href")[0]
                 tmp.append({"path": get("path"), "show": link, "scraper": 
"show", "Title": self.common.replaceHTMLCodes(name.strip()), "thumbnail": 
thumbnail})
@@ -215,7 +221,13 @@ class BlipTVScraper:
 
             for show in show_list:
                 thumbnail = self.extractAndResizeThumbnail(show)
-                title = self.common.parseDOM(show, "h1", attrs={"class": 
"ShowTitle"})[0]
+                print "show: " + repr(show)
+                title = self.common.parseDOM(show, "h1", attrs={"class": 
"ShowTitle"})
+                if not title:
+                    title = self.common.parseDOM(show, "div", attrs={"class": 
"ShowTitle"})[0]
+                else:
+                    title = title[0]
+
                 name = self.common.parseDOM(title, "a")[0]
                 link = self.common.parseDOM(title, "a", ret="href")[0]
 
diff --git a/plugin.video.bliptv/addon.xml b/plugin.video.bliptv/addon.xml
index d0a2fc8..af00b09 100644
--- a/plugin.video.bliptv/addon.xml
+++ b/plugin.video.bliptv/addon.xml
@@ -1,9 +1,9 @@
 <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
-<addon id='plugin.video.bliptv' version='0.6.0' name='BlipTV' 
provider-name='TheCollective'>
+<addon id='plugin.video.bliptv' version='0.7.0' name='BlipTV' 
provider-name='TheCollective'>
   <requires>
     <import addon='xbmc.python' version='2.0'/>
-    <import addon='script.common.plugin.cache' version='1.0.0'/>
-    <import addon='script.module.parsedom' version='1.0.0'/>
+    <import addon='script.common.plugin.cache' version='1.3.0'/>
+    <import addon='script.module.parsedom' version='1.3.0'/>
     <import addon='script.module.simple.downloader' version='0.9.3'/>
   </requires>
   <extension point='xbmc.python.pluginsource'
diff --git a/plugin.video.bliptv/default.py b/plugin.video.bliptv/default.py
index b72512d..1d72113 100644
--- a/plugin.video.bliptv/default.py
+++ b/plugin.video.bliptv/default.py
@@ -26,7 +26,7 @@ try: import xbmcvfs
 except: import xbmcvfsdummy as xbmcvfs
 
 # plugin constants
-version = "0.6.0"
+version = "0.7.0"
 plugin = "BlipTV-" + version
 author = "TheCollective"
 url = "www.xbmc.com"

http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=201749bdcca9db1095582fa80c9c8a999ba3f33c

commit 201749bdcca9db1095582fa80c9c8a999ba3f33c
Author: beenje <[email protected]>
Date:   Tue Nov 20 22:24:04 2012 +0100

    [plugin.video.vimeo] updated to version 2.4.0

diff --git a/plugin.video.vimeo/VimeoCore.py b/plugin.video.vimeo/VimeoCore.py
index ac291d0..89c284e 100755
--- a/plugin.video.vimeo/VimeoCore.py
+++ b/plugin.video.vimeo/VimeoCore.py
@@ -38,7 +38,6 @@ class VimeoCore(object):
 
     def setLike(self, params):
         self.common.log("")
-
         get = params.get
 
         if (get("action") == "add_favorite"):
@@ -52,7 +51,6 @@ class VimeoCore(object):
 
     def updateContact(self, params):
         self.common.log("")
-
         get = params.get
 
         if (get("action") == "add_contact"):
@@ -192,7 +190,9 @@ class VimeoCore(object):
         if (not result):
             self.common.log("result was empty")
             return (result, 303)
-        
+        else:
+            result = result.decode("utf-8","ignore")
+
         if get("folder") == "contact":
             result = self._get_contacts(result)
         elif get("folder") == "category":
@@ -363,7 +363,7 @@ class VimeoCore(object):
 
         next = self.checkIfMorePagesExist(value)
 
-        video_list = self.common.parseDOM(value, "video", ret=True)
+        video_list = self.common.parseDOM(value, u"video", ret=True)
         for entry in video_list:
             video = {}
             video['videoid'] = self.common.parseDOM(entry, "video",ret="id")[0]
diff --git a/plugin.video.vimeo/VimeoFeeds.py b/plugin.video.vimeo/VimeoFeeds.py
index 3778443..58a3c3f 100644
--- a/plugin.video.vimeo/VimeoFeeds.py
+++ b/plugin.video.vimeo/VimeoFeeds.py
@@ -145,4 +145,4 @@ class VimeoFeeds():
                 if (self.storage.getReversePlaylistOrder(params)):
                     ytobjects.reverse()
         
-        return ytobjects
\ No newline at end of file
+        return ytobjects
diff --git a/plugin.video.vimeo/VimeoLogin.py b/plugin.video.vimeo/VimeoLogin.py
index 5e5d994..4f58e2d 100644
--- a/plugin.video.vimeo/VimeoLogin.py
+++ b/plugin.video.vimeo/VimeoLogin.py
@@ -140,14 +140,16 @@ class VimeoLogin():
 
     def performHttpLogin(self, xsrft):
         self.common.log("")
-        request = {'email': self.settings.getSetting("user_email"),
+        request = {'action': 'login',
+                   'service': 'vimeo',
+                   'email': self.settings.getSetting("user_email"),
                    'password': self.settings.getSetting("user_password"),
                    'token': xsrft}
 
-        self.common.fetchPage({"link": "http://vimeo.com/log_in";, "post_data": 
request,
+        result = self.common.fetchPage({"link": "http://vimeo.com/log_in";, 
"post_data": request,
                                 "refering": "http://www.vimeo.com/log_in"})
 
-        result = self.common.fetchPage({"link": "http://vimeo.com/";, 
"refering": "http://vimeo.com/log_in"})
+        #result = self.common.fetchPage({"link": "http://vimeo.com/";, 
"refering": "http://vimeo.com/log_in"})
 
         self.common.log("Done")
         return result
diff --git a/plugin.video.vimeo/VimeoNavigation.py 
b/plugin.video.vimeo/VimeoNavigation.py
index f763cdd..1cdabb9 100644
--- a/plugin.video.vimeo/VimeoNavigation.py
+++ b/plugin.video.vimeo/VimeoNavigation.py
@@ -213,7 +213,7 @@ class VimeoNavigation():
             params["Title"] = video['Title']
             params["url"] = video['video_url']
             params["download_path"] = download_path
-            filename = "%s-[%s].mp4" % (''.join(c for c in 
video['Title'].decode("utf-8") if c not in self.utils.INVALID_CHARS), 
video["videoid"])
+            filename = u"%s-[%s].mp4" % (u''.join(c for c in video['Title'] if 
c not in self.utils.INVALID_CHARS), video["videoid"])
             if get("async"):
                 self.downloader.download(filename, params, async=False)
             else:
diff --git a/plugin.video.vimeo/VimeoUtils.py b/plugin.video.vimeo/VimeoUtils.py
index c1444ba..0acfadc 100644
--- a/plugin.video.vimeo/VimeoUtils.py
+++ b/plugin.video.vimeo/VimeoUtils.py
@@ -28,7 +28,7 @@ class VimeoUtils:
         self.plugin = sys.modules["__main__"].plugin
         self.dbg = sys.modules["__main__"].dbg
         self.PR_VIDEO_QUALITY = self.settings.getSetting("pr_video_quality") 
== "true"
-        self.INVALID_CHARS = "\\/:*?\"<>|"
+        self.INVALID_CHARS = u"\\/:*?\"<>|"
         self.THUMBNAIL_PATH = os.path.join(self.settings.getAddonInfo('path'), 
"thumbnails")
 
     # Shows a more user-friendly notification
diff --git a/plugin.video.vimeo/addon.xml b/plugin.video.vimeo/addon.xml
index 237fd75..b3430ca 100644
--- a/plugin.video.vimeo/addon.xml
+++ b/plugin.video.vimeo/addon.xml
@@ -1,9 +1,9 @@
 <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
-<addon id='plugin.video.vimeo' version='2.3.0' name='Vimeo' 
provider-name='TheCollective'>
+<addon id='plugin.video.vimeo' version='2.4.0' name='Vimeo' 
provider-name='TheCollective'>
   <requires>
     <import addon='xbmc.python' version='2.0'/>
-    <import addon='script.common.plugin.cache' version='1.0.0'/>
-    <import addon='script.module.parsedom' version='1.0.0'/>
+    <import addon='script.common.plugin.cache' version='1.3.0'/>
+    <import addon='script.module.parsedom' version='1.3.0'/>
     <import addon='script.module.simple.downloader' version='0.9.3'/>
   </requires>
   <extension point='xbmc.python.pluginsource' library='default.py'>
diff --git a/plugin.video.vimeo/default.py b/plugin.video.vimeo/default.py
index 1cb7f20..4ab5e0a 100644
--- a/plugin.video.vimeo/default.py
+++ b/plugin.video.vimeo/default.py
@@ -8,7 +8,7 @@ import urllib2
 import cookielib
 
 # plugin constants
-version = "2.3.0"
+version = "2.4.0"
 plugin = "Vimeo-" + version
 author = "TheCollective"
 url = "www.xbmc.com"
diff --git a/plugin.video.vimeo/resources/settings.xml 
b/plugin.video.vimeo/resources/settings.xml
index 819b113..040785c 100644
--- a/plugin.video.vimeo/resources/settings.xml
+++ b/plugin.video.vimeo/resources/settings.xml
@@ -4,9 +4,8 @@
   <category label="30247">
     <setting id="user_email" type="text" label="30200" default="" />
     <setting id="user_password" type="text" option="hidden" label="30201" 
enable="!eq(-1,)" default="" />
-    <setting id="accept" type="enum" option="hidden" enable="!eq(-1,0)" 
lvalues="30224|30225" default="0" />
     <setting type="sep" /> 
-    <setting id="hd_videos" type="enum" label="30208" 
lvalues="30215|30217|30216" default="2" />
+    <setting id="hd_videos" type="enum" label="30208" 
lvalues="30215|30217|30216" default="1" />
     <setting id="downloadPath" type="folder" label="30207" default="" />
     <setting type="sep" />
     <setting id="perpage" type="enum" label="30210" 
values="10|15|20|25|30|40|50" default="6" />

http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=1060ed58b52efff47b0a4921091e1483fda0131b

commit 1060ed58b52efff47b0a4921091e1483fda0131b
Author: beenje <[email protected]>
Date:   Tue Nov 20 22:09:37 2012 +0100

    [plugin.video.youtube] updated to version 3.3.0

diff --git a/plugin.video.youtube/YouTubeCore.py 
b/plugin.video.youtube/YouTubeCore.py
index ab92a52..22e0c37 100644
--- a/plugin.video.youtube/YouTubeCore.py
+++ b/plugin.video.youtube/YouTubeCore.py
@@ -466,9 +466,6 @@ class YouTubeCore():
             con = urllib2.urlopen(request)
 
             inputdata = con.read()
-            #data_type = chardet.detect(inputdata)
-            #inputdata = inputdata.decode(data_type["encoding"])
-            #self.common.log("AAAAAAAAAAAAAAAAAA: " + repr(type(inputdata)) + 
" - " + repr(data_type))
             ret_obj["content"] = inputdata.decode("utf-8")
             ret_obj["location"] = link
 
@@ -643,37 +640,42 @@ class YouTubeCore():
 
         return False
 
-    def _getAuth(self):
+    def performNewLogin(self):
+        self.common.log("")
+        if isinstance(self.login, str):
+            self.login = sys.modules["__main__"].login
+
+        (result, status) = self.login.login()
+
+        if status == 200:
+            self.common.log("returning new auth")
+            return self.settings.getSetting("oauth2_access_token")
+
+        self.common.log("failed because login failed")
+        return False
+
+    def refreshTokenIfNessecary(self):
         now = time.time()
+
         if self.settings.getSetting("oauth2_expires_at"):
             expire_at = float(self.settings.getSetting("oauth2_expires_at"))
         else:
             expire_at = now
 
-        self.common.log("Oauth expires in %s seconds"  % int(expire_at - now))
-
         if expire_at <= now:
+            self.common.log("Oauth expired refreshing")
             self._oRefreshToken()
 
-        auth = self.settings.getSetting("oauth2_access_token")
-        self.common.log("oauth2_access_token: " + repr(auth), 5)
+    def _getAuth(self):
+        self.common.log("")
+
+        self.refreshTokenIfNessecary()
 
+        auth = self.settings.getSetting("oauth2_access_token")
         if (auth):
-            self.common.log("returning stored auth")
             return auth
-        else:
-            if isinstance(self.login, str):
-                self.login = sys.modules["__main__"].login
-
-            (result, status) = self.login.login()
 
-            if status == 200:
-                self.common.log("returning new auth")
-                return self.settings.getSetting("oauth2_access_token")
-
-        self.common.log("failed because login failed")
-
-        return False
+        return self.performNewLogin()
 
     def getVideoId(self, node):
         videoid = "false"
@@ -706,7 +708,7 @@ class YouTubeCore():
         result = False
 
         for state in self.common.parseDOM(node, "yt:state", ret=True):
-        # Ignore unplayable items.
+            # Ignore unplayable items.
             if (state == 'deleted' or state == 'rejected'):
                 result = True
 
@@ -717,9 +719,7 @@ class YouTubeCore():
             if not reason:
                 return result
 
-            if reason[0] == "private":
-                result = True
-            elif reason[0] == 'requesterRegion':
+            if reason[0] in [ "private", 'requesterRegion']:
                 result = True
             elif reason[0] != 'limitedSyndication':
                 self.common.log("removing video, reason: %s value: %s" % 
(reason[0], value[0]))
@@ -744,7 +744,7 @@ class YouTubeCore():
         if show_next:
             self.utils.addNextFolder(ytobjects, params)
 
-    def setYTCache(self, pre_id, ytobjects):
+    def updateVideoIdStatusInCache(self, pre_id, ytobjects):
         self.common.log(pre_id)
         save_data = {}
         for item in ytobjects:
@@ -753,7 +753,7 @@ class YouTubeCore():
 
         self.cache.setMulti(pre_id, save_data)
 
-    def getYTCache(self, pre_id, ytobjects):
+    def getVideoIdStatusFromCache(self, pre_id, ytobjects):
         self.common.log(pre_id)
         load_data = []
         for item in ytobjects:
@@ -766,7 +766,7 @@ class YouTubeCore():
         i = 0
         for item in ytobjects:
             if "videoid" in item:
-                if res[i]:
+                if i < len(res):
                     item["Overlay"] = res[i]
                 i += 1 # This can NOT be enumerated because there might be 
missing videoids
         return ytobjects
@@ -886,8 +886,8 @@ class YouTubeCore():
 
         self.addNextPageLinkIfNecessary(params, xml, ytobjects)
 
-        self.setYTCache("videoidcache", ytobjects)
-        self.getYTCache("vidstatus-", ytobjects)
+        self.updateVideoIdStatusInCache("videoidcache", ytobjects)
+        self.getVideoIdStatusFromCache("vidstatus-", ytobjects)
 
         self.common.log("Done: " + str(len(ytobjects)),3)
         return ytobjects
diff --git a/plugin.video.youtube/YouTubeFeeds.py 
b/plugin.video.youtube/YouTubeFeeds.py
index 292ad7f..52e89eb 100644
--- a/plugin.video.youtube/YouTubeFeeds.py
+++ b/plugin.video.youtube/YouTubeFeeds.py
@@ -153,8 +153,7 @@ class YouTubeFeeds():
         if result["status"] != 200:
             return (result["content"], result["status"])
 
-        if not get("folder"):
-            videos = self.core.getVideoInfo(result["content"], params)
+        videos = self.core.getVideoInfo(result["content"], params)
 
         if len(videos) == 0:
             return (videos, 303)
diff --git a/plugin.video.youtube/YouTubeNavigation.py 
b/plugin.video.youtube/YouTubeNavigation.py
index 213646a..ddf035d 100644
--- a/plugin.video.youtube/YouTubeNavigation.py
+++ b/plugin.video.youtube/YouTubeNavigation.py
@@ -62,11 +62,12 @@ class YouTubeNavigation():
             {'Title':self.language(30049)  
,'path':"/root/explore/feeds/trending"          , 'thumbnail':"featured"        
  , 'login':"false" , 'feed':"feed_trending" },
             {'Title':self.language(30015)  
,'path':"/root/explore/feeds/favorites"         , 'thumbnail':"top"             
  , 'login':"false" , 'feed':"feed_favorites" },
             {'Title':self.language(30016)  ,'path':"/root/explore/feeds/rated" 
            , 'thumbnail':"top"               , 'login':"false" , 
'feed':"feed_rated" },
-            {'Title':self.language(30043)  ,'path':"/root/explore/movies"      
            , 'thumbnail':"movies"            , 'login':"false" , 
'scraper':'movies', 'folder':'true'},
+            #{'Title':self.language(30043)  ,'path':"/root/explore/movies"     
             , 'thumbnail':"movies"            , 'login':"false" , 
'scraper':'movies', 'folder':'true'},
             {'Title':self.language(30052)  ,'path':"/root/explore/music"       
            , 'thumbnail':"music"             , 'login':"false" , 
'store':"disco_searches", "folder":"true" },
             {'Title':self.language(30040)  ,'path':"/root/explore/music/new"   
            , 'thumbnail':"search"            , 'login':"false" , 
'scraper':"search_disco"},
             {'Title':self.language(30055)  
,'path':"/root/explore/music/top100"            , 'thumbnail':"music"           
  , 'login':"false" , 'scraper':'music_top100'},
-            {'Title':self.language(30042)  ,'path':"/root/explore/shows"       
            , 'thumbnail':"shows"             , 'login':"false" , 
'scraper':'shows', 'folder':'true'},
+            #{'Title':self.language(30042)  ,'path':"/root/explore/shows"      
             , 'thumbnail':"shows"             , 'login':"false" , 
'scraper':'shows', 'folder':'true'},
+            {'Title':self.language(30032)  ,'path':"/root/explore/trailers"    
            , 'thumbnail':"trailers"          , 'login':"false" , 
'scraper':'trailers'},
             {'Title':self.language(30051)  ,'path':"/root/explore/live"        
            , 'thumbnail':"live"              , 'login':"false" , 
'feed':"feed_live" },
             {'Title':self.language(30019)  ,'path':"/root/recommended"         
            , 'thumbnail':"recommended"       , 'login':"true"  , 
'user_feed':"recommended" },
             {'Title':self.language(30008)  ,'path':"/root/watch_later"         
            , 'thumbnail':"watch_later"       , 'login':"true"  , 
'user_feed':"watch_later" },
@@ -425,9 +426,7 @@ class YouTubeNavigation():
         item = item_params.get
 
         icon = item("icon", "default")
-        if (get("scraper", "").find("trailers") > -1):
-            icon = "trailers"
-        elif(get("scraper", "").find("movies") > -1):
+        if (get("scraper", "").find("movies") > -1):
             icon = "movies"
         elif(get("scraper", "").find("music") > -1):
             icon = "music"
diff --git a/plugin.video.youtube/YouTubePlayer.py 
b/plugin.video.youtube/YouTubePlayer.py
index a365faa..e02a40c 100755
--- a/plugin.video.youtube/YouTubePlayer.py
+++ b/plugin.video.youtube/YouTubePlayer.py
@@ -62,6 +62,7 @@ class YouTubePlayer():
         self.xbmcgui = sys.modules["__main__"].xbmcgui
         self.xbmcplugin = sys.modules["__main__"].xbmcplugin
 
+        self.pluginsettings = sys.modules["__main__"].pluginsettings
         self.storage = sys.modules["__main__"].storage
         self.settings = sys.modules["__main__"].settings
         self.language = sys.modules["__main__"].language
@@ -131,6 +132,8 @@ class YouTubePlayer():
 
     def selectVideoQuality(self, params, links):
         get = params.get
+
+        print "links: " + repr(type(links).__name__)
         link = links.get
         video_url = ""
 
@@ -310,22 +313,23 @@ class YouTubePlayer():
 
             for k, v in cgi.parse_qs(data).items():
                 flashvars[k] = v[0]
-
+        self.common.log(u"flashvars: " + repr(flashvars), 2)
         return flashvars
 
     def scrapeWebPageForVideoLinks(self, result, video):
+        self.common.log(u"")
         links = {}
 
         flashvars = self.extractFlashVars(result[u"content"])
         if not flashvars.has_key(u"url_encoded_fmt_stream_map"):
-            return (links, video)
+            return links
 
         if flashvars.has_key(u"ttsurl"):
             video[u"ttsurl"] = flashvars[u"ttsurl"]
 
         for url_desc in flashvars[u"url_encoded_fmt_stream_map"].split(u","):
             url_desc_map = cgi.parse_qs(url_desc)
-
+            self.common.log(u"url_map: " + repr(url_desc_map), 2)
             if not (url_desc_map.has_key(u"url") or 
url_desc_map.has_key(u"stream")):
                 continue
 
@@ -333,7 +337,12 @@ class YouTubePlayer():
             url = u""
             if url_desc_map.has_key(u"url"):
                 url = urllib.unquote(url_desc_map[u"url"][0])
-            elif url_desc_map.has_key(u"stream"):
+            elif url_desc_map.has_key(u"conn") and 
url_desc_map.has_key(u"stream"):
+                url = urllib.unquote(url_desc_map[u"conn"][0])
+                if url.rfind("/") < len(url) -1:
+                    url = url + "/"
+                url = url + urllib.unquote(url_desc_map[u"stream"][0])
+            elif url_desc_map.has_key(u"stream") and not 
url_desc_map.has_key(u"conn"):
                 url = urllib.unquote(url_desc_map[u"stream"][0])
 
             if url_desc_map.has_key(u"sig"):
@@ -343,12 +352,24 @@ class YouTubePlayer():
 
         return links
 
+    def getVideoPageFromYoutube(self, get):
+        login = "false"
+
+        if self.pluginsettings.userHasProvidedValidCredentials():
+            login = "true"
+
+        page = self.core._fetchPage({u"link": self.urls[u"video_stream"] % 
get(u"videoid"), "login": login})
+
+        if not page:
+            page = {u"status":303}
+
+        return page
+
     def extractVideoLinksFromYoutube(self, video, params):
         self.common.log(u"trying website: " + repr(params))
-
         get = params.get
 
-        result = self.core._fetchPage({u"link": self.urls[u"video_stream"] % 
get(u"videoid")})
+        result = self.getVideoPageFromYoutube(get)
 
         if result[u"status"] != 200:
             self.common.log(u"Couldn't get video page from YouTube")
diff --git a/plugin.video.youtube/YouTubeScraper.py 
b/plugin.video.youtube/YouTubeScraper.py
index a5d543c..7547373 100644
--- a/plugin.video.youtube/YouTubeScraper.py
+++ b/plugin.video.youtube/YouTubeScraper.py
@@ -22,23 +22,15 @@ import urllib
 
 class YouTubeScraper():
     urls = {}
-    urls['current_trailers'] = 
"http://www.youtube.com/trailers?s=trit&p=%s&hl=en";
     urls['disco_main'] = "http://www.youtube.com/disco";
     urls['disco_mix_list'] = 
"http://www.youtube.com/watch?v=%s&feature=disco&playnext=1&list=%s";
     urls['disco_search'] = 
"http://www.youtube.com/disco?action_search=1&query=%s";
-    urls['game_trailers'] = "http://www.youtube.com/trailers?s=gtcs";
     urls['main'] = "http://www.youtube.com";
     urls['movies'] = "http://www.youtube.com/ytmovies";
-    urls['popular_game_trailers'] = 
"http://www.youtube.com/trailers?s=gtp&p=%s&hl=en";
-    urls['popular_trailers'] = 
"http://www.youtube.com/trailers?s=trp&p=%s&hl=en";
     urls['show_single_list'] = 
"http://www.youtube.com/channel_ajax?action_more_single_playlist_videos=1&page=%s&list_id=%s";
     urls['show_list'] = "http://www.youtube.com/show";
     urls['shows'] = "http://www.youtube.com/shows";
-    urls['trailers'] = "http://www.youtube.com/trailers?s=tr";
-    urls['latest_trailers'] = "http://www.youtube.com/trailers?s=tr";
-    urls['latest_game_trailers'] = "http://www.youtube.com/trailers?s=gtcs";
-    urls['upcoming_game_trailers'] = 
"http://www.youtube.com/trailers?s=gtcs&p=%s&hl=en";
-    urls['upcoming_trailers'] = 
"http://www.youtube.com/trailers?s=tros&p=%s&hl=en";
+    urls['trailers'] = "http://www.youtube.com/trailers";
     urls['watched_history'] = "http://www.youtube.com/my_history";
     urls['liked_videos'] = "http://www.youtube.com/my_liked_videos";
     urls['music'] = "http://www.youtube.com/music";
@@ -58,69 +50,6 @@ class YouTubeScraper():
         self.feeds = sys.modules["__main__"].feeds
         self.storage = sys.modules["__main__"].storage
 
-#=================================== Trailers 
============================================
-    def scrapeTrailersListFormat(self, params={}):
-        self.common.log("")
-        url = self.createUrl(params)
-        result = self.core._fetchPage({"link": url})
-
-        trailers = self.common.parseDOM(result["content"], "div", attrs={"id": 
"recent-trailers-container"})
-
-        items = []
-        if (len(trailers) > 0):
-            ahref = self.common.parseDOM(trailers, "a", attrs={"class": " 
yt-uix-hovercard-target", "id": ".*?"}, ret="href")
-
-            thumbs = self.common.parseDOM(trailers, "span", attrs={"class": 
"video-thumb .*?"})
-
-            athumbs = self.common.parseDOM(thumbs, "img", ret="data-thumb")
-
-            videos = self.utils.extractVID(ahref)
-
-            for index, videoid in enumerate(videos):
-                items.append((videoid, athumbs[index]))
-
-        self.common.log("Done")
-        return (items, result["status"])
-
-    def scrapeTrailersGridFormat(self, params={}):
-        self.common.log("")
-        items = []
-        next = True
-        page = 0
-
-        while next:
-            params["page"] = str(page)
-            url = self.createUrl(params)
-            result = self.core._fetchPage({"link": url})
-
-            page += 1
-
-            next = False
-            if result["status"] == 200:
-                pagination = self.common.parseDOM(result["content"], "div", 
{"class": "yt-uix-pager"})
-                if (len(pagination) > 0):
-                    tmp = str(pagination)
-                    if (tmp.find("Next") > 0):
-                        next = True
-
-                trailers = self.common.parseDOM(result["content"], "div", 
attrs={"id": "popular-column"})
-
-                if len(trailers) > 0:
-                    ahref = self.common.parseDOM(trailers, "a", 
attrs={"class": 'ux-thumb-wrap.*?'}, ret="href")
-
-                    thumbs = self.common.parseDOM(trailers, "span", 
attrs={"class": "video-thumb .*?"})
-
-                    athumbs = self.common.parseDOM(thumbs, "img", 
ret="data-thumb")
-
-                    videos = self.utils.extractVID(ahref)
-
-                    for index, videoid in enumerate(videos):
-                        items.append((videoid, athumbs[index]))
-
-        del params["page"]
-        self.common.log("Done")
-        return (items, result["status"])
-
 #=================================== User Scraper 
============================================
 
     def scrapeUserVideoFeed(self, params):
@@ -130,11 +59,11 @@ class YouTubeScraper():
 
         result = self.core._fetchPage({"link": url, "login": "true"})
         liked = self.common.parseDOM(result["content"], "div", {"id": 
"vm-video-list-container"})
-        print "liked videos " + repr(liked)
+
         items = []
 
         if (len(liked) > 0):
-            vidlist = self.common.parseDOM(liked, "li", {"class": 
"vm-video-item "}, ret="id")
+            vidlist = self.common.parseDOM(liked, "li", {"class": 
"vm-video-item.*?"}, ret="id")
             for videoid in vidlist:
                 videoid = videoid[videoid.rfind("video-") + 6:]
                 items.append(videoid)
@@ -142,8 +71,29 @@ class YouTubeScraper():
         self.common.log("Done")
         if len(liked) > 0:
             return (items, result["status"])
-        else:
-            return ([], 303)  # Something else
+
+        return ([], 303)
+
+#================================= trailers 
===========================================
+
+    def scraperTop100Trailers(self, params):
+        url = self.createUrl(params)
+
+        result = self.core._fetchPage({"link":url})
+
+        trailers_link = self.common.parseDOM(result["content"], "a", 
attrs={"class":"yt-playall-link.*?"}, ret="href")[0]
+
+        if trailers_link.find("list=") > 0:
+            trailers_link = trailers_link[trailers_link.find("list=") + 
len("list="):]
+            trailers_link = trailers_link[:trailers_link.find("&")]
+            trailers_link = trailers_link[2:]
+            del params["scraper"]
+            params["feed"] = "playlist"
+            params["playlist"] = trailers_link
+
+            return self.feeds.listPlaylist(params)
+
+        return ([], 303)
 
 #=================================== Shows 
============================================
 
@@ -465,12 +415,8 @@ class YouTubeScraper():
                 params["batch"] = "thumbnails"
                 function = self.scrapeMoviesGrid
 
-        if (get("scraper") in ['current_trailers', 'game_trailers', 
'popular_game_trailers', 'popular_trailers', 'trailers', 
'upcoming_game_trailers', 'upcoming_trailers']):
-            params["batch"] = "thumbnails"
-            function = self.scrapeTrailersGridFormat
-        if (get("scraper") in ["latest_game_trailers", "latest_trailers"]):
-            params["batch"] = "thumbnails"
-            function = self.scrapeTrailersListFormat
+        if get("scraper") == "trailers":
+            function = self.scraperTop100Trailers
 
         if function:
             params["new_results_function"] = function
@@ -534,6 +480,9 @@ class YouTubeScraper():
         if get("scraper") == "music_top100":
             url = self.urls["music"]
 
+        if get("scraper") == "trailers":
+            url = self.urls["trailers"]
+
         if (get("scraper") in "search_disco"):
             url = self.urls["disco_search"] % urllib.quote_plus(get("search"))
             if get("mix_list_id") and get("disco_videoid"):
@@ -657,6 +606,10 @@ class YouTubeScraper():
         return (result, status)
 
     def scrape(self, params={}):
+        get = params.get
+        if get("scraper") == "trailers":
+            return self.scraperTop100Trailers(params)
+
         self.getNewResultsFunction(params)
 
         result = self.paginator(params)
diff --git a/plugin.video.youtube/YouTubeStorage.py 
b/plugin.video.youtube/YouTubeStorage.py
index e8ee503..13742d2 100644
--- a/plugin.video.youtube/YouTubeStorage.py
+++ b/plugin.video.youtube/YouTubeStorage.py
@@ -492,3 +492,31 @@ class YouTubeStorage():
                 results = []
 
         return results
+
+    def updateVideoIdStatusInCache(self, pre_id, ytobjects):
+        self.common.log(pre_id)
+        save_data = {}
+        for item in ytobjects:
+            if "videoid" in item:
+                save_data[item["videoid"]] = repr(item)
+
+        self.cache.setMulti(pre_id, save_data)
+
+    def getVideoIdStatusFromCache(self, pre_id, ytobjects):
+        self.common.log(pre_id)
+        load_data = []
+        for item in ytobjects:
+            if "videoid" in item:
+                load_data.append(item["videoid"])
+
+        res = self.cache.getMulti(pre_id, load_data)
+        if len(res) != len(load_data):
+            self.common.log("Length mismatch:" + repr(res) + " - " + 
repr(load_data))
+
+        i = 0
+        for item in ytobjects:
+            if "videoid" in item:
+                if i < len(res):
+                    item["Overlay"] = res[i]
+                i += 1 # This can NOT be enumerated because there might be 
missing videoids
+        return ytobjects
diff --git a/plugin.video.youtube/addon.xml b/plugin.video.youtube/addon.xml
index 238e42e..92e8f17 100644
--- a/plugin.video.youtube/addon.xml
+++ b/plugin.video.youtube/addon.xml
@@ -1,10 +1,10 @@
 <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
-<addon id='plugin.video.youtube' version='3.2.0' name='YouTube' 
provider-name='TheCollective'>
+<addon id='plugin.video.youtube' version='3.3.0' name='YouTube' 
provider-name='TheCollective'>
   <requires>
     <import addon='xbmc.python' version='2.0'/>
     <import addon='script.module.simplejson' version='2.0.10'/>
-    <import addon='script.common.plugin.cache' version='1.0.0'/>
-    <import addon='script.module.parsedom' version='1.2.0'/>
+    <import addon='script.common.plugin.cache' version='1.3.0'/>
+    <import addon='script.module.parsedom' version='1.3.0'/>
     <import addon='script.module.simple.downloader' version='0.9.3'/>
   </requires>
   <extension point='xbmc.python.pluginsource' library='default.py'>
diff --git a/plugin.video.youtube/changelog.txt 
b/plugin.video.youtube/changelog.txt
index 3474ccf..661c3dd 100644
--- a/plugin.video.youtube/changelog.txt
+++ b/plugin.video.youtube/changelog.txt
@@ -13,6 +13,15 @@
 - [XBMC] Has Excessive Memory use after running the plugin for prolonged 
periods of time
 - [RTMPDUMP] Doesn't support handshake type 10 which is required by youtube.
 
+[B]Version 3.3.0[/B]
+- Fixed playback of over 18 videos, should now work if the user is logged in.
+- Fixed bug where playback or video listing would fail due to bug in cache
+- Fixed problem in core that would sometimes break playback
+- Fixed problem in player that would cause hard crash when playback stream 
isn't available
+- Disabled movie section since it seems completely broken on the home page
+- Disabled show section since it seems completely broken on the home page
+- Added new scraper for VISO trailers which seems to have replace the old 
trailers page.
+
 [B]Version 3.2.0[/B]
 - Fixed playback
 - Minor refactoring to increase testability
diff --git a/plugin.video.youtube/default.py b/plugin.video.youtube/default.py
index 3b33d3e..bf80331 100644
--- a/plugin.video.youtube/default.py
+++ b/plugin.video.youtube/default.py
@@ -29,7 +29,7 @@ except ImportError:
     import xbmcvfsdummy as xbmcvfs
 
 # plugin constants
-version = "3.2.0"
+version = "3.3.0"
 plugin = "YouTube-" + version
 author = "TheCollective"
 url = "www.xbmc.com"
diff --git a/plugin.video.youtube/resources/language/English/strings.xml 
b/plugin.video.youtube/resources/language/English/strings.xml
index e314e46..dba882c 100644
--- a/plugin.video.youtube/resources/language/English/strings.xml
+++ b/plugin.video.youtube/resources/language/English/strings.xml
@@ -32,7 +32,7 @@
     <string id="30029">Contact</string>
     <string id="30030">Refreshing folder..</string>
     <string id="30031">Login success</string>
-    <string id="30032">YouTube Trailers</string>
+    <string id="30032">YouTube Top 100 Trailers</string>
     <string id="30033">Popular</string>
     <string id="30034">In Theaters</string>
     <string id="30035">Latest</string>

-----------------------------------------------------------------------

Summary of changes:
 plugin.video.bliptv/BlipTVScraper.py               |   16 +++-
 plugin.video.bliptv/addon.xml                      |    6 +-
 plugin.video.bliptv/default.py                     |    2 +-
 plugin.video.vimeo/VimeoCore.py                    |    8 +-
 plugin.video.vimeo/VimeoFeeds.py                   |    2 +-
 plugin.video.vimeo/VimeoLogin.py                   |    8 +-
 plugin.video.vimeo/VimeoNavigation.py              |    2 +-
 plugin.video.vimeo/VimeoUtils.py                   |    2 +-
 plugin.video.vimeo/addon.xml                       |    6 +-
 plugin.video.vimeo/default.py                      |    2 +-
 plugin.video.vimeo/resources/settings.xml          |    3 +-
 plugin.video.youtube/YouTubeCore.py                |   60 +++++-----
 plugin.video.youtube/YouTubeFeeds.py               |    3 +-
 plugin.video.youtube/YouTubeNavigation.py          |    9 +-
 plugin.video.youtube/YouTubePlayer.py              |   33 +++++-
 plugin.video.youtube/YouTubeScraper.py             |  117 ++++++--------------
 plugin.video.youtube/YouTubeStorage.py             |   28 +++++
 plugin.video.youtube/addon.xml                     |    6 +-
 plugin.video.youtube/changelog.txt                 |    9 ++
 plugin.video.youtube/default.py                    |    2 +-
 .../resources/language/English/strings.xml         |    2 +-
 21 files changed, 174 insertions(+), 152 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to