YouTube: enrich dates on ANY channel page open (not just followed)
Bug from the logs: opening MrBeast showed only '2026: 3, Earlier: 87' because the InnerTube date enrichment only fired for FOLLOWED channels — MrBeast was opened, not followed, so it never ran and the page had only RSS dates (and RSS includes Shorts that don't match the Videos tab → ~3 real matches). Now opening any channel page enqueues enrichment, so its full catalog gets dated in the background and the years populate via the existing re-poll. (24h gate still prevents re-sweeping; the enqueue still no-ops under tests.)
This commit is contained in:
parent
59dafff96a
commit
b5586d3f28
1 changed files with 7 additions and 6 deletions
|
|
@ -164,12 +164,13 @@ def register_routes(bp):
|
||||||
return jsonify({"success": False, "error": "Channel not found"}), 404
|
return jsonify({"success": False, "error": "Channel not found"}), 404
|
||||||
cid = channel["youtube_id"]
|
cid = channel["youtube_id"]
|
||||||
following = bool(db.channel_watch_state([cid]))
|
following = bool(db.channel_watch_state([cid]))
|
||||||
if following: # opening a followed channel → ensure its dates get enriched
|
# Opening a channel page → enrich its upload dates in the background
|
||||||
try:
|
# (followed or not — you're looking at it, so you want the years).
|
||||||
from core.video.youtube_enrichment import get_youtube_date_enricher
|
try:
|
||||||
get_youtube_date_enricher().enqueue(cid, channel.get("title"))
|
from core.video.youtube_enrichment import get_youtube_date_enricher
|
||||||
except Exception:
|
get_youtube_date_enricher().enqueue(cid, channel.get("title"))
|
||||||
pass
|
except Exception:
|
||||||
|
pass
|
||||||
# backfill the real avatar onto wished rows (flat listing often omits it)
|
# backfill the real avatar onto wished rows (flat listing often omits it)
|
||||||
if channel.get("avatar_url"):
|
if channel.get("avatar_url"):
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue