Don't mark a subscription as broken just because all entries are filtered out as they have already been downloaded

This happens if archive.txt is used
This commit is contained in:
Markus Lanthaler 2026-07-08 22:54:33 +00:00
parent 5315630ab0
commit ad90609c9b

View file

@ -717,7 +717,7 @@ class SubscriptionManager:
entries = [ent for ent in entries if _is_media_entry(ent)]
etype = (info or {}).get("_type") or "video"
if etype == "video" or not entries:
if etype == "video":
async with self._lock:
cur = self._subs.get(sid)
if cur:
@ -732,6 +732,22 @@ class SubscriptionManager:
log.warning("Subscription %s no longer resolves to a subscribable feed", sub.name)
await self.notifier.subscription_updated(sub)
return
if not entries:
async with self._lock:
cur = self._subs.get(sid)
if cur:
previous = copy.deepcopy(cur)
cur.last_checked = time.time()
cur.error = None
try:
self._save_locked()
except Exception:
self._subs[sid] = previous
raise
sub = cur
log.warning("Subscription check finished for %s: No entries found", sub.name)
await self.notifier.subscription_updated(sub)
return
async with self._lock:
cur = self._subs.get(sid)