feat: add auto-select from preferences and type picker
All checks were successful
CI / build (push) Successful in 52s

- Add MediaTypeAsk (0) as the default, mapping old video_audio to Ask
- Show Video/Audio/Ask type picker when no default media type is set
- Auto-select matching format and skip picker when defaults are configured
- Add autoSelectVideoFormat / autoSelectAudioFormat helpers with closest-match
- Add buildFilteredFormatList for type-filtered format lists
- Add Media Type setting in settings UI (Ask/Video/Audio)
- Add --merge-output-format mp4 for video downloads via yt-dlp
- Fix formatLabelForDisplay to show Height fallback and Extension
- Add cookies volume mount to docker-compose.yml
- Document cookies setup and new features in README
This commit is contained in:
2026-06-28 11:28:53 +03:30
parent 6bbc87a7c8
commit b11b5649a5
12 changed files with 578 additions and 18 deletions

View File

@@ -250,6 +250,11 @@ func (c *Client) StartDownload(job *domain.DownloadJob, downloadDir string) (<-c
outputPath := filepath.Join(downloadDir, job.ID+"_%(id)s.%(ext)s")
args = append(args, "--output", outputPath)
// Remux to mp4 for video output — Telegram-friendly container.
if job.MediaType != domain.MediaTypeAudio {
args = append(args, "--merge-output-format", "mp4")
}
// --progress forces progress output in non-TTY (pipe) environments
// --newline uses \n instead of \r so bufio.Scanner can read line-by-line
args = append(args, "--progress", "--newline")