Trackers: horodatage discret de la dernière maj des données (cache 1h)
This commit is contained in:
@@ -64,6 +64,11 @@ async def build_context() -> dict:
|
||||
)
|
||||
|
||||
now = datetime.now(ZoneInfo(config.timezone))
|
||||
trk_ts = trackers.last_updated()
|
||||
trackers_updated = (
|
||||
datetime.fromtimestamp(trk_ts, ZoneInfo(config.timezone)).strftime("%Hh%M")
|
||||
if trk_ts else None
|
||||
)
|
||||
return {
|
||||
"width": config.width,
|
||||
"height": config.height,
|
||||
@@ -77,6 +82,7 @@ async def build_context() -> dict:
|
||||
"nas": nas_status,
|
||||
"codex": codex_status,
|
||||
"trackers": tracker_stats,
|
||||
"trackers_updated": trackers_updated,
|
||||
"kobo": kobo.current(),
|
||||
"updated": now.strftime("%H:%M"),
|
||||
"stale": False,
|
||||
|
||||
Reference in New Issue
Block a user