mirror of
https://github.com/alexta69/metube.git
synced 2026-07-23 13:22:48 +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:
+17
-1
@@ -717,7 +717,7 @@ class SubscriptionManager:
|
|||||||
entries = [ent for ent in entries if _is_media_entry(ent)]
|
entries = [ent for ent in entries if _is_media_entry(ent)]
|
||||||
|
|
||||||
etype = (info or {}).get("_type") or "video"
|
etype = (info or {}).get("_type") or "video"
|
||||||
if etype == "video" or not entries:
|
if etype == "video":
|
||||||
async with self._lock:
|
async with self._lock:
|
||||||
cur = self._subs.get(sid)
|
cur = self._subs.get(sid)
|
||||||
if cur:
|
if cur:
|
||||||
@@ -732,6 +732,22 @@ class SubscriptionManager:
|
|||||||
log.warning("Subscription %s no longer resolves to a subscribable feed", sub.name)
|
log.warning("Subscription %s no longer resolves to a subscribable feed", sub.name)
|
||||||
await self.notifier.subscription_updated(sub)
|
await self.notifier.subscription_updated(sub)
|
||||||
return
|
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:
|
async with self._lock:
|
||||||
cur = self._subs.get(sid)
|
cur = self._subs.get(sid)
|
||||||
|
|||||||
Reference in New Issue
Block a user