Skip to content

Commit

Permalink
Einzelupdate ardundzdf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rols1 committed May 16, 2023
1 parent 1a5d3cf commit b110e27
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions ardundzdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
# VERSION -> addon.xml aktualisieren
# <nr>105</nr> # Numerierung für Einzelupdate
VERSION = '4.7.2'
VDATE = '15.05.2023'
VDATE = '16.05.2023'


# (c) 2019 by Roland Scholz, rols1@gmx.de
Expand Down Expand Up @@ -6930,6 +6930,8 @@ def ZDF_PageMenu(DictID, jsonObject="", urlkey="", mark="", li="", homeID=""):
fparams="&fparams={}"
addDir(li=li, label=title, action="dirList", dirID="resources.lib.childs.Kikaninchen_Menu",
fanart=KIKA_START, thumb=GIT_KANINCHEN, tagline='für Kinder 3-6 Jahre', fparams=fparams)
if "Zahlen zur" in title: # Wahlbeiträge, Statistiken
PLog("skip_externalUrl: " + title)

else:
fparams="&fparams={'url': '%s', 'title': '%s', 'homeID': '%s'}" % (url, title, homeID)
Expand Down Expand Up @@ -6991,6 +6993,7 @@ def ZDF_PageMenu(DictID, jsonObject="", urlkey="", mark="", li="", homeID=""):
if typ != "teaserPromo":
fparams="&fparams={'path': '%s', 'title': '%s', 'DictID': '%s', 'homeID': '%s'}" %\
(path, title, DictID, homeID)
PLog("fparams: " + fparams)
addDir(li=li, label=title, action="dirList", dirID="ZDF_Rubriken",
fanart=img, thumb=img, tagline=tag, summary=descr, fparams=fparams)
else: # teaserPromo - s.o.
Expand Down Expand Up @@ -7078,6 +7081,7 @@ def ZDF_RubrikSingle(url, title, homeID=""):
PLog('ZDF_RubrikSingle: ' + title)
PLog("url: " + url)
title_org = title
noicon = R(ICON_MAIN_ZDF) # notific.

page=""; AZ=False
if url.endswith("sendungen-100"): # AZ ca. 12 MByte -> Dict
Expand All @@ -7094,7 +7098,7 @@ def ZDF_RubrikSingle(url, title, homeID=""):
page = json.loads(page)
Dict("store", "ZDF_sendungen-100", page)

if "dict" in str(type(page)): # AZ: json
if "dict" in str(type(page)): # AZ: json
jsonObject = page
else:
jsonObject = json.loads(page)
Expand All @@ -7108,7 +7112,15 @@ def ZDF_RubrikSingle(url, title, homeID=""):
return
PLog(str(clusterObject)[:80])
PLog("Cluster: %d " % len(clusterObject))


if len(clusterObject) == 0: # z.B. Wahltool, ohne Videos
msg1 = u"%s" % title
msg2 = u'keine Videos gefunden'
xbmcgui.Dialog().notification(msg1,msg2,noicon,2000,sound=True)
return

#--------------------------------

li = xbmcgui.ListItem()
if homeID:
li = home(li, ID=homeID)
Expand Down Expand Up @@ -7172,7 +7184,13 @@ def ZDF_RubrikSingle(url, title, homeID=""):
else: # einzelner Cluster
teaserObject, msg = GetJsonByPath("0|teaser", clusterObject)
PLog("walk_teaser: %d" % len(teaserObject))
PLog("Teaser: %d " % len(teaserObject))
PLog("Teaser: %d " % len(teaserObject))

if len(teaserObject) == 0: # z.B. redakt. Updates zu Ereignissen
msg1 = u"%s" % title
msg2 = u'keine Videos gefunden'
xbmcgui.Dialog().notification(msg1,msg2,noicon,2000,sound=True)
return

for entry in teaserObject:
typ,title,tag,descr,img,url,stream,scms_id = ZDF_get_content(entry)
Expand Down Expand Up @@ -7904,7 +7922,8 @@ def ZDF_FlatListEpisodes(sid):
#----------------------------------------------
# Ermittlung Streamquellen für api-call, ähnlich build_Streamlists
# aber abweichendes Quellformat
# Aufrufer: ZDF_FlatListEpisodes
# Aufrufer: ZDF_FlatListEpisodes, ab V4.7.0 auch ZDF_PageMenu,
# ZDF_Rubriken, ZDF_RubrikSingle, ZDF_Verpasst.
# Mitnutzung get_form_streams wie get_formitaeten sowie
# build_Streamlists_buttons
# gui=False: ohne Gui, z.B. für ZDF_getStrmList
Expand Down Expand Up @@ -8708,9 +8727,11 @@ def build_Streamlists_buttons(li,title_org,thumb,geoblock,Plot,sub_path,\
img=thumb;
PLog(title_org); PLog(tagline[:60]); PLog(img); PLog(sub_path);

uhd_cnt_hb = str(HBBTV_List).count("UHD_") # UHD-Kennz. -> Titel ZDF+3sat
uhd_cnt_hls = str(HLS_List).count("UHD_") # Arte
uhd_cnt_mp4 = str(MP4_List).count("UHD_")
PLog(str(HBBTV_List))

uhd_cnt_hb = str(HBBTV_List).count("UHD") # UHD-Kennz. -> Titel ZDF+3sat
uhd_cnt_hls = str(HLS_List).count("UHD") # Arte
uhd_cnt_mp4 = str(MP4_List).count("UHD")
PLog("uhd_cnt: %d, %d, %d" % (uhd_cnt_hb, uhd_cnt_hls, uhd_cnt_mp4))

title_hb = "[B]HBBTV[/B]-Formate"
Expand Down

0 comments on commit b110e27

Please sign in to comment.