diff --git a/README.md b/README.md index f40180e..c84e953 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ KDG Live: Kijk en luister kerkdienstgemist.nl livestreams met Kodi. Installatie ----------- -Download [plugin.video.kdglive.zip](https://github.com/Torro/plugin.video.kdglive/releases/download/1.0.2-beta/plugin.video.kdglive.zip) en installeer de add-on in Kodi op de wijze die uw voorkeur heeft; bijvoorbeeld: +Download [plugin.video.kdglive.zip](https://github.com/Torro/plugin.video.kdglive/releases/download/1.0.3-beta/plugin.video.kdglive.zip) en installeer de add-on in Kodi op de wijze die uw voorkeur heeft; bijvoorbeeld: 1. Selecteer in het Kodi hoofdmenu: 1. **`Systeem`** :arrow_heading_down: diff --git a/addon.py b/addon.py index 4b7ed10..d23fe8b 100644 --- a/addon.py +++ b/addon.py @@ -1,14 +1,18 @@ +# This Python file uses the following encoding: utf-8 import sys import urllib +import urllib2 import urlparse import xbmcgui import xbmcplugin -import urllib2 from bs4 import BeautifulSoup base_url = sys.argv[0] addon_handle = int(sys.argv[1]) args = urlparse.parse_qs(sys.argv[2][1:]) +mediapath = sys.path[0] + '/resources/media/' +iconprivate = mediapath + 'iconPrivate.png' +thumbprivate = mediapath + 'thumbPrivate.png' def build_url(query): @@ -40,7 +44,7 @@ def parseKDGLive(pagelist): {treeindex: {'Name': broadcast.h3.a.string.encode('utf-8'), 'url': broadcast.h3.a['href'], - 'Status': broadcast.span.string + 'Status': broadcast.find_all('span')[2].string } } ) @@ -56,13 +60,18 @@ def buildServicesList(broadcast_tree): for broadcast in broadcast_tree: li = xbmcgui.ListItem(label=broadcast_tree[broadcast]['Name']) - li.setProperty('IsPlayable', 'true') url = build_url( {'mode': 'stream', 'url': broadcast_tree[broadcast]['url'], - 'title': broadcast_tree[broadcast]['Name'] - } - ) + 'title': broadcast_tree[broadcast]['Name']}) + + if broadcast_tree[broadcast]['Status'] is not None: + li.setLabel('(Privé) ' + li.getLabel()) + li.setProperty('IsPlayable', 'false') + li.setArt({'icon': iconprivate, + 'thumb': thumbprivate}) + else: + li.setProperty('IsPlayable', 'true') broadcast_list.append((url, li, False)) diff --git a/addon.xml b/addon.xml index cf7e024..73daab0 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/changelog.txt b/changelog.txt index c0abdf9..dcd2f0c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +v1.0.3-beta +- Streams which require registration are disabled + v1.0.2-beta - Dropped Requests module dependency due to SSL/TLS bug diff --git a/resources/media/iconPrivate.png b/resources/media/iconPrivate.png new file mode 100644 index 0000000..0910331 Binary files /dev/null and b/resources/media/iconPrivate.png differ diff --git a/resources/media/thumbPrivate.png b/resources/media/thumbPrivate.png new file mode 100644 index 0000000..79bfacf Binary files /dev/null and b/resources/media/thumbPrivate.png differ