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…
Add yt-dlp to requirements so server-side downloads use the primary path
yt-dlp was not a declared dependency, so deployed servers fell straight to
the ffmpeg fallback (or failed entirely when neither was available).
Declaring it guarantees the download feature uses yt-dlp (progress,
quality selection, obfuscated-segment handling) with ffmpeg as fallback.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Fix .jpg-obfuscated HLS segments and adopt the mkissa provider
- m3u8_downloader: replace the ineffective -allowed_extensions ALL with
-extension_picky 0 so the ffmpeg fallback accepts CDNs that serve HLS
segments with a non-media extension (e.g. watching.onl's .jpg segments),
which previously failed every variant with "Output file does not contain
any stream".
- anivexa: swap the allmanga provider for mkissa (PROVIDER_PRIORITY,
nicknames, docstring, watch.js provider list, stream test, README) to
match the sidecar's v2.2.1 update.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Fix FFmpeg HLS download to handle non-standard segment extensions
- Add -allowed_extensions ALL to allow processing of HLS playlists with non-standard file extensions (e.g., .xls)
- Add -ignore_unknown and -err_detect ignore_err to handle corrupted/unknown stream types gracefully
- Add --ignore-errors and --no-check-certificates to yt-dlp for more resilient downloads
- Fix FFmpeg command structure to ensure headers are placed before input file
- Improve error logging with return codes and command details for debugging
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Route episode downloads through anivexa-proxy like stream playback
The downloader unwrapped proxied URLs and fetched the raw CDN directly,
which fails on deployments where the CDN only serves through the
anivexa-proxy worker. _build_download_target now mirrors /api/stream-proxy's
upstream routing (worker URL + x-stream-key when ANIVEXA_PROXY_URL is set,
direct CDN with browser headers otherwise) for both the stitch and the
quality probe.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
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>