Skip to content

Commit

Permalink
Einzelupdate ardundzdf.py und EPG.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rols1 committed Aug 11, 2024
1 parent 09702c8 commit 82551b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
11 changes: 6 additions & 5 deletions ardundzdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# +++++ ARDundZDF - Addon Kodi-Version, migriert von der Plexmediaserver-Version +++++

# VERSION -> addon.xml aktualisieren
# <nr>214</nr> # Numerierung für Einzelupdate
# <nr>215</nr> # Numerierung für Einzelupdate
VERSION = '5.0.9'
VDATE = '11.08.2024'

Expand Down Expand Up @@ -6860,9 +6860,8 @@ def EPG_Search(title, query=""):
if r in EPG_SearchHits: # Doppel üblich bei Regionalsendern
PLog("skip_double: %s | %s" % (ID, starttime))
continue
EPG_SearchHits.append(r) # Treffer-Satz speichern
EPG_SearchHits.append(r) # Treffer-Sender-EPG speichern
PLog("query_found: %s | %s" % (query, r[3]))
PLog(str(r))
cnt=cnt+1

#-----------------------------------
Expand Down Expand Up @@ -6956,16 +6955,18 @@ def EPG_Search2(title, query=""):
PLog("wday: %s, img: %s" % (wday, img))


today_human = "%s, %s" % (day_human, up_low(wday[:2])) # Datum + Wochentag -> tagline, Titel
today_human = u"%s, %s" % (day_human, up_low(wday[:2])) # Datum + Wochentag -> tagline, Titel
tag = "[COLOR blue]%s[/COLOR] | [B]%s[/B] | zur Livesendung klicken" % (today_human, vonbis)
sender = py2_decode(sender)
summ = "%s | %s" % (sender, summ)
Plot = summ.replace("\n", "||")
title = "[COLOR blue]%s[/COLOR] | %s" % (day_human, sname) # Datum + Wochentag | Titel

PLog("Satz7:")
PLog(today_human);PLog(title);PLog(vonbis);PLog(summ[:40]);

title=py2_encode(title); summ=py2_encode(summ); sender_img=py2_encode(sender_img)
title=py2_encode(title); summ=py2_encode(summ); sender_img=py2_encode(sender_img)
Plot=py2_encode(Plot);
fparams="&fparams={'url': '%s', 'title': '%s', 'thumb': '%s', 'Plot': '%s', 'live': ''}" %\
(quote_plus(link), quote_plus(title), quote_plus(sender_img), quote_plus(Plot))
addDir(li=li, label=title, action="dirList", dirID="PlayVideo", fanart=sender_img, thumb=img,
Expand Down
8 changes: 4 additions & 4 deletions resources/lib/EPG.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
# Sendezeit: data-start-time="", data-end-time=""
#
# 20.11.2019 Migration Python3 Modul kodi_six + manuelle Anpassungen
# <nr>21</nr> # Numerierung für Einzelupdate
# Stand: 09.07.2024
# <nr>22</nr> # Numerierung für Einzelupdate
# Stand: 11.08.2024
#

from kodi_six import xbmc, xbmcgui, xbmcaddon
Expand Down Expand Up @@ -338,7 +338,7 @@ def EPG(ID, mode=None, day_offset=None, load_only=False):
EPG_dict = get_data_web(page, Dict_ID) # Web -> 2-dim-Array EPG_rec -> Dict
else: # EPG_rec = type list
EPG_dict = page
PLog(len(str(page)))
# PLog(len(str(page))) # codec-Error python2.*

# today.de verwendet Unix-Format, Bsp. 1488830442
now,today,today_5Uhr,nextday,nextday_5Uhr = get_unixtime(day_offset)# lokale Unix-Zeitstempel holen + Offsets
Expand All @@ -358,7 +358,7 @@ def EPG(ID, mode=None, day_offset=None, load_only=False):
# Indices EPG_rec: 0=starttime, 1=href, 2=img, 3=sname, 4=stime,
# 5=summ, 6=vonbis, 7=today_human, 8=endtime:
starttime=r[0]; href=r[1]; img=r[2]; sname=r[3]; # href=r[1] nicht verwendet
stime=r[4]; summ=r[5]; vonbis=r[6];today_human=r[7]; # today_human=r[8] noch leer
stime=r[4]; summ=r[5]; vonbis=r[6];today_human=r[7]; # today_human=r[7] noch leer
endtime=r[8];

s_start = datetime.datetime.fromtimestamp(int(starttime)) # Zeit-Konvertierung UTC-Startzeit
Expand Down

0 comments on commit 82551b5

Please sign in to comment.