- Add video_quality, as_document, audio_format, and file_button to user settings schema and Alembic migrations.
- Categorize /settings into Media & Quality, Appearance & Buttons, and Chat & Clean-up with dynamic back navigation.
- Implement strict document delivery with disable_content_type_detection=True to prevent Telegram video player fallback when as_document is ON.
- Add multi-photo ZIP archive packaging for photo carousels in as_document mode.
- Differentiate DB media file cache entries between video and document types (url#document vs url#video) to eliminate cache collisions.
- Hide redundant Download File inline button when as_document setting is active.
- Remove obsolete referral system (/ref command and links).
Scope download queue limits by user and chat so the same user can run downloads across multiple chats without tripping a shared pending cap.
Also coalesce concurrent single-media requests by cache key so duplicate links wait for the first upload and then reuse the cached Telegram file_id instead of downloading the same file again.
What changed:
- unified inline media delivery across TikTok, Instagram, Pinterest, SoundCloud, YouTube, and Twitter around a single editable-message flow with chosen-inline auto start and callback fallback
- added reusable inline request state/services, service icons, album deep links, and single-message inline progress/edit helpers
- enabled inline support for regular YouTube videos, Twitter inline media, and Twitter multi-photo album deep links; aligned Pinterest/Instagram/TikTok inline behaviors
- cleaned dead duplicated inline code, extracted shared inline request guards, and expanded tests around TikTok, Pinterest, SoundCloud, and YouTube handlers
- optimized project setup with trimmed runtime requirements, requirements-dev split, .dockerignore, Docker/compose improvements, and README updates
- rebuilt logging with structured context-aware adapters, request scoped flow decorators, JSONL event/perf logs, queue/download/cobalt timing events, and safer extra field sanitization to avoid LogRecord key collisions
- add Pinterest handler via Cobalt with inline support and tests
- extract reusable Cobalt media helpers and inline album deeplink storage
- add public reusable album deep-links handled from /start without default welcome
- unify inline photo/album copy in user messages and ensure Powered by MaxLoad captions
- add single-photo inline behavior with info keyboard across Instagram/TikTok/Pinterest
- include related stats/service wiring updates and regression tests
- Introduced a new `ResilientDownloader` class in `utils/download_manager.py` for improved download handling with support for HTTP range requests, retries, and resumable downloads.
- Updated `youtube.py` to replace the previous download logic with the new downloader, enhancing performance and reliability.
- Removed the old `download_manager.py` and `http_client.py` services, consolidating functionality into the `utils` directory.
- Adjusted download methods to log metrics and handle errors more effectively.
- Increased the maximum file size limit for downloads to 1.5 GB to accommodate larger media files.
- Improved handling of YouTube streams, including better fallback mechanisms for downloading media.
- Updated inline query handling for YouTube Shorts to use the new downloader.