refactor: remove container selection, extract helpers, add logging and tests
All checks were successful
CI / build (push) Successful in 51s

- Remove container picker UI, keyboard, settings, and ContainerOptions
  entirely — yt-dlp handles container format automatically
- Remove Container field from DownloadJob struct and related references
- Extract buildFormatList helper to deduplicate format list building
  between handleURLInput and handleBackStep
- Break runDownload into trackDownloadProgress + handleDownloadCompletion
- Add HTTP timeout (30s) to downloadFile helper
- Log applyQuota and AddHistory errors instead of discarding
- Log nil stepState warnings in all handler entry points
- Include job.StderrLog in download failure messages
- Add tests for buildFormatList, findFormatByID, determineMediaType,
  and buildFormatString
- Update README with search, DRM fallback, and quota feature docs
- Remove unused strings import from keyboard.go
This commit is contained in:
2026-06-25 23:41:26 +03:30
parent dfe946a41b
commit 37e7f918d0
10 changed files with 266 additions and 296 deletions

View File

@@ -5,16 +5,18 @@ Telegram bot for downloading media from any site yt-dlp supports.
## Features
- Download audio, video, or combined audio+video from YouTube, Spotify, SoundCloud, Vimeo, and hundreds more
- Search support: search YouTube/YouTube Music by name when no URL is provided
- DRM fallback: automatically searches YouTube when Spotify/DRM-protected content is detected
- Thumbnail preview with metadata (title, uploader, duration) before download
- Audio-only sites (Spotify, SoundCloud, YouTube Music, etc.) auto-detect and skip to audio quality selection
- Multi-step format selection: media type, quality, language, container
- Multi-step format selection: quality, secondary format (audio/video combine), language
- Playlist support with paginated entry selection (10 per page, select all, confirm with count)
- Download progress updates (every 5% with speed and ETA)
- Download progress updates (with speed and ETA)
- Cancel downloads at any time (terminates yt-dlp process)
- Per-user quota system (daily, weekly, monthly)
- User preferences (default quality, container, language)
- Download history
- Configurable file size limit
- Per-user quota system (daily, weekly, monthly; 0 = unlimited)
- User preferences (default audio/video quality, language)
- Download history with pagination
- Configurable file size limit (default 50 MB)
- Cookies support for age-restricted content
- Proxy support via HTTP_PROXY/HTTPS_PROXY env vars
- Webhook and polling modes