Activity model (user_activity.py):
- Ignore pings from obvious bots so the feed reflects real humans
- Merge a logged-in user's anonymous doc by exact anonymous_id only (never
by shared NAT IP, which could tag another visitor as the logged-in user)
- Count distinct active visitors via aggregation so count matches the feed
- Track page views (on navigation) and accumulated online time per visitor
- New activity_history collection (5-min buckets, 7-day TTL) powering admin
trend charts; dedup-aware queries with field-length caps and graceful
Mongo failures so presence tracking never breaks a page
- Fix naive/aware datetime bug that made every second+ ping fail silently,
keeping last_seen stale (visitors would drop out of "active" after 5 min)
Routes + dashboard:
- Rate-limit /api/activity/ping, pass User-Agent through for bot filtering
- /api/activity/trend endpoint (admin) and enriched /api/admin/dashboard
with registered/guest split, top pages, and 24h trend
- Admin dashboard…
Wire up episode downloads with live progress, quality picker, and cancel
Implements the previously documented but never-wired M3U8 download flow:
server-side stitching to a single MP4 via yt-dlp/ffmpeg with a background
worker, token-based status polling, and file serving with cleanup. The watch
page download button now supports direct provider links, a quality picker fed
by probing the HLS master playlist, a live progress percentage during
stitching, a completion summary card, and mid-download cancellation that
kills the subprocess.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Add self-hosted image upscaler for crisp HD/4K spotlight art
AniList caps covers at 460x690 and banners at 1900x400, and free upscale
CDNs block s4.anilist.co, so the home page hero looked blurry. Add an
/api/img proxy that upscales with Pillow (LANCZOS + unsharp) and caches on
disk, and route spotlight backdrop images through it via a new hd_img
filter.
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Anime details pages now get their info from AniList GraphQL (characters,
voice actors, relations, recommendations, trailer) with Jikan as fallback,
so they keep working when Jikan/MAL is down. Watch-page server pills get
fun nicknames (Zenith, Kaiju, Tenka, Maki, ...) rendered server-side and
in the client display-name map.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>