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 Apr 16, 2023
1 parent c1a38c3 commit cd2abbd
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 330 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.6.8+matrix" provider-name="rols1 (rols1@gmx.de)">
<addon id="plugin.video.ardundzdf" name="ARDundZDF" version="4.6.9+matrix" provider-name="rols1 (rols1@gmx.de)">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.kodi-six" />
Expand Down
42 changes: 31 additions & 11 deletions ardundzdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@

# VERSION -> addon.xml aktualisieren
# <nr>94</nr> # Numerierung für Einzelupdate
VERSION = '4.6.8'
VDATE = '10.04.2023'
VERSION = '4.6.9'
VDATE = '16.04.2023'


# (c) 2019 by Roland Scholz, rols1@gmx.de
Expand Down Expand Up @@ -2805,7 +2805,7 @@ def ARDSportWDR():
addDir(li=li, label=title, action="dirList", dirID="ARDSportLive", fanart=img, thumb=img,
fparams=fparams, tagline=tag)


'''
title = u"Event: [B]NORDISCHE SKI-WM[/B]" # Großevent
tag = u"Alles zur Nordischen Ski-WM in Planica."
cacheID = "Sport_SkiWM"
Expand All @@ -2816,7 +2816,8 @@ def ARDSportWDR():
(quote(title), quote(path), quote(img), cacheID)
addDir(li=li, label=title, action="dirList", dirID="ARDSportCluster", fanart=img, thumb=img,
fparams=fparams, tagline=tag)

'''

title = u"Event-Archiv" # Buttons für ältere Events
tag = u"Archiv für zurückliegende Groß-Events."
img = logo
Expand Down Expand Up @@ -2864,6 +2865,17 @@ def ARDSportWDRArchiv():
li = xbmcgui.ListItem()
li = home(li, ID='ARD') # Home-Button

title = u"Event: [B]NORDISCHE SKI-WM[/B]" # Großevent
tag = u"Alles zur Nordischen Ski-WM in Planica."
cacheID = "Sport_SkiWM"
img = "https://images.sportschau.de/image/237354e3-b9b2-46bf-993a-8ecc48947e7f/AAABhol6U80/AAABg8tMRzY/20x9-1280/constantin-schmid-150.webp"
path = "https://www.sportschau.de/wintersport/nordische-ski-wm"
title=py2_encode(title); path=py2_encode(path); img=py2_encode(img);
fparams="&fparams={'title': '%s', 'path': '%s', 'img': '%s', 'cacheID': '%s'}" %\
(quote(title), quote(path), quote(img), cacheID)
addDir(li=li, label=title, action="dirList", dirID="ARDSportCluster", fanart=img, thumb=img,
fparams=fparams, tagline=tag)

title = u"Event: [B]Handball-WM 2023 in Polen und Schweden[/B]" # Großevent
tag = u"Nachrichten, Berichte, Interviews und Ergebnisse zur Handball-WM 2023 in Polen und Schweden mit dem DHB-Team."
cacheID = "Sport_WMHandball"
Expand Down Expand Up @@ -3502,6 +3514,10 @@ def ARDSportMediaPlayer(li, item):
if duration == "0 sec":
duration = "unbekannt"

avail = stringextract('av_original_air_time":"', '"', cont)
if avail:
verf = time_translate(avail)

chapter = stringextract('chapter1":"', '"', cont)
creator = stringextract('creator":"', '"', cont)
genre = stringextract('_genre":"', '"', cont)
Expand All @@ -3521,6 +3537,8 @@ def ARDSportMediaPlayer(li, item):
PLog("duration: " + duration)
if live == False and duration:
tag = "%s | Dauer %s" % (tag, duration)
if verf:
tag = u"%s | Verfügbar ab [B]%s[/B]" % (tag, verf)

tag = "%s\n%s | %s | %s | %s" % (tag, chapter, creator, genre, geo)

Expand All @@ -3529,7 +3547,7 @@ def ARDSportMediaPlayer(li, item):
Plot = tag.replace("\n", "||")

PLog("Satz31:")
PLog(player); PLog(live); PLog(title); PLog(mp3_url); PLog(stream_url);
PLog(player); PLog(live); PLog(title); PLog(mp3_url); PLog(stream_url); PLog(avail);

return player, live, title, mp3_url, stream_url, img, tag, summ, Plot

