Skip to content

Commit

Permalink
Änderungen / Korrekturen siehe changelog.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
rols1 committed Jul 9, 2022
1 parent 7f989ed commit be67cad
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 10 deletions.
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.ardundzdf" name="ARDundZDF" version="4.4.3+matrix" provider-name="rols1 (rols1@gmx.de)">
<addon id="plugin.video.ardundzdf" name="ARDundZDF" version="4.4.4+matrix" provider-name="rols1 (rols1@gmx.de)">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.kodi-six" />
Expand Down
13 changes: 10 additions & 3 deletions ardundzdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@

# VERSION -> addon.xml aktualisieren
# <nr>61</nr> # Numerierung für Einzelupdate
VERSION = '4.4.3'
VDATE = '02.07.2022'
VERSION = '4.4.4'
VDATE = '09.07.2022'


# (c) 2019 by Roland Scholz, rols1@gmx.de
Expand Down Expand Up @@ -2969,13 +2969,17 @@ def ARDSportCluster(title, path, img, cacheID, cluster=''):
for item in items:
tag=''
title = stringextract('__headline">', '</', item)
title_org = title
topline = stringextract('__topline">', '</', item)
topline = topline.strip()

PLog("title: " + title) # wie stage2
title = cleanhtml(title); title = title.strip()
PLog(title)
title = unescape(title); title = repl_json_chars(title)

tag = "[B]%s[/B]" % topline
tag = "%s\nFolgeseiten" % tag
tag = unescape(tag);

title=py2_encode(title); path=py2_encode(path);
img=py2_encode(img); cluster=py2_encode(cluster);
Expand All @@ -2993,6 +2997,7 @@ def ARDSportCluster(title, path, img, cacheID, cluster=''):
found=False
title = stringextract('__headline">', '</', item)
title = cleanhtml(title); title = title.strip()
title = unescape(title); title = repl_json_chars(title)

if title in headline:
PLog("found_cluster: " + headline)
Expand Down Expand Up @@ -3092,6 +3097,7 @@ def ARDSportMedia(li, title, page):

title = stringextract('__headline">', '</', item) # html-Bereich
summ = stringextract('__shorttext">', '</', item) # html-Bereich, fehlt im json-Bereich
title=title.replace('"', '')
title=repl_json_chars(title); summ=repl_json_chars(summ);
title=title.strip(); summ=summ.strip()

Expand Down Expand Up @@ -3120,6 +3126,7 @@ def ARDSportMedia(li, title, page):
data = stringextract('class="mediaplayer', '"MediaPlayer', item) # von slider abgrenzen
if data:
player,live,title,mp3_url,stream_url,img,tag,summ,Plot = ARDSportMediaPlayer(li, data)
title=repl_json_chars(title)

if title in skip_list: # Doppel in Blöcken möglich
continue
Expand Down
9 changes: 9 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ CHANGE HISTORY
max_col 97
--------------

09.07.2022 4.4.4
StreamsShow: Check auf Setting 'pref_use_downloads' für LibreElec 10.0
erforderlich (Error setLabel=None in addDir).
ARDSportCluster: Fix Quotes und unerlaubte Zeichen in Titel.
KIKA (Modul childs): Umsetzung neue Seite MausLive ("MausLive hören",
"MausZoom - Kindernachrichten", "MausLive zum Nachhören"), neue Funktionen
MausLive, Maus_Audiobooks, Maus_MediaObjects.
ARDSportMedia: %5C in Titel (Hochkommata) entfernt repl_json_chars(title).

02.07.2022 4.4.3
Suchwortliste (ARD+ZDF): Erweiterung mit Tool-Funktionen zeigen/löschen/
hinzufügen, neue Funktionen: SearchWordTools + SearchWordWork, Anpassung
Expand Down
3 changes: 1 addition & 2 deletions resources/lib/ARDnew.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,7 @@ def ARDStart(title, sender, widgetID='', path=''):
PLog(len(page))
page = page.replace('\\"', '*') # quotierte Marks entf.


container = blockextract ('compilationType":', page) # Container json-Bereich (Swiper + Rest)
container = blockextract ('compilationType":', page) # widgets-Container json (Swiper + Rest)
PLog(len(container))
title_list=[] # für Doppel-Erkennung

Expand Down
9 changes: 6 additions & 3 deletions resources/lib/childs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
################################################################################
#
# <nr>5</nr> # Numerierung für Einzelupdate
# Stand: 05.06.2022
# Stand: 08.06.2022

# Python3-Kompatibilität:
from __future__ import absolute_import # sucht erst top-level statt im akt. Verz.
Expand Down Expand Up @@ -84,6 +84,7 @@
MAUSLIVE = "https://www.wdrmaus.de//_teaserbilder/720913_512.jpg"
MAUSZOOM = "https://www.wdrmaus.de//_teaserbilder/720893_512.jpg"
MAUSRELIVE = "https://www.wdrmaus.de//_teaserbilder/721363_512.jpg"
MAUSHEAR = "https://www1.wdr.de/mediathek/audio/sendereihen-bilder/maus_sendereihenbild_podcast-1-100~_v-original.jpg"

# Github-Icons zum Nachladen aus Platzgründen,externe Nutzung: ZDFRubriken (GIT_ZDFTIVI)
GIT_KIKA = "https://github.com/rols1/PluginPictures/blob/master/ARDundZDF/KIKA_tivi/tv-kika.png?raw=true"
Expand Down Expand Up @@ -443,12 +444,12 @@ def MausLive():
path = "https://kinder.wdr.de/radio/player/radioplayer-die-maus-100~_layout-popupVersion.html"
page1, msg = get_page(path)
pos = page1.find('wdrrCurrentShowTitleTitle')
mp3_img = MAUSHEAR
if pos < 0:
mp3_img = MAUSLIVE
sendung = "Maus-Stream abspielen"
else:
sendung = stringextract('wdrrCurrentShowTitleTitle">', '</', page1[pos:])
mp3_img = stringextract('img src="', '"', page1[pos:])


mediaObj = stringextract('mediaObj":{"url":"', '"', page1) # -> deviceids-medp.wdr.de (json)
PLog("mediaObj: " + mediaObj)
Expand Down Expand Up @@ -522,6 +523,8 @@ def Maus_Audiobooks(title, url):
title = stringextract("<title>", "</title>", item)
mp3_url = stringextract('<enclosure url="', '"', item)
mp3_img = stringextract('href="', '"', item) # itunes:image href="..
if mp3_img == '': # kann fehlen
mp3_img = MAUSZOOM
dur = stringextract("<duration>", "</itunes:duration>", item)
descr = stringextract("summary>", "</itunes:summary>", item)
pubDate = stringextract("<pubDate>", "</pubDate>", item)
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ def repl_char(cut_char, line): # problematische Zeichen in Text entfernen, wenn
def repl_json_chars(line): # für json.loads (z.B.. in router) json-Zeichen in line entfernen
line_ret = line
#PLog(type(line_ret))
for r in ((u'"', u''), (u'\\', u''), (u'\'', u'')
for r in ((u'"', u''), (u'\\', u''), (u'\'', u''), (u'%5C', u'')
, (u'&', u'und'), ('(u', u'<'), (u'(', u'<'), (u')', u'>'), (u'∙', u'|')
, (u'„', u'>'), (u'“', u'<'), (u'”', u'>'),(u'°', u' Grad'), (u'u00b0', u' Grad')
, (u'\r', u''), (u'#', u'*'), (u'u003e', u''), (u'❤', u'love') # u'u003e' -> u'®'
Expand Down

0 comments on commit be67cad

Please sign in to comment.