The branch, frodo has been updated via c6f61047cfae1105b7736f042f23793a88a443f8 (commit) via 39eec2e1af944a2f6566750f60fa6825c386916b (commit) from 87dd0704d8450a53135e7b540bfe16283da82474 (commit)
- Log ----------------------------------------------------------------- http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=c6f61047cfae1105b7736f042f23793a88a443f8 http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=39eec2e1af944a2f6566750f60fa6825c386916b commit 39eec2e1af944a2f6566750f60fa6825c386916b Author: sphere <sph...@dersphere.de> Date: Wed Jun 25 10:32:02 2014 +0200 [plugin.video.the.daily.show] updated to version 1.0.9 diff --git a/plugin.video.the.daily.show/addon.py b/plugin.video.the.daily.show/addon.py index e0d8aec..3842260 100644 --- a/plugin.video.the.daily.show/addon.py +++ b/plugin.video.the.daily.show/addon.py @@ -146,6 +146,12 @@ def root(**ignored): xbmcplugin.endOfDirectory(pluginhandle) +def show_message(title, message): + dialog = xbmcgui.Dialog() + dialog.ok(' %s ' % title, '%s ' % message) + +def show_error(message): + show_message('Error', message) def full_episodes(**ignored): xbmcplugin.setContent(pluginhandle, 'episodes') @@ -153,10 +159,28 @@ def full_episodes(**ignored): url = 'http://thedailyshow.cc.com/full-episodes/' # Due to unstructured daily show site, there is no canonical JSON url # so we find the full episode json url presented on the latest full episode - jsonurl = re.compile(r'http[^"]+/f1010\\/[^"]+').findall(get(url).content)[0].replace("\\", "") - + soup = BS3(get(url).text) + j = soup.head.script.text.strip().strip(';').split('=',1)[1] + jj = json.loads(j) + jsonurl = None + for zone, attribs in jj.get('manifest').get('zones').items(): + feed = attribs.get('feed') + urls = re.compile(r'http[^"]+/f1010/[^"]+').findall(feed) + if urls: + jsonurl = urls[0] + break + if not jsonurl: + # give user feedback on problem here + errormsg = addon.getLocalizedString(30025) + show_error(errormsg) + return None jsonresponse = json.loads(get(jsonurl).content) - episodes = jsonresponse.get('result').get('episodes') + episodes = jsonresponse.get('result').get('episodes') or [] + if not episodes: + # give user feedback on problem here + errormsg = addon.getLocalizedString(30026) + show_error(errormsg) + return None for episode in episodes: thumbnail = None if len(episode.get('images', ())) >= 1: diff --git a/plugin.video.the.daily.show/addon.xml b/plugin.video.the.daily.show/addon.xml index 7de5a4e..3b99135 100644 --- a/plugin.video.the.daily.show/addon.xml +++ b/plugin.video.the.daily.show/addon.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <addon id="plugin.video.the.daily.show" name="The Daily Show" - version="1.0.8" + version="1.0.9" provider-name="Fritzl Inc."> <requires> <import addon="xbmc.python" version="2.1.0"/> diff --git a/plugin.video.the.daily.show/changelog.txt b/plugin.video.the.daily.show/changelog.txt index 2297647..5330a68 100644 --- a/plugin.video.the.daily.show/changelog.txt +++ b/plugin.video.the.daily.show/changelog.txt @@ -1,3 +1,7 @@ +[B]Version 1.0.9 - 2014-06-24[/B] + +- Returns a descriptive error message when no episodes are found + [B]Version 1.0.8 - 2014-04-03[/B] - Fixes a URL encoding bug that prevented some episodes from playing diff --git a/plugin.video.the.daily.show/resources/language/English/strings.xml b/plugin.video.the.daily.show/resources/language/English/strings.xml index e013d38..6ba9faf 100644 --- a/plugin.video.the.daily.show/resources/language/English/strings.xml +++ b/plugin.video.the.daily.show/resources/language/English/strings.xml @@ -18,6 +18,13 @@ <string id="30021">No results found for the given date.</string> <string id="30022">No results found for the given search term(s).</string> + <string id="30025">Could not find any episodes url on the site. + The content urls may have recently changed, breaking our plugin. + Please file a bug [fritzl-...@gmx.de] including this message.</string> + <string id="30026">Could not find any episodes in the json feed. + The content urls may have recently changed, breaking our plugin. + Please file a bug [fritzl-...@gmx.de] including this message.</string> + <string id="30030">Full Episodes</string> <string id="30031">Guests</string> <string id="30032">Search</string> ----------------------------------------------------------------------- Summary of changes: plugin.video.dmax_de/.project | 17 ++ plugin.video.dmax_de/.pydevproject | 5 + .../.settings/org.eclipse.core.resources.prefs | 3 + .../LICENSE.txt | 0 plugin.video.dmax_de/addon.xml | 23 ++ .../bromixbmc}/LICENSE.txt | 0 plugin.video.dmax_de/bromixbmc/__init__.py | 2 + plugin.video.dmax_de/bromixbmc/bromixbmc.py | 109 +++++++++ plugin.video.dmax_de/changelog.txt | 2 + plugin.video.dmax_de/default.py | 238 ++++++++++++++++++++ plugin.video.dmax_de/fanart.jpg | Bin 0 -> 129958 bytes plugin.video.dmax_de/icon.png | Bin 0 -> 4975 bytes .../resources/language/English/strings.xml | 12 + .../resources/language/German/strings.xml | 12 + .../resources/media/highlight.png | Bin 8046 -> 8046 bytes plugin.video.dmax_de/resources/media/library.png | Bin 0 -> 2164 bytes .../resources/media/pin.png | Bin 7032 -> 7032 bytes plugin.video.dmax_de/resources/settings.xml | 4 + plugin.video.the.daily.show/addon.py | 30 +++- plugin.video.the.daily.show/addon.xml | 2 +- plugin.video.the.daily.show/changelog.txt | 4 + .../resources/language/English/strings.xml | 7 + 22 files changed, 466 insertions(+), 4 deletions(-) create mode 100644 plugin.video.dmax_de/.project create mode 100644 plugin.video.dmax_de/.pydevproject create mode 100644 plugin.video.dmax_de/.settings/org.eclipse.core.resources.prefs copy {plugin.video.7tv => plugin.video.dmax_de}/LICENSE.txt (100%) create mode 100644 plugin.video.dmax_de/addon.xml copy {plugin.video.7tv => plugin.video.dmax_de/bromixbmc}/LICENSE.txt (100%) create mode 100644 plugin.video.dmax_de/bromixbmc/__init__.py create mode 100644 plugin.video.dmax_de/bromixbmc/bromixbmc.py create mode 100644 plugin.video.dmax_de/changelog.txt create mode 100644 plugin.video.dmax_de/default.py create mode 100644 plugin.video.dmax_de/fanart.jpg create mode 100644 plugin.video.dmax_de/icon.png create mode 100644 plugin.video.dmax_de/resources/language/English/strings.xml create mode 100644 plugin.video.dmax_de/resources/language/German/strings.xml copy {plugin.video.7tv => plugin.video.dmax_de}/resources/media/highlight.png (100%) create mode 100644 plugin.video.dmax_de/resources/media/library.png copy {plugin.video.7tv => plugin.video.dmax_de}/resources/media/pin.png (100%) create mode 100644 plugin.video.dmax_de/resources/settings.xml hooks/post-receive -- Plugins ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ Xbmc-addons mailing list Xbmc-addons@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xbmc-addons