The branch, eden has been updated
       via  ced9e766a3604ced22354ed8209935879a6f691d (commit)
       via  5b2e8e2320c88021be1a68bf244cb1722bcc08ab (commit)
      from  c5e8d226deb4a33b3615667ea7b5dd5c3f554626 (commit)

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

commit ced9e766a3604ced22354ed8209935879a6f691d
Author: beenje <[email protected]>
Date:   Tue May 28 22:24:17 2013 +0200

    [plugin.video.tmz] updated to version 2.0.12

diff --git a/plugin.video.tmz/addon.xml b/plugin.video.tmz/addon.xml
index d45e194..a83566b 100644
--- a/plugin.video.tmz/addon.xml
+++ b/plugin.video.tmz/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.video.tmz"
        name="TMZ"
-       version="2.0.11"
+       version="2.0.12"
        provider-name="stacked">
   <requires>
        <import addon="xbmc.python" version="2.0"/>
@@ -17,5 +17,9 @@
     <description lang="en">Celebrity Gossip and Entertainment News, Covering 
Celebrity News and Hollywood Rumors. Get All The Latest Gossip at TMZ - Thirty 
Mile Zone.</description>
     <platform>all</platform>
        <language>en</language>
+       <website>https://code.google.com/p/plugin</website>
+       <source>https://github.com/stacked/plugin.video.tmz</source>
+       <forum>http://forum.xbmc.org/showthread.php?tid=55972</forum>
+       <email>[email protected]</email>
   </extension>
 </addon>
diff --git a/plugin.video.tmz/addonfunc.py b/plugin.video.tmz/addonfunc.py
index efb539a..261ce24 100644
--- a/plugin.video.tmz/addonfunc.py
+++ b/plugin.video.tmz/addonfunc.py
@@ -2,20 +2,28 @@
 Addon Functions
 __author__ = 'stacked <[email protected]>'
 __url__ = 'http://code.google.com/p/plugin/'
