Skip to content

Commit

Permalink
Einzelupdate ardundzdf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rols1 committed Jun 23, 2024
1 parent 10996b9 commit c719878
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 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>205</nr> # Numerierung für Einzelupdate
# <nr>206</nr> # Numerierung für Einzelupdate
VERSION = '5.0.5'
VDATE = '23.06.2024'

Expand Down Expand Up @@ -262,18 +262,19 @@
if tci >= 5: # Thread nicht bei 0 od. 1 aktivieren
ID = "ard_streamlinks" # stellvertretend auch für zdf + iptv
dictfile = os.path.join(DICTSTORE, ID)
mtime = os.path.getmtime(dictfile)
now = int(time.time())
CacheLimit = tci * 86400
cache_diff = CacheLimit - int(now - mtime) # Sec-Abstand zum nächsten Ablaufdatum

PLog("streamcache_check: tci %d" % tci)
PLog("cache_diff: %d sec, %d days" % (cache_diff, int(cache_diff/86400)))

if cache_diff <= 43200: # Refresh bereits 12 Std. vor Ablauf möglich
PLog("CacheLimit_reached: %d" % int(now-CacheLimit))
bg_thread = Thread(target=EPG.thread_getstreamlinks, args=())
bg_thread.start()
if os.path.exists(dictfile):
mtime = os.path.getmtime(dictfile)
now = int(time.time())
CacheLimit = tci * 86400
cache_diff = CacheLimit - int(now - mtime) # Sec-Abstand zum nächsten Ablaufdatum

PLog("streamcache_check: tci %d" % tci)
PLog("cache_diff: %d sec, %d days" % (cache_diff, int(cache_diff/86400)))

if cache_diff <= 43200: # Refresh bereits 12 Std. vor Ablauf möglich
PLog("CacheLimit_reached: %d" % int(now-CacheLimit))
bg_thread = Thread(target=EPG.thread_getstreamlinks, args=())
bg_thread.start()

if SETTINGS.getSetting('pref_dl_cnt') == 'true': # laufende Downloads anzeigen
if os.path.exists(DL_CHECK) == False: # Lock beachten (Datei dl_check_alive)
Expand Down

0 comments on commit c719878

Please sign in to comment.