mirror of
https://github.com/alexta69/metube.git
synced 2026-07-17 16:47:30 +00:00
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:
parent
5315630ab0
commit
ad90609c9b
1 changed files with 17 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue