Skip to content

Commit

Permalink
Merge pull request #28 from elring/master
Browse files Browse the repository at this point in the history
Oprava přehrávání pořadů bez popisu
Closes #27.
  • Loading branch information
kapitan-iglu committed May 21, 2019
2 parents f82f9b5 + e7fc766 commit 04cdb7b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
2019-05-20
* Oprava prehravani nekterych poradu bez popisu dilu
2019-05-01
* Oprava seznamu poradu
2019-03-14
Expand Down
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.dmd-czech.novaplus"
name="Nova Plus TV Archiv"
version="1.0.17"
version="1.0.18"
provider-name="Jiri Vyhnalek">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
Expand Down
13 changes: 7 additions & 6 deletions default.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,13 @@ def VIDEOLINK(url,name):

# zjisteni nazvu a popisu aktualniho dilu
article = doc.find('article', 'b-article b-article-main')
# nazev
name = article.find('h3').getText(" ").encode('utf-8')
desc = article.find('div', 'e-description').getText(" ").encode('utf-8')
# popis nemusi byt vzdy uveden
try:
desc = article.find('div', 'e-description').getText(" ").encode('utf-8')
except:
desc = ''

# nalezeni iframe
main = doc.find('main')
Expand All @@ -127,10 +132,6 @@ def VIDEOLINK(url,name):

thumb = re.compile('<meta property="og:image" content="(.+?)">').findall(httpdata)
thumb = thumb[0] if len(thumb) > 0 else ''
#desc = re.compile('<meta name="description" content="(.+?)">').findall(httpdata)
#desc = desc[0] if len(desc) > 0 else ''
#name = re.compile('<meta property="og:title" content="(.+?)">').findall(httpdata)
#name = name[0] if len(name) > 0 else '?'

renditions = re.compile('renditions: \[(.+?)\]').findall(httpdata)
if len(renditions) > 0:
Expand All @@ -142,7 +143,7 @@ def VIDEOLINK(url,name):

for num, url in enumerate(urls):
if num < len(renditions):
addLink(renditions[num] + ' - ' + name,url,thumb,desc)
addLink('[B]' + renditions[num] + ' - ' + name + '[/B]',url,thumb,desc)
else:
addLink(name,url,thumb,desc)
else:
Expand Down

0 comments on commit 04cdb7b

Please sign in to comment.