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 Mar 5, 2023
1 parent 96e3cf9 commit 22cdf29
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Damit entfallen auch die Radio-Podcasts der Classic-Version. Sie werden durch di
Im Forum: https://www.kodinerds.net/index.php/Thread/64244-RELEASE-Kodi-Addon-ARDundZDF/
direkt: rols1@gmx.de

#### statt Handbuch: [Einstellungen des Addons](https://github.com/rols1/Kodi-Addon-ARDundZDF/wiki)
#### statt Handbuch: [Einstellungen des Addons - Wicki](https://github.com/rols1/Kodi-Addon-ARDundZDF/wiki)

Funktionen:
===================
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.6.3+matrix" provider-name="rols1 (rols1@gmx.de)">
<addon id="plugin.video.ardundzdf" name="ARDundZDF" version="4.6.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
23 changes: 12 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>89</nr> # Numerierung für Einzelupdate
VERSION = '4.6.3'
VDATE = '26.02.2023'
VERSION = '4.6.4'
VDATE = '05.03.2023'


# (c) 2019 by Roland Scholz, rols1@gmx.de
Expand Down Expand Up @@ -1065,8 +1065,6 @@ def AudioStart(title):
tag=''
if title == u"Entdecken":
tag = "die Startseite der Audiothek"
if title == u"Sport":
tag = "Achtung: Livestreams nicht aufnehmen. Stop im Addon nicht möglich!"
fparams="&fparams={'title': '%s', 'ID': '%s'}" % (title, title)
addDir(li=li, label=title, action="dirList", dirID="AudioStartHome", fanart=R(ICON_MAIN_AUDIO),
thumb=R(img), tagline=tag, fparams=fparams)
Expand Down Expand Up @@ -1744,6 +1742,8 @@ def Audio_get_items_single(item, ID=''):
#path = path.split("/")
#path = "".join(path[2:3])
attr = stringextract('"attribution":"', '"', item) # Sender, CR usw.
if attr:
attr = "Bild: %s" % attr

img = stringextract('image":', '},', item)
img = stringextract('"url":"', '"', img)
Expand Down Expand Up @@ -2426,12 +2426,12 @@ def AudioPlayMP3(url, title, thumb, Plot, ID=''):
addDir(li=li, label=title, action="dirList", dirID="PlayAudio", fanart=thumb, thumb=thumb, fparams=fparams,
summary=summary, mediatype='music')

download_list = [] # 2-teilige Liste für Download: 'title # url'
download_list.append("%s#%s" % (title, url))
PLog(download_list)
title_org=title; tagline_org=''; summary_org=Plot
li = test_downloads(li,download_list,title_org,summary_org,tagline_org,thumb,high=-1) # Downloadbutton
if ".icecastssl." not in url: # Livestreams ausschließen
download_list = [] # 2-teilige Liste für Download: 'title # url'
download_list.append("%s#%s" % (title, url))
PLog(download_list)
title_org=title; tagline_org=''; summary_org=Plot
li = test_downloads(li,download_list,title_org,summary_org,tagline_org,thumb,high=-1) # Downloadbutton

xbmcplugin.endOfDirectory(HANDLE, cacheToDisc=True)

Expand Down Expand Up @@ -4199,7 +4199,8 @@ def DownloadExtern(url, title, dest_path, key_detailtxt, sub_path=''):


if SETTINGS.getSetting('pref_generate_filenames') == 'true': # Dateiname aus Titel generieren
dfname = make_filenames(title.strip())
max_length = 255 - len(dest_path)
dfname = make_filenames(title.strip(), max_length)
else: # Bsp.: Download_20161218_091500.mp4 oder ...mp3
now = datetime.datetime.now()
mydate = now.strftime("%Y%m%d_%H%M%S")
Expand Down
16 changes: 15 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ CHANGE HISTORY
max_col 97
--------------

05.02.2023 4.6.4
SingleBeitrag (phoenix): Button ARDundZDF-Suche bei Youtube-Videos ergänzt,
Leitthema-Stil geändert (fett statt rot).
DownloadExtern (util): Länge Zielpfad berücksichtigt für max. Länge in
make_filenames.
yt_get (Modul yt): Info-Text mit Hinweis zur Downloadsperre ergänzt.
SearchARDundZDFnew: ARD-Suchpfad an ARDSearchnew angepasst (page.ardmediathek
-> api.ardmediathek).
ARDSearchnew: Blankbehandlung für Merkliste (' ' -> '+') entfernt.
Audio_get_items_single (Audiothek): Text "Bild: " in Param attr ergänzt.
Audiothek: Download Livestreams unterdrückt in AudioPlayMP3, Warnhinweis in
AudioStart entfernt.
ArteCluster (arte): Button "Programme in UHD-Qualität" in Startseite ergänzt.

26.02.2023 4.6.3
ARDStart (ARDnew): "Regionales"-Menü mit passenden Icons ergänzt.
GetContent (phoenix): Notification bei leerer Auswertung.
Expand All @@ -27,7 +41,7 @@ CHANGE HISTORY
search-system/mediathek, um Videos von Sendereihen zu erfassen (Bsp.
"2 für 300").
seconds_translate (util): Ausschluss Basis 1000 (Bsp. 864.0) - nötig
für umgestellte api-Suche.
für umgestellte ARD-api-Suche.
ARDSportMedia (ARD Sportschau.de): html-Tags in summary entfernt.
Verz. resources/lib/: Datei util.pyc gelöscht (Herkunft unklar).
JobStop (epgRecord): int-error abgefangen bei leerer Prozess-ID pid.
Expand Down
6 changes: 3 additions & 3 deletions resources/lib/ARDnew.py
Original file line number Diff line number Diff line change
Expand Up @@ -1977,6 +1977,7 @@ def SendungenAZ_ARDnew(title, button, href):
# Ablage in Dict nicht erf., Kodi-Cache ausreichend.
# 22.08.2019 myhash und erste pageNumber geändert durch ARD (0, vorher 1) - dto. in ARDSearchnew
# 27.06.2020 api-Codeanteile entfernt - s. SearchARDnew
# 01.03.2023 ARD-Suchpfad wie SearchARDundZDFnew (page.ardmediathek -> api.ardmediathek)
#
def SearchARDundZDFnew(title, query='', pagenr=''):
PLog('SearchARDundZDFnew:');
Expand Down Expand Up @@ -2023,7 +2024,7 @@ def SearchARDundZDFnew(title, query='', pagenr=''):
pageNumber = 0

