summaryrefslogtreecommitdiff
path: root/plugin.video.spurs-tv
diff options
context:
space:
mode:
authorLS80 <github@lee-smith.me.uk>2016-03-19 19:06:50 +0000
committerLS80 <github@lee-smith.me.uk>2016-03-19 19:06:50 +0000
commit13a9dfd387307fe9f8e03917b818f435d86ba203 (patch)
treec2c3fb1b6b8e0ec2d771022c470642d3808a137a /plugin.video.spurs-tv
parenta345f73e0c9ca17991c27b888582978526b3cc25 (diff)
[plugin.video.spurs-tv] 2.8.0
Diffstat (limited to 'plugin.video.spurs-tv')
-rw-r--r--plugin.video.spurs-tv/addon.xml2
-rw-r--r--plugin.video.spurs-tv/changelog.txt4
-rw-r--r--plugin.video.spurs-tv/fanart.jpgbin72100 -> 67144 bytes
-rw-r--r--plugin.video.spurs-tv/resources/lib/youtube.py19
4 files changed, 17 insertions, 8 deletions
diff --git a/plugin.video.spurs-tv/addon.xml b/plugin.video.spurs-tv/addon.xml
index 0f7354c..ac4cd98 100644
--- a/plugin.video.spurs-tv/addon.xml
+++ b/plugin.video.spurs-tv/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.spurs-tv" name="Spurs TV" version="2.7.0" provider-name="Leopold">
+<addon id="plugin.video.spurs-tv" name="Spurs TV" version="2.8.0" provider-name="Leopold">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
<import addon="script.module.xbmcswift2" version="2.4.0" optional="false"/>
diff --git a/plugin.video.spurs-tv/changelog.txt b/plugin.video.spurs-tv/changelog.txt
index 821c259..eb15e42 100644
--- a/plugin.video.spurs-tv/changelog.txt
+++ b/plugin.video.spurs-tv/changelog.txt
@@ -1,3 +1,7 @@
+2.8.0
+ - Fixed YouTube playlists
+ - Updated fanart
+
2.7.0
- Kodi Krypton is now a requirement
- Use Rollbar for automatically reporting errors
diff --git a/plugin.video.spurs-tv/fanart.jpg b/plugin.video.spurs-tv/fanart.jpg
index 7505ca0..49bdbb4 100644
--- a/plugin.video.spurs-tv/fanart.jpg
+++ b/plugin.video.spurs-tv/fanart.jpg
Binary files differ
diff --git a/plugin.video.spurs-tv/resources/lib/youtube.py b/plugin.video.spurs-tv/resources/lib/youtube.py
index 2b222a6..a4c64e2 100644
--- a/plugin.video.spurs-tv/resources/lib/youtube.py
+++ b/plugin.video.spurs-tv/resources/lib/youtube.py
@@ -19,13 +19,18 @@ def _get_items(resource, key="channel", id=CHANNEL_ID, max_results=50, order='da
qs = QS_FMT.format(key, id, max_results, query, order)
url = urlunparse((SCHEME, HOST, os.path.join(PATH, resource), None, qs, None))
response = json.loads(requests.get(url).text)
-
+
for item in response['items']:
snippet = item['snippet']
- thumbnail = snippet['thumbnails']['high']['url']
title = snippet['title']
+ if title == "Private video":
+ continue
+ try:
+ thumbnail = snippet['thumbnails']['high']['url']
+ except KeyError:
+ thumbnail = None
published_at = utils.date_from_str(snippet['publishedAt'].split('T')[0], "%Y-%m-%d")
-
+
try:
id = item['id']['videoId'] # search result
except TypeError:
@@ -50,11 +55,11 @@ def get_latest():
def get_search_results(query):
return _get_items("search", query=query)
-
-
+
+
if __name__ == "__main__":
- for playlist_id, title, thumbnail in get_playlists():
+ for playlist_id, title, thumbnail, published_at in get_playlists():
print
print title
- for item_id, title, thumbnail in get_playlist_items(playlist_id):
+ for item_id, title, thumbnail, published_at in get_playlist_items(playlist_id):
print '\t', title