Skip to content

Commit

Permalink
changes see changelog.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
rols1 committed Jan 21, 2024
1 parent 0415d1f commit acb8a92
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 98 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Funktionen:
- 3Sat
- ~~funk~~ - entfernt ab Mai 2023 (Videos in ZDF-funk, Podcasts in der ARD-Audiothek verfügbar)
- Kinderprogramme (z.Z. KIKA und ZDFtivi)
- TagesschauXL
- TagesschauXL (https://www.tagesschau.de/ und https://www.ardmediathek.de/tagesschau24)
- phoenix (https://www.phoenix.de/ und https://www.ardmediathek.de/phoenix)
- Arte-Kategorien
- "Zuletzt gesehen"-Funktion (im Tools-Menü)
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.ardundzdf" name="ARDundZDF" version="4.9.4+nexus" provider-name="rols1 (rols1@gmx.de)">
<addon id="plugin.video.ardundzdf" name="ARDundZDF" version="4.9.5+nexus" provider-name="rols1 (rols1@gmx.de)">
<requires>
<import addon="xbmc.python" version="3.0.1"/>
<import addon="script.module.kodi-six" />
Expand Down
8 changes: 4 additions & 4 deletions ardundzdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@

# VERSION -> addon.xml aktualisieren
# <nr>171</nr> # Numerierung für Einzelupdate
VERSION = '4.9.4'
VDATE = '19.01.2024'
VERSION = '4.9.5'
VDATE = '21.01.2024'


# (c) 2019 by Roland Scholz, rols1@gmx.de
Expand Down Expand Up @@ -7015,7 +7015,7 @@ def SenderLiveListe(title, listname, fanart, offset=0, onlySender=''):
EPG_ID_old = '' # Doppler-Erkennung
sname_old=''; stime_old=''; summ_old=''; vonbis_old='' # dto.
summary_old=''; tagline_old=''
for element in liste: # Senderliste mit Links, ev. EPG (Setting)
for element in liste: # Senderliste mit Links, ev. EPG (Setting)
img_streamlink=''; # Austausch Icon
linkid="" # ARD-Sender
element = py2_decode(element)
Expand Down Expand Up @@ -7059,7 +7059,7 @@ def SenderLiveListe(title, listname, fanart, offset=0, onlySender=''):
for line in iptv_streamlinks:
PLog("iptvline: " + line[:40])
items = line.split('|')
if up_low(title_sender) in up_low(items[0]):
if up_low(title_sender) == up_low(items[0]):
link = items[1]
if items[2]: # Icon aus IPTVSource?
img_streamlink = items[2]
Expand Down
21 changes: 21 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@ CHANGE HISTORY
max_col 97
--------------

21.01.2024 4.9.5
ARDStartSingle: Ausfilterung .ts-Link bei Streamquellen (Link o. Zertifikat).
AddonStartlist: sub_path, seekPos und video_dur in Param-Liste ergänzt, Anpas-
sung STARTLIST in PlayVideo und monitor_resume, Ausschluss von Livestreams,
Anpassung Modul playlist (items_add_rm: start_item.split begrenzt).
ShowSeekPos (util): Stop des ARD-Livestream-Monitors bei Playerende ergänzt.
seconds_translate (util): Sendungsdauer an Kodi angepasst (Format 00:00:00
statt vorher 00:00), Anpassung time_to_minutes.
AudioSenderPrograms (Audiothek): Auswertung Kategorie im 1. id-Block (2. Block
fehlt nach ARD-Änderung).
Audiothek: Erweiterung der api-Url mit "&order=descending", Anpassung in
Audio_get_sendung, Audio_get_sendung_api, Audio_get_search_cluster,
Audio_get_cluster_single, Audio_get_homescreen.
GetContent (arte): Fix gegen Rekursion bei Seiten mit "Alle Videos", Ergänzung
arte_lang.json, Param ignore_pid in ArteCluster (ArteStart_2).
Modul TagesschauXL: Nutzung des Moduls ARDnew für die tagesschau-Menüs,
einschl. tagesthemen und Bericht aus Berlin, Param live=true für Webplayer-
Streams bei eingeschalteter Zuletzt-gesehen-Liste.
TV-Livestreams: Umstellung Deutsche Welle auf IPTV-Links (in ARD-Mediathek
nicht mehr verfügbar), nur EN-Version funktionsfähig.

07.01.2024 4.9.4
PlayVideo_Direct (Modul util): Absicherung Default_Url bei nur 1 Element in
HLS-List.
Expand Down
16 changes: 16 additions & 0 deletions resources/arte_lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,22 @@
"pl": "Większy wybór strumieni bez <Sofortstart>!",
"it": "Più selezione di flussi senza avvio <Sofortstart>!"
},
{
"de": "Rekursion",
"fr": "Récursion",
"en": "Recursion",
"es": "Recursión",
"pl": "Rekursja",
"it": "Ricorsione"
},
{
"de": "zurück zur Liste",
"fr": "retour à la liste",
"en": "back to list",
"es": "volver a la lista",
"pl": "powrót do listy",
"it": "torna all'elenco"
},
{
"de": "",
"fr": "",
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/ARDnew.py
Original file line number Diff line number Diff line change
Expand Up @@ -2626,7 +2626,7 @@ def ARDSearchnew(title, sender, offset=0, query='', homeID=""):
def ARDVerpasst(title, CurSender="", homeID=""):
PLog('ARDVerpasst: ' + CurSender);
PLog(homeID)

if CurSender == "":
CurSender = ARD_CurSender() # init s. Modulkopf
sendername, sender, kanal, img, az_sender = CurSender.split(':')
Expand Down
94 changes: 12 additions & 82 deletions resources/lib/TagesschauXL.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@

NAME = 'ARD und ZDF'
BASE_URL = 'https://www.tagesschau.de'
ARD_Last = 'https://www.tagesschau.de/multimedia' # ARD_100,ARD_Last,ARD_20Uhr,ARD_Gest,ARD_tthemen,ARD_Nacht
ARD_bab = 'https://api.ardmediathek.de/page-gateway/widgets/ard/asset/Y3JpZDovL2Rhc2Vyc3RlLmRlL2JlcmljaHQgYXVzIGJlcmxpbg?pageNumber=0&pageSize=12'
ARD_Fakt = 'https://www.tagesschau.de/faktenfinder' # 30.04.2023
Podcasts_Audios = 'https://www.tagesschau.de/multimedia/audio'
ARD_Investigativ='https://www.tagesschau.de/investigativ' # 10.06.2021
Expand Down Expand Up @@ -178,11 +176,11 @@ def Main_XL():
for t in T_List:
title, thumb, pid = t.split("|")
PLog(title); PLog(thumb); PLog(pid)
tag = "neu ab 20.01.2024"
title = "[B]%s[/B]" % title
tag = u"neu ab 20.01.2024 (mit allen von der ARD angebotenen Stream-Qualitäten)"
fparams="&fparams={'title': '%s', 'pid': '%s'}" % (quote(title), pid)
addDir(li=li, label=title, action="dirList", dirID="resources.lib.TagesschauXL.XL_Tagesschau",
fanart=ICON_MAINXL, thumb=thumb, tagline=tag, fparams=fparams, mediatype="")


# --------------------------------- # -> get_VideoAudio -> get_content_json
title = 'Investigativ'
Expand Down Expand Up @@ -217,8 +215,8 @@ def Main_XL():
xbmcplugin.endOfDirectory(HANDLE, cacheToDisc=True)

# ----------------------------------------------------------------------
# 20.01.2024 neu
#
# 20.01.2024 umgestellt auf api.ardmediathek.de
# Aufruf Main_XL
def XL_Tagesschau(title, pid):
PLog("XL_Tagesschau:")
PLog(title); PLog(pid);
Expand All @@ -241,79 +239,6 @@ def XL_Tagesschau(title, pid):

xbmcplugin.endOfDirectory(HANDLE, cacheToDisc=True)

# ----------------------------------------------------------------------
# 01.02.2021 Seitenlayout der Nachrichtenseiten durch ARD geändert, Videoquellen
# nun auf der Webseite als quoted json eingebettet, Direktsprung zu XLGetSourcesHTML
# entfällt - Auswertung nun über vorgeschaltete Funktion XL_LastSendung ->
# XLGetSourcesJSON
# 15.04.2023 get_page_content -> get_content_json
#
def menu_hub(title, path, ID, show=""):
PLog('menu_hub : + ID')
PLog(title); PLog(path);

page, msg = get_page(path=path)
if page == '':
msg1 = "Fehler in menu_hub:"
msg2 = msg
MyDialog(msg1, msg2, '')
return
page = py2_decode(page)

# Direktsprünge zu Url der Live-Sendungseiten -> XL_LastSendung
if ID=='ARD_100' or ID=='ARD_Last' or ID=='ARD_20Uhr' or ID=='ARD_Gest' or ID=='ARD_tthemen':
XL_LastSendung(title, page, show=show)
return

#
if ID == 'ARD_bab': # 14.02.2023 umgestellt auf api.ardmediathek.de
mark=''; ID="XL_menu_hub"
li = xbmcgui.ListItem()
li = home(li, ID='TagesschauXL') # Home-Button
li = get_json_content(li, page, ID, mark) # -> ARDnew


xbmcplugin.endOfDirectory(HANDLE, cacheToDisc=True)

# ----------------------------------------------------------------------
# menu_hub, ID's: ARD_100, ARD_Last, ARD_20Uhr, ARD_Gest, ARD_tthemen,ARD_Nacht
# Seitenaufbau identisch, die Videoquellen befinden sich im Abschnitt
# data-ts_component='ts-mediaplayer' als quoted json
# letzte Sendung ist doppelt - von der 1. Variante werden nur die Themen
# erfasst (-> summ)
#
# ----------------------------------------------------------------------
def XL_LastSendung(title, page, show=""):
PLog('XL_LastSendung:'); PLog(show);
title_org = title

li = xbmcgui.ListItem()
li = home(li, ID='TagesschauXL') # Home-Button

mediatype='' # Kennz. Video für Sofortstart
if SETTINGS.getSetting('pref_video_direct') == 'true':
mediatype='video'

items = blockextract('class="v-instance" data-v="', page)
PLog(len(items))


for item in items:
typ,av_typ,title,tag,summ,img,stream = get_content_json(item)
live="" # z.B. tagesschau live
if up_low("live") in up_low(title):
live = "true"
if title.startswith(show):
title=py2_encode(title); stream=py2_encode(stream);
summ=py2_encode(summ); img=py2_encode(img);

fparams="&fparams={'url': '%s', 'title': '%s', 'thumb': '%s', 'Plot': '%s', 'live': '%s'}" %\
(quote(stream), quote(title), quote(img), quote(summ), live)
addDir(li=li, label=title, action="dirList", dirID="PlayVideo",
fanart=img, thumb=img, tagline=summ, fparams=fparams, mediatype=mediatype)

xbmcplugin.endOfDirectory(HANDLE, cacheToDisc=True)

# ----------------------------------------------------------------------
# Bildcluster der Webseite listen (Wetterbilder, Bilder des Tages..)
# Bilder entweder in json eingebettet (data-v=..) oder in html-tags
Expand Down Expand Up @@ -705,6 +630,8 @@ def XL_Live(ID=''):

# ----------------------------------------------------------------------
# json-Daten im data-v-Block
# 20.01.2024 live=true verhindert Stream-Blockade der 480p-Webplayer-Streams
# bei eingeschalteter Zuletzt-gesehen-Liste
#
def get_VideoAudio(title, path): # Faktenfinder
PLog('get_VideoAudio: ' + path)
Expand Down Expand Up @@ -742,10 +669,13 @@ def get_VideoAudio(title, path): # Faktenfinder
(quote(stream), quote(title), quote(img), quote_plus(summ), ID)
addDir(li=li, label=title, action="dirList", dirID="ardundzdf.AudioPlayMP3", fanart=img, thumb=img,
fparams=fparams, tagline=tag, summary=summ, mediatype=mediatype)


live=""
if SETTINGS.getSetting('pref_startlist') == 'true': # Blockade verhindern, s. Kopf
live="true"
if typ == "video": # Video
fparams="&fparams={'url': '%s', 'title': '%s', 'thumb': '%s', 'Plot': '%s'}" % (quote(stream),
quote(title), quote(img), quote_plus(summ))
fparams="&fparams={'url': '%s', 'title': '%s', 'thumb': '%s', 'Plot': '%s', 'live': '%s'}" %\
(quote(stream), quote(title), quote(img), quote_plus(summ), live)
addDir(li=li, label=title, action="dirList", dirID="ardundzdf.PlayVideo", fanart=img, thumb=img,
fparams=fparams, tagline=tag, summary=summ, mediatype=mediatype)

Expand Down
8 changes: 4 additions & 4 deletions resources/lib/strm.py
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ def show_strm_element(strmpath):

#--------------------
if SETTINGS.getSetting('pref_skip_played_strm') == 'true': # Abgleich PlayCount in Video-DB
# Felder MyVideos*.db: kodi.wiki/view/Databases/MyVideos
# Tabs/Felder MyVideos*.db: kodi.wiki/view/Databases/MyVideos
surl = quote_plus(url)
try:
cur.execute("SELECT strFilename, PlayCount FROM files WHERE strFilename like ?", ('%'+surl+'%',))
Expand Down Expand Up @@ -1174,8 +1174,8 @@ def exist_in_library(title):

hit_list=[]
for movie in movies:
if "Prima Klima" in str(movie): # Debug
PLog(str(movie))
#if "Prima Klima" in str(movie): # Debug
# PLog(str(movie))
label = movie["label"] # hier Markierungen beibehalten
#PLog(label) # Debug
if title in label:
Expand All @@ -1190,7 +1190,7 @@ def exist_in_library(title):
msg1 = "Abgleich Video"
msg2 = "Video nicht in MyVideos-Datenbank"
icon = R('Dir-video.png')
xbmcgui.Dialog().notification(msg1,msg2,icon,5000,sound=True)
xbmcgui.Dialog().notification(msg1,msg2,icon,3000,sound=True)
return

# Verzicht auf playcount (hier nur relevant für Bibliothek, nicht für Abrufe im
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3532,7 +3532,7 @@ def PlayVideo(url, title, thumb, Plot, sub_path=None, playlist='', seekTime=0, M
line = Dict("load", 'Rekurs_check', CacheTime=10) # Dict-Abgleich url/Laufzeit
PLog(line)
oldurl=''
if line != False: # False, falls fehlend
if line != False: # Rekursions-Check erforderlich
oldurl, old_dur, old_now = line.split('||')
if oldurl and oldurl in url:
now = time.time();
Expand Down
29 changes: 25 additions & 4 deletions resources/livesenderTV.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<nr>48</nr>
<thumbnail></thumbnail>
<credits>Grafiken @Arauco (Plex-Forum)</credits>
<date>16.01.2024 rols</date>
<date>21.01.2024 rols</date>
<ARDsource></ARDsource>
<ZDFsource>https://www.zdf.de/live-tv</ZDFsource>
<info>Senderübersicht TVToday: https://www.tvtoday.de/programm/standard/sender/ Button:Alle Sender</info>
Expand Down Expand Up @@ -142,11 +142,32 @@
<item>
<title>Deutsche Welle</title>
<hrefsender>Deutsche Welle</hrefsender>
<link>ARDSource</link>
<thumbnail>tv-deutsche-welle.png</thumbnail>
<tvg-name>Deutsche Welle</tvg-name>
<link>IPTVSource|/jnk22/kodinerds-iptv/blob/master/iptv/kodi/kodi.m3u</link>
<thumbnail>tvg-logo</thumbnail>
<imgsource></imgsource>
<EPG_ID>DWTV</EPG_ID>
<date>11.04.2021</date>
<date>21.01.2024</date>
</item>
<item>
<title>Deutsche Welle+</title>
<hrefsender>Deutsche Welle+</hrefsender>
<tvg-name>Deutsche Welle+</tvg-name>
<link>IPTVSource|/jnk22/kodinerds-iptv/blob/master/iptv/kodi/kodi.m3u</link>
<thumbnail>tvg-logo</thumbnail>
<imgsource></imgsource>
<EPG_ID>DWTV</EPG_ID>
<date>21.01.2024</date>
</item>
<item>
<title>Deutsche Welle (EN)</title>
<hrefsender>Deutsche Welle (EN)</hrefsender>
<tvg-name>Deutsche Welle (EN)</tvg-name>
<link>IPTVSource|/jnk22/kodinerds-iptv/blob/master/iptv/kodi/kodi.m3u</link>
<thumbnail>tvg-logo</thumbnail>
<imgsource></imgsource>
<EPG_ID>DWTV</EPG_ID>
<date>21.01.2024</date>
</item>
</items>
</channel>
Expand Down

0 comments on commit acb8a92

Please sign in to comment.