Expand Down Expand Up @@ -8371,7 +8389,7 @@ def ZDFRubrikSingle(title, path, clus_title='', page='', ID='', custom_cluster='

else: # Einzelbeitrag direkt - anders als A-Z (ZDF_get_content)
if SETTINGS.getSetting('pref_load_summary') == 'true': # Inhaltstext im Voraus laden?
# get_summary_pre in ZDF_get_teaserDetails bereits erledigt
# get_summary_pre in ZDF_get_teaserDetails bereits erledigt?
if teaserDetails == '':
skip_verf=False; skip_pubDate=False # beide Daten ermitteln
summ_txt = get_summary_pre(path, 'ZDF', skip_verf, skip_pubDate)
Expand Down Expand Up @@ -8663,7 +8681,7 @@ def ZDF_get_teaserDetails(page, NodePath='', sophId=''):
skip_verf=False; skip_pubDate=False # Teaser enth. beide Daten
summ_txt = get_summary_pre(path, 'ZDF', skip_verf, skip_pubDate)
PLog(len(summ_txt));
if summ_txt and len(summ_txt) > len(descr):
if len(summ_txt) > len(descr):
descr= summ_txt

PLog('title: %s, path: %s, img_src: %s, descr: %s, dauer: %s, enddate: %s, isvideo: %s' %\
Expand Down Expand Up @@ -8997,7 +9015,7 @@ def International(title):
# ZDF_Search, ZDFSportLive, Tivi_Search (Modul childs).
# Blockbereich für VERPASST erweitert (umfasst data-station)
# 08.01.2021 Anpassung an geänderte Formate bei Hochkant-Videos.
# mark: farbige Markierung in title (wie ARDSearchnew -> get_page_content)
# mark: farbige Markierung in title (wie ARDSearchnew -> get_json_content)
#
def ZDF_get_content(li, page, ref_path, ID=None, sfilter='Alle ZDF-Sender', skip_list='', mark=''):
PLog('ZDF_get_content:'); PLog(ref_path); PLog(ID); PLog(sfilter);
Expand Down Expand Up @@ -9392,7 +9410,7 @@ def ZDF_get_content(li, page, ref_path, ID=None, sfilter='Alle ZDF-Sender', skip
skip_verf = True
summ_txt = get_summary_pre(plusbar_path, 'ZDF', skip_verf, skip_pubDate)
PLog(len(summary));PLog(len(summ_txt));
if summ_txt and len(summ_txt) > len(summary):
if len(summ_txt) > len(summary):
tag_par= "%s\n\n%s" % (tagline, summ_txt)
tag_par = tag_par.replace('\n', '||')
summary = summ_txt
Expand Down Expand Up @@ -9425,7 +9443,7 @@ def ZDF_get_content(li, page, ref_path, ID=None, sfilter='Alle ZDF-Sender', skip
# fname: Dateinamen der Liste (full_shows_ZDF, full_shows_ARD)
# Rückgabe: fett-markierter Titel bei entspr. Beitrag, sonst unbeh.
# Titel
# Aufrufer: ZDF_get_content, get_page_content (ARDnew)
# Aufrufer: ZDF_get_content, get_json_content (ARDnew)
#
def full_shows(title, title_samml, summary, duration, fname):
PLog('full_shows:')
Expand Down Expand Up @@ -9463,6 +9481,7 @@ def full_shows(title, title_samml, summary, duration, fname):
PLog("duration: " + duration)
title = title.strip()

ret = "nofill" # Return-Flag
for show in shows:
st, sdur = show.split("|") # Bsp. Querbeet|40
#PLog(duration); PLog(st); PLog(sdur); # PLog(up_low(st) in up_low(title));
Expand All @@ -9474,8 +9493,9 @@ def full_shows(title, title_samml, summary, duration, fname):
PLog("sdur: " + sdur)
if int(duration) >= int(sdur):
title = "[B]%s[/B]" % title
ret = "fill"
break
PLog("return: " + title)
PLog("%s_return: %s" % (ret, title))
return title
#-----------------------------------------------------------------------
# class="b-playerbox in page auswerten (1 od. mehrere)
Expand Down
14 changes: 14 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ CHANGE HISTORY
max_col 97
--------------

16.04.2023 4.6.9
Audio_get_items_single (Audiothek): Fix img-Auswertung (fehlte: '"').
get_page_content (ARD): neues Blockmerkmal nach ARD-Änderung (images).
seconds_translate (util): str(seconds) ergänzt für json-Werte.
ARDnew: Auswertung umgestellt (get_page_content -> get_json_content) für
ARDSearchnew, ARDStartRubrik, ARDRubriken, SendungenAZ_ARDnew, ARDStart,
ARDStartRegion, MainNEW, ARDVerpasstContent, ARDStartSingle.
menu_hub (TagesschauXL): get_page_content -> get_json_content
get_foruminfo (tools): Anpassung Forum-Hinweis an Forum-Update.
get_summary_pre (util): Code für ARDClassic entfernt (obsolet).
ARDSportWDR: Event NORDISCHE SKI-WM -> "Event-Archiv.
ARDSportMediaPlayer (ARDSportWDR): Datum Stream-Verfügbarkeit in Player-
Daten ergänzt (weggefallen in html-Quellen).

09.04.2023 4.6.8
get_forms (funk): Anpassung int/float für Bandbreite , Sortierung via
lambda-Funktion, Abgleich für Sofortststart umgestellt auf Auflösung
Expand Down
Loading

0 comments on commit cd2abbd

Please sign in to comment.