-__date__ = '01-12-2013'
-__version__ = '0.0.6'
+__date__ = '05-26-2013'
+__version__ = '0.0.10'
 '''
 
 import xbmc, xbmcgui, xbmcaddon, xbmcplugin, urllib, urllib2, sys, time, 
datetime, buggalo
 settings = sys.modules["__main__"].settings
 plugin = sys.modules["__main__"].plugin
-useragent = 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20100101 
Firefox/17.0'
+useragent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 
Firefox/21.0'
 
-def addListItem(label, image, url, isFolder, infoLabels = False, fanart = 
False, duration = False):
+def addListItem(label, image, url, isFolder, totalItems, infoLabels = False, 
fanart = False, duration = False):
        listitem = xbmcgui.ListItem(label = label, iconImage = image, 
thumbnailImage = image)
+       if url['mode']:
+               u = sys.argv[0] + '?' + urllib.urlencode(url)
+       else:
+               u = url['url']
        if not isFolder:
                if settings.getSetting('download') == '' or 
settings.getSetting('download') == 'false':
-                       listitem.setProperty('IsPlayable', 'true')
+                       if label != '* ' + settings.getLocalizedString( 30030 ) 
+ ' *':
+                               listitem.setProperty('IsPlayable', 'true')
+                               if settings.getSetting('playall') == 'true':
+                                       playlist = 
xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
+                                       playlist.add(url = u, listitem = 
listitem)
        if fanart:
                listitem.setProperty('fanart_image', fanart)
        if infoLabels:
@@ -25,11 +33,7 @@ def addListItem(label, image, url, isFolder, infoLabels = 
False, fanart = False,
                                listitem.addStreamInfo('video', { 'duration': 
int(duration) })
                        else:
                                listitem.setInfo(type = 'video', infoLabels = { 
'duration': str(datetime.timedelta(milliseconds=int(duration)*1000)) } )
-       if url['mode']:
-               u = sys.argv[0] + '?' + urllib.urlencode(url)
-       else:
-               u = url['url']
-       ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, 
listitem = listitem, isFolder = isFolder)
+       ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, 
listitem = listitem, isFolder = isFolder, totalItems = int(totalItems))
        return ok
 
 def playListItem(label, image, path, infoLabels, PlayPath = False):
@@ -48,7 +52,7 @@ def getUrl(url, gzip = False):
                        data = getPage(url, gzip)
                        if data['content'] != None and data['error'] == None:
                                return data['content']
-                       if data['error'].find('404:') != -1:
+                       if data['error'].find('404:') != -1 or 
data['error'].find('400:') != -1:
                                break
                except Exception, e:
                        data['error'] = str(e)
diff --git a/plugin.video.tmz/changelog.txt b/plugin.video.tmz/changelog.txt
index 7b64180..f0c4be3 100644
--- a/plugin.video.tmz/changelog.txt
+++ b/plugin.video.tmz/changelog.txt
@@ -1,4 +1,12 @@
-[B]Version 2.0.11[/B]
+[B]Version 2.0.12[/B]
+
+- Fixed 'ValueError' when loading Raw & Uncut
+- Fixed 'expected string or buffer' error
+- Added 'Play All' option to play all videos on the current page
+- Added progress bar when loading directories
+- Added aired date for videos
+
+[B]Version 3.0.11[/B]
 
 - Version bump for frodo
 - Fixed 'KeyError' in build_video_directory
diff --git a/plugin.video.tmz/default.py b/plugin.video.tmz/default.py
index 6fa42da..4241807 100644
--- a/plugin.video.tmz/default.py
+++ b/plugin.video.tmz/default.py
@@ -5,8 +5,8 @@ import simplejson as json
 plugin = 'TMZ'
 __author__ = 'stacked <[email protected]>'
 __url__ = 'http://code.google.com/p/plugin/'
-__date__ = '01-13-2013'
-__version__ = '2.0.11'
+__date__ = '05-26-2013'
+__version__ = '2.0.12'
 settings = xbmcaddon.Addon( id = 'plugin.video.tmz' )
 dbg = False
 dbglevel = 3
@@ -37,40 +37,62 @@ def build_main_directory():
                ]
        for name, mode in main:
                u = { 'mode': mode, 'name': name }
-               addListItem(label = name, image = icon, url = u, isFolder = 
True, infoLabels = False, fanart = fanart)
+               addListItem(label = name, image = icon, url = u, isFolder = 
True, totalItems = 5, infoLabels = False, fanart = fanart)
        xbmcplugin.addSortMethod( handle = int(sys.argv[1]), sortMethod = 
xbmcplugin.SORT_METHOD_NONE )
        setViewMode("515")
        xbmcplugin.endOfDirectory( int( sys.argv[1] ) )
 
-@retry(IndexError)
+@retry(IndexError, TypeError, ValueError)
 def build_video_directory( name ):
        data = getUrl( 'http://www.tmz.com/videos/', True )
-       textarea = '[' + re.compile('{ name: \'' + name.upper() + '\',( )?\n    
     allInitialJson: {(.+?)},\n         (slug|noPaging)?', re.DOTALL).findall( 
data )[0][1].replace('\n', '').rsplit('[')[1].rsplit(']')[0] + ']'
-       query = json.loads(textarea)
+       textarea = '[{' + re.compile('{ name: \'' + name.upper() + '\',( )?\n   
      allInitialJson: {(.+?)},\n         (slug|noPaging)?', re.DOTALL).findall( 
data )[0][1].replace('\n', '').replace('results:','"results":') + '}]'
+       query = json.loads(textarea)[0]["results"]
+       totalItems = len(query)
+       if settings.getSetting('playall') == 'true':
+               playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
+               playlist.clear()
+               u = { 'mode': '4' }
+               infoLabels = { "Title": '* ' + settings.getLocalizedString( 
30030 ) + ' *', "Plot": settings.getLocalizedString( 30031 ) }
+               addListItem('* ' + settings.getLocalizedString( 30030 ) + ' *', 
icon, u, False, 0, infoLabels, fanart)
        for videos in query:
                title = clean(videos['title'].replace("\\", 
"")).encode('ascii', 'ignore')
                duration = videos['duration'].replace("\\", "")
                videoUrl = videos['videoUrl'].replace("\\", "")
                thumb = videos['thumbnailUrl'].replace("\\", "") + 
'/width/490/height/266/type/3'
+               try:
+                       if name == settings.getLocalizedString( 30003 ):
+                               time = title.rsplit(': ')[1].rsplit(' 
')[1].rsplit('/')
+                               date = '20' + time[2] + '.' + time[0].zfill(2)  
+ '.' + time[1]
+                       else:
+                               date = videos['activeDate'].rsplit('T')[0]
+               except:
+                       date = '0000.00.00'
                if videoUrl.find('http://cdnbakmi.kaltura.com') == -1:
                        if settings.getSetting("quality") == '0':
                                url = 'http://cdnapi.kaltura.com/p/' + 
thumb.split('/')[4] + '/sp/' + thumb.split('/')[6] + '/playManifest/entryId/' + 
videoUrl.split('_')[0].split('/')[-1:][0] + '_' + videoUrl.split('_')[1]
                        else:
                                url = 'http://cdnapi.kaltura.com/p/' + 
thumb.split('/')[4] + '/sp/' + thumb.split('/')[6] + '/playManifest/entryId/' + 
videoUrl.split('_')[0].split('/')[-1:][0] + '_' + videoUrl.split('_')[1] + 
'/flavorId/0_' + videoUrl.split('_')[3]
-                       infoLabels = { "Title": title, "Plot": title, 
"Duration": str(int(duration)/60) }
+                       infoLabels = { "Title": title, "Plot": title, 
"Duration": str(int(duration)/60), "aired": str(date) }
                        u = { 'mode': '1', 'name': title, 'url': url, 'studio': 
name, 'thumb': thumb }
-                       addListItem(label = title, image = thumb, url = u, 
isFolder = False, infoLabels = infoLabels, fanart = fanart, duration = duration)
+                       addListItem(label = title, image = thumb, url = u, 
isFolder = False, totalItems = totalItems, infoLabels = infoLabels, fanart = 
fanart, duration = duration)
        xbmcplugin.addSortMethod( handle = int(sys.argv[1]), sortMethod = 
xbmcplugin.SORT_METHOD_NONE )
        setViewMode("503")
        xbmcplugin.endOfDirectory( int( sys.argv[1] ) )
 
-@retry(IndexError)     
+@retry(IndexError, ValueError) 
 def build_search_directory():
        page = 1
        checking = True
        string = common.getUserInput(settings.getLocalizedString( 30007 ), "")
        if not string:
+               build_main_directory()
                return
+       if settings.getSetting('playall') == 'true':
+               playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
+               playlist.clear()
+               u = { 'mode': '4' }
+               infoLabels = { "Title": '* ' + settings.getLocalizedString( 
30030 ) + ' *', "Plot": settings.getLocalizedString( 30031 ) }
+               addListItem('* ' + settings.getLocalizedString( 30030 ) + ' *', 
icon, u, False, 0, infoLabels, fanart)
        while checking:
                url = 'http://www.tmz.com/search/json/videos/' + 
urllib.quote(string) + '/' + str(page) + '.json'
                data = getPage(url)
@@ -84,7 +106,6 @@ def build_search_directory():
                        text = data['content']
                jdata = json.loads(text)
                total = int(jdata['total'])
-               count = int(jdata['count'])
                if ((total - page * 25) > 0):
                        page = page + 1
                else:
@@ -95,7 +116,7 @@ def build_search_directory():
                        thumb = results['thumbnailUrl'].replace("\\", "") + 
'/width/490/height/266/type/3'
                        infoLabels = { "Title": title, "Plot": title }
                        u = { 'mode': '3', 'name': title, 'url': videoUrl, 
'thumb': thumb }
-                       addListItem(label = title, image = thumb, url = u, 
isFolder = False, infoLabels = infoLabels, fanart = fanart)
+                       addListItem(label = title, image = thumb, url = u, 
isFolder = False, totalItems = total, infoLabels = infoLabels, fanart = fanart)
        xbmcplugin.addSortMethod( handle = int(sys.argv[1]), sortMethod = 
xbmcplugin.SORT_METHOD_NONE )
        setViewMode("503")
        xbmcplugin.endOfDirectory( int( sys.argv[1] ) )
@@ -124,6 +145,11 @@ def play_video( name, url, thumb, studio ):
                        url = common.parseDOM(data, "meta", attrs = { "name": 
"VideoURL" }, ret = "content")[0]
        infoLabels = { "Title": name , "Studio": "TMZ: " + studio, "Plot": name 
}
        playListItem(label = name, image = thumb, path = url, infoLabels = 
infoLabels)
+       
+def playall():
+       playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
+       xbmc.Player().play(playlist)
+       return
 
 params = getParameters(sys.argv[2])
 mode = None
@@ -164,6 +190,8 @@ try:
                build_search_directory()
        elif mode == 3:
                get_search_url(name, url, thumb)
+       elif mode == 4:
+               playall()
 except Exception:
        buggalo.onExceptionRaised()
        
\ No newline at end of file
diff --git a/plugin.video.tmz/fanart.jpg b/plugin.video.tmz/fanart.jpg
index 0d6f5ec..225b618 100644
Binary files a/plugin.video.tmz/fanart.jpg and b/plugin.video.tmz/fanart.jpg 
differ
diff --git a/plugin.video.tmz/resources/language/English/strings.xml 
b/plugin.video.tmz/resources/language/English/strings.xml
index 568fdf8..a2dfe5b 100644
--- a/plugin.video.tmz/resources/language/English/strings.xml
+++ b/plugin.video.tmz/resources/language/English/strings.xml
@@ -10,6 +10,9 @@
        <string id="30007">Search</string>
     <string id="30009">No videos found. Please check your spelling</string>
     <string id="30010">or try again using different search words.</string>
+       <string id="30030">Play All</string>
+       <string id="30031">Play all videos on the current page.</string>
+       <string id="30032">Enable Play All option</string>
        <string id="30050">There was a connection error:</string>
        <string id="30051">If this problem persists, please submit the error 
report.</string>
        <string id="30052">Retry</string>
diff --git a/plugin.video.tmz/resources/settings.xml 
b/plugin.video.tmz/resources/settings.xml
index 4a7d81f..8c0c725 100644
--- a/plugin.video.tmz/resources/settings.xml
+++ b/plugin.video.tmz/resources/settings.xml
@@ -1,4 +1,5 @@
 <settings>
        <setting id="quality" type="enum" label="30004" lvalues="30005|30006" 
default="1"/>
+       <setting id="playall" type="bool" label="30032" default="false"/>
        <setting id="view" type="bool" label="30055" default="true"/>
 </settings>

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


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

Summary of changes:
 .../LICENSE.txt                                    |    0
 .../addon.xml                                      |   12 ++--
 .../addonfunc.py                                   |    6 +-
 plugin.video.testtube/changelog.txt                |    3 +
 .../default.py                                     |   52 ++++++++++----------
 plugin.video.testtube/fanart.jpg                   |  Bin 0 -> 85734 bytes
 plugin.video.testtube/icon.png                     |  Bin 0 -> 13921 bytes
 .../resources/language/English/strings.xml         |   10 ++--
 .../resources/media/archived.png                   |  Bin 24774 -> 24774 bytes
 .../resources/media/credits.txt                    |    0
 .../resources/media/downloads.png                  |  Bin 23387 -> 23387 bytes
 .../resources/media/featured.png                   |  Bin 27267 -> 27267 bytes
 .../resources/media/networks.png                   |  Bin 22594 -> 22594 bytes
 .../resources/media/next.png                       |  Bin 26419 -> 26419 bytes
 .../resources/media/play.png                       |  Bin 23115 -> 23115 bytes
 .../resources/media/recent.png                     |  Bin 23901 -> 23901 bytes
 .../resources/media/search.png                     |  Bin 29784 -> 29784 bytes
 .../resources/settings.xml                         |    2 +-
 plugin.video.tmz/addon.xml                         |    6 ++-
 plugin.video.tmz/addonfunc.py                      |   26 ++++++----
 plugin.video.tmz/changelog.txt                     |   10 +++-
 plugin.video.tmz/default.py                        |   50 +++++++++++++++----
 plugin.video.tmz/fanart.jpg                        |  Bin 91516 -> 94254 bytes
 .../resources/language/English/strings.xml         |    3 +
 plugin.video.tmz/resources/settings.xml            |    1 +
 25 files changed, 116 insertions(+), 65 deletions(-)
 copy {plugin.audio.abradio.cz => plugin.video.testtube}/LICENSE.txt (100%)
 copy {plugin.video.revision3 => plugin.video.testtube}/addon.xml (67%)
 copy {plugin.video.revision3 => plugin.video.testtube}/addonfunc.py (97%)
 create mode 100644 plugin.video.testtube/changelog.txt
 copy {plugin.video.revision3 => plugin.video.testtube}/default.py (90%)
 create mode 100644 plugin.video.testtube/fanart.jpg
 create mode 100644 plugin.video.testtube/icon.png
 copy {plugin.video.revision3 => 
plugin.video.testtube}/resources/language/English/strings.xml (77%)
 copy {plugin.video.revision3 => 
plugin.video.testtube}/resources/media/archived.png (100%)
 copy {plugin.video.revision3 => 
plugin.video.testtube}/resources/media/credits.txt (100%)
 copy {plugin.video.revision3 => 
plugin.video.testtube}/resources/media/downloads.png (100%)
 copy {plugin.video.revision3 => 
plugin.video.testtube}/resources/media/featured.png (100%)
 copy {plugin.video.revision3 => 
plugin.video.testtube}/resources/media/networks.png (100%)
 copy {plugin.video.revision3 => 
plugin.video.testtube}/resources/media/next.png (100%)
 copy {plugin.video.revision3 => 
plugin.video.testtube}/resources/media/play.png (100%)
 copy {plugin.video.revision3 => 
plugin.video.testtube}/resources/media/recent.png (100%)
 copy {plugin.video.revision3 => 
plugin.video.testtube}/resources/media/search.png (100%)
 copy {plugin.video.revision3 => plugin.video.testtube}/resources/settings.xml 
(87%)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to