The branch, frodo has been updated
       via  bdd3f8f865e97ff0749b64b5764a478318f6dc0d (commit)
       via  21b2ae000e76f0897acf055913272848135dbfb0 (commit)
       via  20e1b8199e73bb49b2fe9c23a911aa96807ae15a (commit)
      from  daa4b95cfd56b68a42fc4a19c219438677c3bff3 (commit)

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

commit bdd3f8f865e97ff0749b64b5764a478318f6dc0d
Author: beenje <[email protected]>
Date:   Wed Jan 2 21:34:31 2013 +0100

    [plugin.video.newyorktimes] updated to version 1.2.1

diff --git a/plugin.video.newyorktimes/addon.xml 
b/plugin.video.newyorktimes/addon.xml
index 96aed2c..4248663 100644
--- a/plugin.video.newyorktimes/addon.xml
+++ b/plugin.video.newyorktimes/addon.xml
@@ -1,8 +1,8 @@
-<addon id="plugin.video.newyorktimes" name="New York Times" 
provider-name="Jonathan Beluch (jbel)" version="0.2.0">
+<addon id="plugin.video.newyorktimes" name="New York Times" 
provider-name="Jonathan Beluch (jbel)" version="1.2.1">
   <requires>
-    <import addon="xbmc.python" version="2.0" />
+    <import addon="xbmc.python" version="2.1.0" />
     <import addon="script.module.beautifulsoup" version="3.2.0" />
-    <import addon="script.module.xbmcswift2" version="1.3.0" />
+    <import addon="script.module.xbmcswift2" version="1.3.1" />
     <import addon="script.module.requests" version="0.13.2" />
     <import addon="script.module.brightcove" version="1.1.1" />
   </requires>
diff --git a/plugin.video.newyorktimes/changelog.txt 
b/plugin.video.newyorktimes/changelog.txt
index c59570f..ec63fdd 100644
--- a/plugin.video.newyorktimes/changelog.txt
+++ b/plugin.video.newyorktimes/changelog.txt
@@ -1,3 +1,8 @@
+Version 1.2.1
+* Update python version
+* Bump major version to differentiate between eden
+* Update usage of requests module
+
 Version 0.2
 * Update addon to reflect website changes
 * Upgrade to xbmcswift2
diff --git a/plugin.video.newyorktimes/requirements.txt 
b/plugin.video.newyorktimes/requirements.txt
index 465b95b..f7be859 100644
--- a/plugin.video.newyorktimes/requirements.txt
+++ b/plugin.video.newyorktimes/requirements.txt
@@ -1,4 +1,4 @@
-requests
+requests>=1.0.4
 brightcove
 BeautifulSoup
 xbmcswift2
diff --git a/plugin.video.newyorktimes/resources/lib/api.py 
b/plugin.video.newyorktimes/resources/lib/api.py
index d8f3bfc..0de922e 100644
--- a/plugin.video.newyorktimes/resources/lib/api.py
+++ b/plugin.video.newyorktimes/resources/lib/api.py
@@ -25,7 +25,7 @@ def _url(path):
 
 def get_topics():
     '''Returns a list of (topic_name, url) of available topics'''
-    html = BS(requests.get(BASE_URL).content)
+    html = BS(requests.get(BASE_URL).text)
     menu = html.find('div', {'class': 'navigation clearfix'})
     links = menu.findAll('a', href=lambda h: h.startswith('/video/landing/'))
     return [(a.text, _url(a['href'])) for a in links]