query_lable = query_ard.replace('+', ' ')
path = 'https://page.ardmediathek.de/page-gateway/widgets/%s/search/vod?searchString=%s&pageNumber=%s' % (sender, query_ard, pageNumber)
path = 'https://api.ardmediathek.de/search-system/mediathek/%s/search/vods?query=%s&pageNumber=%s&pageSize=24' % (sender, query_ard, pageNumber)
page, msg = get_page(path,JsonPage=True)

vodTotal = stringextract('"totalElements":', '}', page) # Beiträge?
Expand Down Expand Up @@ -2164,7 +2165,7 @@ def ARDSearchnew(title, sender, offset=0, query=''):
Main_NEW(NAME)

query = query.strip()
query = query.replace(' ', '+') # Aufruf aus Merkliste unbehandelt
#query = query.replace(' ', '+') # für Merkliste - 01.03.2023 nicht mehr relevant
query_org = query
query=py2_decode(query) # decode, falls erf. (1. Aufruf)

Expand All @@ -2173,7 +2174,6 @@ def ARDSearchnew(title, sender, offset=0, query=''):

# ----------------------------------------------------- # Suchstring umgestellt, s.o.
PLog(query)
# path = 'https://page.ardmediathek.de/page-gateway/widgets/%s/search/vod?searchString=%s&pageNumber=%s' % (sender, query, offset)
path = 'https://api.ardmediathek.de/search-system/mediathek/%s/search/vods?query=%s&pageNumber=%s&pageSize=24' % (sender, query, offset)

page, msg = get_page(path,JsonPage=True)
Expand Down
20 changes: 17 additions & 3 deletions resources/lib/arte.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
################################################################################
# <nr>25</nr> # Numerierung für Einzelupdate
# Stand: 12.02.2023
# Stand: 05.03.2023

# Python3-Kompatibilität:
from __future__ import absolute_import # sucht erst top-level statt im akt. Verz.
Expand Down Expand Up @@ -908,12 +908,16 @@ def ArteCluster(pid='', title='', katurl=''):
PLog("ArteCluster: " + pid)
PLog(title); PLog(katurl);
title_org = title
ping_uhd = False
if katurl.startswith("/de/"):
katurl = "https://www.arte.tv" + katurl
katurl = "https://www.arte.tv" + katurl
PLog(katurl);
katurl_org=katurl

page = get_ArtePage('ArteCluster', title, path=katurl)
page = get_ArtePage('ArteCluster', title, path=katurl)
if katurl == "https://www.arte.tv/de/":
uhd_url = "https://www.arte.tv/de/videos/RC-022710/programme-in-uhd-qualitaet/"
ping_uhd = url_check(uhd_url, dialog=False)

try: # s.a. GetContent
page = page["pageProps"]["props"]["page"]["value"]
Expand Down Expand Up @@ -944,6 +948,16 @@ def ArteCluster(pid='', title='', katurl=''):
PLog('ArteStart_1:')
PLog(str(values)[:100])
li = home(li, ID='arte') # Home-Button

if ping_uhd: # UHD-Button
title = u"Programme in UHD-Qualität"
tag = "Folgeseiten"
title=py2_encode(title); uhd_url=py2_encode(uhd_url);
pid=""
fparams="&fparams={'pid': '%s', 'title': '%s', 'katurl': '%s'}" % (pid, quote(title), quote(uhd_url))
addDir(li=li, label=title, action="dirList", dirID="resources.lib.arte.ArteCluster",
fanart=R(ICON_ARTE), thumb=img_def, tagline=tag, fparams=fparams)

for item in values:
PLog(str(page)[:60])
tag=""; anz=""
Expand Down
5 changes: 3 additions & 2 deletions resources/lib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1386,9 +1386,10 @@ def RSave(fname, page, withcodec=False):
PLog(withcodec)
path = os.path.join(fname) # abs. Pfad
msg = '' # Rückgabe leer falls OK
maxLockloops = 10 # 1 sec bei 10 x xbmc.sleep(100)
maxLockloops = 10 # 1 sec bei 10 x xbmc.sleep(100)
max_length=255 # Länge Filename

LOCK = fname + ".lck"
LOCK = fname[:max_length-4] + ".lck"
i=0
while os.path.exists(LOCK):
i=i+1
Expand Down
1 change: 1 addition & 0 deletions resources/lib/yt.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def yt_get(url, vid, title, tag, summ, thumb):
title_org = title_org
summary_org = ''
tagline_org = repl_json_chars(tag)
title_org = "%s\n\n[B]Hinweis:[/B] Download seit 02/2023 nur noch für Audio (mp4a.40.2) möglich." % title_org
# PLog(summary_org);PLog(tagline_org);PLog(thumb);
li = ardundzdf.test_downloads(li,download_list,title_org,summary_org,tagline_org,thumb,high=0)

Expand Down

0 comments on commit 22cdf29

Please sign in to comment.