feat: add thumbnail preview, audio-only detection, /download command, tests, and bugfixes

- Add thumbnail preview with metadata (title, uploader, duration) before download
- Auto-detect audio-only sites (Spotify, SoundCloud, etc.) and skip type selection
- Add /download command for feature parity with UI button
- Fix yt-dlp defer bug: StatusFailed was overwritten to StatusCompleted
- Fix handleURLInput using editText with msgID=0 (now uses sendWithKB)
- Fix filename detection: use job ID prefix for reliable file finding
- Fix double answerCb between handleBackStep and handleDownloadPrompt
- Fix runDownload unused msgID parameter
- Fix context for download goroutine (use context.Background)
- Remove unused startWebhook h parameter
- Remove dead buildToggleKeyboard function
- Add formatBytes, formatDuration, formatLabelForDisplay tests
- Add IsAudioOnlyContent, MediaType.String tests
- Add repo integration tests (users, preferences, quotas, history, delete)
- Add cmd/bot tests (parseAllowedUsers, env helpers)
- Add edge case tests for progress parser
- Add zero/negative safety guard in formatDuration
- Add .gitea, TODO.md, opencode.json to gitignore
This commit is contained in:
2026-06-25 15:07:31 +03:30
parent 05fcdf7458
commit cd27b4d28d
15 changed files with 631 additions and 64 deletions

View File

@@ -1,14 +1,16 @@
# uptodownbot
Telegram bot for downloading media from supported sites using yt-dlp.
Telegram bot for downloading media from any site yt-dlp supports.
## Features
- Download audio, video, or combined audio+video from any site yt-dlp supports
- Download audio, video, or combined audio+video from YouTube, Spotify, SoundCloud, Vimeo, and hundreds more
- 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
- Playlist support with paginated entry selection (10 per page)
- Download progress updates (every 5%)
- Cancel downloads at any time
- Playlist support with paginated entry selection (10 per page, select all, confirm with count)
- Download progress updates (every 5% 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
@@ -21,11 +23,12 @@ Telegram bot for downloading media from supported sites using yt-dlp.
## Commands
- `/start` - Show main menu
- `/download` - Prompt for a download URL
- `/settings` - Open settings
- `/help` - Show help text
- `/history` - View download history
Just send a URL to start downloading.
You can also send a URL directly to start downloading immediately.
## Configuration