@@ -36,7 +36,7 @@ def get_sub_topics(topic_url):
     given topic page. If the provided url is a sub topic page, an empty list
     will be returned.
     '''
-    html = BS(requests.get(topic_url).content)
+    html = BS(requests.get(topic_url).text)
     menu = html.find('div', {'class': 'subCategories clearfix'})
 
     if menu.find('li', {'class': 'firstItem selected'}):

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

commit 21b2ae000e76f0897acf055913272848135dbfb0
Author: beenje <[email protected]>
Date:   Wed Jan 2 21:34:27 2013 +0100

    [plugin.video.classiccinema] updated to version 2.1.2

diff --git a/plugin.video.classiccinema/addon.xml 
b/plugin.video.classiccinema/addon.xml
index 5cd5e64..faa50e0 100644
--- a/plugin.video.classiccinema/addon.xml
+++ b/plugin.video.classiccinema/addon.xml
@@ -1,9 +1,9 @@
-<addon id="plugin.video.classiccinema" name="Classic Cinema" 
provider-name="Jonathan Beluch (jbel)" version="1.1.1">
+<addon id="plugin.video.classiccinema" name="Classic Cinema" 
provider-name="Jonathan Beluch (jbel)" version="2.1.2">
   <requires>
-    <import addon="xbmc.python" version="2.0" />
+    <import addon="xbmc.python" version="2.1.0" />
     <import addon="plugin.video.youtube" version="3.3.0" />
     <import addon="script.module.beautifulsoup" version="3.2.0" />
-    <import addon="script.module.xbmcswift2" version="1.3.0" />
+    <import addon="script.module.xbmcswift2" version="1.3.1" />
     <import addon="script.module.requests" version="0.13.2" />
   </requires>
   <extension library="addon.py" point="xbmc.python.pluginsource">
diff --git a/plugin.video.classiccinema/changelog.txt 
b/plugin.video.classiccinema/changelog.txt
index 9b1d60b..500a2d1 100644
--- a/plugin.video.classiccinema/changelog.txt
+++ b/plugin.video.classiccinema/changelog.txt
@@ -1,3 +1,7 @@
+Version 2.1.2
+* Update xbmc python version
+* Bump major version to differentiate from eden
+
 Version 1.1.1
 * Add missing dependency for requests
 
diff --git a/plugin.video.classiccinema/requirements.txt 
b/plugin.video.classiccinema/requirements.txt
index 68c2eae..a3f2f95 100644
--- a/plugin.video.classiccinema/requirements.txt
+++ b/plugin.video.classiccinema/requirements.txt
@@ -1,3 +1,3 @@
 BeautifulSoup
-requests
+requests>=1.0.4
 xbmcswift2
diff --git a/plugin.video.classiccinema/resources/lib/api.py 
b/plugin.video.classiccinema/resources/lib/api.py
index fdc88af..c67ecee 100644
--- a/plugin.video.classiccinema/resources/lib/api.py
+++ b/plugin.video.classiccinema/resources/lib/api.py
@@ -12,7 +12,7 @@ def _url(path):
 
 def get_categories():
     '''Returns a list of the main categories for the website.'''
-    html = BS(requests.get(BASE_URL).content)
+    html = BS(requests.get(BASE_URL).text)
     ul = html.find('ul', {'class': 'gf-menu l1 '})
     lis = ul.findAll('li', recursive=False)
     return [li.a.text for li in lis[1:-1]]
@@ -21,7 +21,7 @@ def get_genres_flat(category):
     '''Returns the available genres as a flat list. Each item in the list
     is a tuple, (genre, url).
     '''
-    html = BS(requests.get(BASE_URL).content, convertEntities=BS.HTML_ENTITIES)
+    html = BS(requests.get(BASE_URL).text, convertEntities=BS.HTML_ENTITIES)
     links = html.findAll('a', {'class': 'item'})
 
     # Will throw StopIteration if not found
@@ -32,13 +32,13 @@ def get_genres_flat(category):
 
 def get_films(genre_url):
     '''Returns a list of (film_title, url) for the given genre url'''
-    html = BS(requests.post(genre_url, {'limit': 0}).content)
+    html = BS(requests.post(genre_url, {'limit': 0}).text)
     tds = html.findAll('td', {'class': 'list-title'})
     return [(td.text, _url(td.a['href'])) for td in tds]
 
 def get_film(film_url):
     '''Returns a dict of info for a given film url'''
-    src = requests.get(film_url).content
+    src = requests.get(film_url).text
     url = getflashvideo.get_flashvideo_url(src)
     html = BS(src, convertEntities=BS.HTML_ENTITIES)
     img = html.find('img', src=lambda src: src.startswith('/images/posters/'))

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

commit 20e1b8199e73bb49b2fe9c23a911aa96807ae15a
Author: beenje <[email protected]>
Date:   Wed Jan 2 21:34:09 2013 +0100

    [plugin.video.revision3] updated to version 3.0.12

diff --git a/plugin.video.revision3/addon.xml b/plugin.video.revision3/addon.xml
index e29bd8a..2c8d362 100644
--- a/plugin.video.revision3/addon.xml
+++ b/plugin.video.revision3/addon.xml
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.video.revision3"
        name="Revision3"
-       version="2.0.11" 
+       version="3.0.12" 
        provider-name="stacked">
   <requires>
-    <import addon="xbmc.python" version="2.0"/>
+    <import addon="xbmc.python" version="2.1.0"/>
        <import addon="script.module.parsedom" version="1.3.0"/>
        <import addon="script.module.simple.downloader" version="0.9.3"/>
        <import addon="script.module.buggalo" version="1.1.2"/>
diff --git a/plugin.video.revision3/changelog.txt 
b/plugin.video.revision3/changelog.txt
index cdbee9b..0388122 100644
--- a/plugin.video.revision3/changelog.txt
+++ b/plugin.video.revision3/changelog.txt
@@ -1,9 +1,18 @@
+[B]Version 3.0.12[/B]
+
+- Version bump for frodo
+- Fixed video settings issue
+- Fixed fanart issue
+- Fixed 'access_voilation' errors
+- Fixed 'TypeError' in get_video
+- Fixed ascii errors during search
+- Fixed missing 'Next Page' folder
+
 [B]Version 2.0.11[/B]
 
 - Fixed index error caused by getParameters
 - Updated open_url and retry functions
 
-
 [B]Version 2.0.10[/B]
 
 - Added better support for HTTP Errors
diff --git a/plugin.video.revision3/default.py 
b/plugin.video.revision3/default.py
index d3baaad..ce8316e 100644
--- a/plugin.video.revision3/default.py
+++ b/plugin.video.revision3/default.py
@@ -4,8 +4,8 @@ import xbmc, xbmcgui, xbmcplugin, xbmcaddon, urllib, re, 
string, sys, os, time,
 plugin =  'Revision3'
 __author__ = 'stacked <[email protected]>'
 __url__ = 'http://code.google.com/p/plugin/'
-__date__ = '11-25-2012'
-__version__ = '2.0.11'
+__date__ = '01-01-2013'
+__version__ = '3.0.12'
 settings = xbmcaddon.Addon(id='plugin.video.revision3')
 buggalo.SUBMIT_URL = 'http://www.xbmc.byethost17.com/submit.php'
 dbg = False
@@ -25,58 +25,30 @@ common.plugin = plugin + ' ' + __version__
 import SimpleDownloader as downloader
 downloader = downloader.SimpleDownloader()
 
-def retry(ExceptionToCheck, tries=11, delay=3, backoff=1, logger=None):
-    def deco_retry(f):
-        def f_retry(*args, **kwargs):
-            mtries, mdelay = tries, delay
-            try_one_last_time = True
-            while mtries >= 0:
-                               if mtries == 0:
-                                       dialog = xbmcgui.Dialog()
-                                       ret = dialog.yesno(plugin, 
settings.getLocalizedString( 30054 ), '', '', settings.getLocalizedString( 
30052 ), settings.getLocalizedString( 30053 ))
-                                       if ret == False:
-                                               mtries, mdelay = tries, delay
-                                       else:
-                                               ok = dialog.ok(plugin, 
settings.getLocalizedString( 30051 ))
-                                               raise Exception("retry ERROR")
-                               try:
-                                       return f(*args, **kwargs)
-                                       try_one_last_time = False
-                                       break
-                               except ExceptionToCheck, e:
-                                       if mtries > 1:
-                                               msg = "%s, Retrying in %d 
seconds..." % (str(e), mdelay)
-                                               if logger:
-                                                       logger.warning(msg)
-                                               else:
-                                                       print msg
-                                               time.sleep(mdelay)
-                                               mdelay *= backoff
-                                       mtries -= 1
-            if try_one_last_time:
-                return f(*args, **kwargs)
-            return
-        return f_retry 
-    return deco_retry
+from addonfunc import addListItem, playListItem, getUrl, getPage, setViewMode, 
getParameters, retry
 
 @retry(IndexError)
 def build_main_directory(url):
        path = url
-       html = open_url(url)
+       html = getUrl(url)
        shows = common.parseDOM(html, "ul", attrs = { "id": "shows" })[0]
        url_name = re.compile('<h3><a 
href="(.+?)">(.+?)</a></h3>').findall(shows)
        image = re.compile('class="thumbnail"><img src="(.+?)" 
/></a>').findall(shows)
        plot = common.parseDOM(shows, "p", attrs = { "class": "description" })
        if settings.getSetting('folder') == 'true' and settings.getSetting( 
'downloadPath' ) and path == 'http://revision3.com/shows/':
+               u = { 'mode': None, 'url': settings.getSetting("downloadPath") }
                infoLabels = { "Title": settings.getLocalizedString( 30012 ), 
"Plot": settings.getLocalizedString( 30022 ) }
-               ListItem('[ ' + settings.getLocalizedString( 30012 ) + ' ]', 
downloads_thumb, settings.getSetting("downloadPath"), None, True, infoLabels, 
fanart_bg)
+               addListItem('[ ' + settings.getLocalizedString( 30012 ) + ' ]', 
downloads_thumb, u, True, infoLabels, fanart_bg)
        if path == 'http://revision3.com/shows/':
+               u = { 'mode': '1', 'name': 
urllib.quote_plus(settings.getLocalizedString( 30013 )), 'url': 
urllib.quote_plus('http://revision3.com/episodes/page?&hideArrows=1&type=recent&page=1')
 }
                infoLabels = { "Title": settings.getLocalizedString( 30013 ), 
"Plot": settings.getLocalizedString( 30018 ) }
-               ListItem('[ ' + settings.getLocalizedString( 30013 ) + ' ]', 
current_thumb, 
'http://revision3.com/episodes/page?&hideArrows=1&type=recent&page=1', '1', 
True, infoLabels, fanart_bg)
+               addListItem('[ ' + settings.getLocalizedString( 30013 ) + ' ]', 
current_thumb, u, True, infoLabels, fanart_bg)
+               u = { 'mode': '3', 'url': 
urllib.quote_plus('http://revision3.com/shows/archive') }
                infoLabels = { "Title": settings.getLocalizedString( 30014 ), 
"Plot": settings.getLocalizedString( 30019 ) }
-               ListItem('[ ' + settings.getLocalizedString( 30014 ) + ' ]', 
old_thumb, 'http://revision3.com/shows/archive', '3', True, infoLabels, 
fanart_bg)
+               addListItem('[ ' + settings.getLocalizedString( 30014 ) + ' ]', 
old_thumb, u, True, infoLabels, fanart_bg)
+               u = { 'mode': '4', 'url': urllib.quote_plus('search') }
                infoLabels = { "Title": settings.getLocalizedString( 30015 ), 
"Plot": settings.getLocalizedString( 30020 ) }
-               ListItem('[ ' + settings.getLocalizedString( 30015 ) + ' ]', 
search_thumb, 'search', '4', True, infoLabels, fanart_bg)
+               addListItem('[ ' + settings.getLocalizedString( 30015 ) + ' ]', 
search_thumb, u, True, infoLabels, fanart_bg)
        count = 0
        for url, name in url_name:
                fanart = url.replace('/','')
@@ -85,11 +57,11 @@ def build_main_directory(url):
                else:
                        fanart = settings.getSetting(fanart)
                url = 'http://revision3.com' + url + '/episodes'
+               u = { 'mode': '1', 'name': urllib.quote_plus(name), 'url': 
urllib.quote_plus(url) }
                infoLabels = { "Title": name, "Plot": clean(plot[count]) }
-               ListItem(name, image[count].replace('160x160','200x200'), url, 
'1', True, infoLabels, fanart)
+               addListItem(name, image[count].replace('160x160','200x200'), u, 
True, infoLabels, fanart)
                count += 1
        xbmcplugin.addSortMethod( handle = int(sys.argv[ 1 ]), sortMethod = 
xbmcplugin.SORT_METHOD_UNSORTED )
-       xbmcplugin.setContent(int( sys.argv[1] ), 'episodes')
        setViewMode("515")
        xbmcplugin.endOfDirectory(int(sys.argv[1]))
 
@@ -98,7 +70,7 @@ def build_sub_directory(url, name):
        saveurl = url
        studio = name
        savestudio = name
-       html = open_url(url)
+       html = getUrl(url)
        ret = common.parseDOM(html, "div", attrs = { "id": "main-episodes" })
        pageLoad = common.parseDOM(ret, "a", ret = "onclick")
        if len(ret) == 0:
@@ -110,12 +82,10 @@ def build_sub_directory(url, name):
        current = common.parseDOM(html, "span", attrs = { "class": "active" })
        episodes = common.parseDOM(ret, "li", attrs = { "class": "episode item" 
})
        img = common.parseDOM(episodes[0], "img", ret = "src")[0]
-       if not '[ ' + settings.getLocalizedString( 30013 ) + ' ]' == name:
+       if settings.getLocalizedString( 30013 ) != name:
                try:
                        downloads = 'http://revision3.com/' + 
img.rsplit('/')[6] + '/' + img.rsplit('/')[6] + '_downloads'
-                       fresult = get_page(downloads)
-                       if fresult == 'error':
-                               raise Exception("build_sub_directory ERROR")
+                       fresult = getPage(downloads)['content']
                        data = re.compile( '<a href="(.+?)" 
target="_blank">1920x1200</a>' ).findall(fresult)
                        if len(data) > 1:
                                fanart = data[1]
@@ -124,7 +94,7 @@ def build_sub_directory(url, name):
                        settings.setSetting(img.rsplit('/')[6], fanart)
                except:
                        fanart = 'http://statics.revision3.com/_/images/shows/' 
+ img.rsplit('/')[6] + '/show_background.jpg'
-                       if get_page(fanart) == 'error':
+                       if getPage(fanart)['error'] == 'HTTP Error 404: Not 
Found':
                                settings.setSetting(img.rsplit('/')[6], 
fanart_bg)
                        else:
                                settings.setSetting(img.rsplit('/')[6], fanart) 
        
@@ -133,13 +103,14 @@ def build_sub_directory(url, name):
                label = common.parseDOM(html, "a", attrs = { "href": 
"#child-episodes" })[0]
                childshow = common.parseDOM(child, "a", attrs = { "class": 
"thumbnail" }, ret = "href" )[0].rsplit('/')[1]
                csaveurl = 'http://revision3.com/' + childshow + 
'/episodePage?type=recent&limit=15&hideShow=1&hideArrows=1&page=1'
+               u = { 'mode': '1', 'name': urllib.quote_plus(studio), 'url': 
urllib.quote_plus(csaveurl) }
                infoLabels = { "Title": label, "Plot": label }
-               ListItem('[ ' + label + ' ]', more_thumb, csaveurl, '1', True, 
infoLabels, fanart, studio)
+               addListItem('[ ' + label + ' ]', more_thumb, u, True, 
infoLabels, fanart)
        except:
                pass
        try:
                strs = 'http://revision3.com' + pageLoad[-1:][0].rsplit('\'')[1]
-               params = common.getParameters(strs)
+               params = getParameters(strs)
                saveurl = strs.rstrip('&page=' + params['page']) + '&page=' + 
str( int(current[0]) + 1 )
                if int(params['page']) > int(current[0]):
                        next = True
@@ -169,25 +140,27 @@ def build_sub_directory(url, name):
                except:
                        episode = '0'
                        date = '0000-00-00'
-               duration = name[-6:].rstrip(')').replace('(','')
-               infoLabels = { "Title": plot, "Studio": studio, "Plot": plot, 
"Episode": int(episode), "Aired": date, "Duration": duration }
-               ListItem(plot, thumb, url, '2', False, infoLabels, fanart)
+               length = name[-6:].rstrip(')').replace('(','').split(':')
+               duration = int(length[0]) * 60 + int(length[1])
+               infoLabels = { "Title": plot, "Studio": studio, "Plot": plot, 
"Episode": int(episode), "Aired": date }
+               u = { 'mode': '2', 'name': urllib.quote_plus(plot), 'url': 
urllib.quote_plus(url), 'plot': 
urllib.quote_plus(infoLabels['Plot'].encode('ascii', 'ignore')), 'studio': 
urllib.quote_plus(infoLabels['Studio']), 'episode': 
urllib.quote_plus(str(infoLabels['Episode'])), 'thumb': 
urllib.quote_plus(thumb), 'date': urllib.quote_plus(infoLabels['Aired']) }
+               addListItem(plot, thumb, u, False, infoLabels, fanart, duration)
        if next == True:
+               u = { 'mode': '1', 'name': urllib.quote_plus(savestudio), 
'url': urllib.quote_plus(saveurl) }
                infoLabels = { "Title": settings.getLocalizedString( 30016 ), 
"Plot": settings.getLocalizedString( 30016 ) }
-               ListItem(settings.getLocalizedString( 30016 ) + ' (' + str( 
int(current[0]) + 1 ) + ')', next_thumb, saveurl, '1', True, infoLabels, 
fanart_bg, savestudio)
+               addListItem(settings.getLocalizedString( 30016 ) + ' (' + str( 
int(current[0]) + 1 ) + ')', next_thumb, u, True, infoLabels, fanart_bg)
        xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), 
sortMethod=xbmcplugin.SORT_METHOD_UNSORTED )
        xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), 
sortMethod=xbmcplugin.SORT_METHOD_EPISODE )
        xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), 
sortMethod=xbmcplugin.SORT_METHOD_STUDIO )
        xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), 
sortMethod=xbmcplugin.SORT_METHOD_VIDEO_RUNTIME )
-       xbmcplugin.setContent(int( sys.argv[1] ), 'episodes')
        setViewMode("503")
        xbmcplugin.endOfDirectory(int(sys.argv[1]))
        
-@retry(IndexError)
+@retry((IndexError, TypeError))
 def get_video(url, name, plot, studio, episode, thumb, date):
-       result = open_url(url)
+       result = getUrl(url)
        video_id = 
re.compile('player\.loadRevision3Item\(\'video_id\',(.+?)\);').findall(result)[0].replace('
 ','')
-       api = open_url('http://revision3.com/api/flash?video_id=' + video_id)
+       api = getUrl('http://revision3.com/api/flash?video_id=' + video_id)
        videos_api = common.parseDOM(api, "media", ret = "type")
        videos_api[:] = (value for value in videos_api if value != 'thumbnail')
        durl = {}
@@ -245,9 +218,8 @@ def get_video(url, name, plot, studio, episode, thumb, 
date):
                        params = { "url": purl, "download_path": 
settings.getSetting('downloadPath'), "Title": name }
                        downloader.download(clean_file(name) + '.' + 
purl.split('/')[-1].split('.')[-1], params)
                else:
-                       listitem = xbmcgui.ListItem(label = name , iconImage = 
'DefaultVideo.png', thumbnailImage = thumb, path = purl)
-                       listitem.setInfo( type = "Video", infoLabels={ "Title": 
name, "Studio": studio, "Plot": plot, "Episode": int(episode), "Aired": date  } 
)
-                       xbmcplugin.setResolvedUrl( handle = int( sys.argv[1] ), 
succeeded = True, listitem = listitem )
+                       infoLabels = { "Title": name, "Studio": 'Revision3: ' + 
studio, "Plot": plot, "Episode": int(episode), "Aired": date  }
+                       playListItem(label = name, image = thumb, path = purl, 
infoLabels = infoLabels, PlayPath = False)
 
 @retry(IndexError)
 def build_search_directory(url):
@@ -257,12 +229,12 @@ def build_search_directory(url):
                        url = 'http://revision3.com/search/page?type=video&q=' 
+ search + '&limit=10&page=1'
                except:
                        return
-       html = open_url(url)
+       html = getUrl(url).encode('ascii', 'ignore')
        current = common.parseDOM(html, "span", attrs = { "class": "active" })
        pageLoad = common.parseDOM(html, "a", ret = "onclick")
        try:
                strs = 'http://revision3.com' + pageLoad[-1:][0].rsplit('\'')[1]
-               params = common.getParameters(strs)
+               params = getParameters(strs)
                saveurl = strs.rstrip('&page=' + params['page']) + '&page=' + 
str( int(current[0]) + 1 )
                if int(params['page']) > int(current[0]):
                        next = True
@@ -284,82 +256,17 @@ def build_search_directory(url):
                try:
                        studio = title.rsplit(' - ')[1]
                except:
-                       studio = plugin
+                       studio = 'Search'
                infoLabels = { "Title": title, "Studio": studio, "Plot": plot, 
"Episode": 0, "Aired": "0000-00-00" }
-               ListItem(title, thumb, url, '2', False, infoLabels, fanart_bg)
+               u = { 'mode': '2', 'name': urllib.quote_plus(title), 'url': 
urllib.quote_plus(url), 'plot': urllib.quote_plus(infoLabels['Plot']), 
'studio': urllib.quote_plus(infoLabels['Studio']), 'episode': 
urllib.quote_plus(str(infoLabels['Episode'])), 'thumb': 
urllib.quote_plus(thumb), 'date': urllib.quote_plus(infoLabels['Aired']) }
+               addListItem(title, thumb, u, False, infoLabels, fanart_bg)
        if next == True:
+               u = { 'mode': '4', 'url': urllib.quote_plus(saveurl), 'name': 
urllib.quote_plus(studio) }
                infoLabels = { "Title": settings.getLocalizedString( 30016 ), 
"Plot": settings.getLocalizedString( 30016 ) }
-               ListItem(settings.getLocalizedString( 30016 ) + ' (' + str( 
int(current[0]) + 1 ) + ')', next_thumb, saveurl, '4', True, infoLabels, 
fanart_bg, studio)
+               addListItem(settings.getLocalizedString( 30016 ) + ' (' + str( 
int(current[0]) + 1 ) + ')', next_thumb, u, True, infoLabels, fanart_bg)
        xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), 
sortMethod=xbmcplugin.SORT_METHOD_UNSORTED )
-       xbmcplugin.setContent(int( sys.argv[1] ), 'episodes')
        setViewMode("503")
        xbmcplugin.endOfDirectory(int(sys.argv[1]))
-       
-def ListItem(label, image, url, mode, isFolder, infoLabels = False, fanart = 
False, name = False):
-       listitem = xbmcgui.ListItem(label = label, iconImage = image, 
thumbnailImage = image)
-       if fanart:
-               listitem.setProperty('fanart_image', fanart)
-       if infoLabels:
-               listitem.setInfo( type = "Video", infoLabels = infoLabels )
-       if not isFolder:
-               if settings.getSetting('download') == 'false':
-                       listitem.setProperty('IsPlayable', 'true')
-       if mode:
-               if name:
-                       label = name
-               if mode == '2':
-                       u = sys.argv[0] + "?mode=2&name=" + 
urllib.quote_plus(label) + "&url=" + urllib.quote_plus(url) + "&plot=" + 
urllib.quote_plus(infoLabels['Plot'].encode('ascii', 'ignore')) + "&studio=" + 
urllib.quote_plus(infoLabels['Studio']) + "&episode=" + 
urllib.quote_plus(str(infoLabels['Episode'])) + "&thumb=" + 
urllib.quote_plus(image) + "&date=" + urllib.quote_plus(infoLabels['Aired'])
-               else:
-                       u = sys.argv[0] + "?mode=" + mode + "&name=" + 
urllib.quote_plus(label) + "&url=" + urllib.quote_plus(url) + "&thumb=" + 
urllib.quote_plus(image)
-       else:
-               u = url
-       ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, 
listitem = listitem, isFolder = isFolder)
-       return ok
-       
-def open_url(url):
-       retries = 0
-       while retries < 11:
-               data = {'content': None, 'error': None}
-               try:
-                       if retries != 0:
-                               time.sleep(3)
-                       data = get_page(url)
-                       if data['content'] != None and data['error'] == None:
-                               return data['content']
-               except Exception, e:
-                       data['error'] = str(e)
-               retries += 1
-       dialog = xbmcgui.Dialog()
-       ret = dialog.yesno(plugin, settings.getLocalizedString( 30050 ), 
data['error'], '', settings.getLocalizedString( 30052 ), 
settings.getLocalizedString( 30053 ))
-       if ret == False:
-               open_url(url)
-       else:
-               ok = dialog.ok(plugin, settings.getLocalizedString( 30051 ))
-               buggalo.addExtraData('url', url)
-               buggalo.addExtraData('error', data['error'])
-               raise Exception("open_url ERROR")
-               
-def get_page(url):
-       data = {'content': None, 'error': None}
-       try:
-               req = urllib2.Request(url)
-               req.add_header('User-Agent', 'Mozilla/5.0 (Windows NT 6.1; 
WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1')
-               content = urllib2.urlopen(req)
-               html = content.read()
-               content.close()
-               try:
-                       data['content'] = html.decode("utf-8")
-                       return data
-               except:
-                       data['content'] = html
-                       return data
-       except Exception, e:
-               data['error'] = str(e)
-               return data
-       
-def setViewMode(id):
-       if xbmc.getSkinDir() == "skin.confluence" and 
settings.getSetting('view') == 'true':
-               xbmc.executebuiltin("Container.SetViewMode(" + id + ")")
 
 def clean(name):
        remove = [('&amp;','&'), ('&quot;','"'), ('&#039;','\''), ('\r\n',' '), 
('\n',' '), ('&apos;','\''), ('&#150;','-'), ('%3A',':'), ('%2F','/'), 
('<link>',''), ('</link>','')]
@@ -373,17 +280,6 @@ def clean_file(name):
         name=name.replace(old,new)
     return name
 
-def getParameters(parameterString):
-    commands = {}
-    splitCommands = parameterString[parameterString.find('?') + 1:].split('&')
-    for command in splitCommands:
-        if (len(command) > 0):
-            splitCommand = command.split('=')
-            key = splitCommand[0]
-            value = splitCommand[1]
-            commands[key] = value
-    return commands
-
 params = getParameters(sys.argv[2])
 url = None
 name = None
diff --git a/plugin.video.revision3/resources/settings.xml 
b/plugin.video.revision3/resources/settings.xml
index ec15d64..f637eec 100644
--- a/plugin.video.revision3/resources/settings.xml
+++ b/plugin.video.revision3/resources/settings.xml
@@ -1,6 +1,5 @@
 <settings>
-   <setting id="type" type="select" lvalues="30001|30002|30003" label="30000" 
default="MP4:HD"/>
-   <setting id="view" type="bool" label="30021" default="true"/>
+   <setting id="type" type="labelenum" lvalues="30001|30002|30003" 
label="30000" default="MP4:HD"/>
    <setting id="download" type="bool" label="30004" default="false"/>
    <setting id="downloadPath" type="folder" enable="eq(-1,true)" label="30005" 
default="" /> 
    <setting id="folder" type="bool" enable="eq(-2,true)" label="30008" 
default="true"/>

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

Summary of changes:
 plugin.video.classiccinema/addon.xml               |    6 +-
 plugin.video.classiccinema/changelog.txt           |    4 +
 plugin.video.classiccinema/requirements.txt        |    2 +-
 plugin.video.classiccinema/resources/lib/api.py    |    8 +-
 .../.travis.yml                                    |    0
 plugin.video.newyorktimes/addon.xml                |    6 +-
 plugin.video.newyorktimes/changelog.txt            |    5 +
 plugin.video.newyorktimes/requirements.txt         |    2 +-
 plugin.video.newyorktimes/resources/lib/api.py     |    4 +-
 plugin.video.revision3/addon.xml                   |    4 +-
 .../addonfunc.py                                   |   21 ++-
 plugin.video.revision3/changelog.txt               |   11 +-
 plugin.video.revision3/default.py                  |  184 +++++---------------
 plugin.video.revision3/resources/settings.xml      |    3 +-
 14 files changed, 90 insertions(+), 170 deletions(-)
 copy {plugin.video.classiccinema => plugin.video.newyorktimes}/.travis.yml 
(100%)
 copy {plugin.video.tmz => plugin.video.revision3}/addonfunc.py (91%)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to