Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
v1.0.3-beta
Browse files Browse the repository at this point in the history
private streams now disabled/locked
  • Loading branch information
Torro committed Mar 6, 2017
1 parent 798a32d commit f258bec
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
21 changes: 15 additions & 6 deletions addon.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -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
}
}
)
Expand All @@ -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))

Expand Down
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.kdglive" name="KDG Live" version="1.0.2-beta" provider-name="Torro">
<addon id="plugin.video.kdglive" name="KDG Live" version="1.0.3-beta" provider-name="Torro">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.beautifulsoup" version="3.2.1"/>
Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Binary file added resources/media/iconPrivate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/media/thumbPrivate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f258bec

Please sign in to comment.