refactor: redesign format selection with unified list and independent audio/video picking
All checks were successful
CI / build (push) Successful in 52s

- Replace type/quality selection flow with unified format list (video+audio combined)
- Add independent audio/video format picking: video-only formats prompt for audio track,
  audio-only formats offer optional video addition (skip when content is audio-only)
- Fix formatKeyboard to use format IDs as callback data instead of display labels
- Remove dead mediaTypeKeyboard function
- Fix double-close panic in readProgress (caller is sole owner of updates channel)
- Add FormatString field to DownloadJob for composite format specs (e.g. '137+140')
- Change quota calculation from sum of all format sizes to max single format size
- Fix 'Delete all data' button to use danger style with proper text
- Clean up routePrefixedCallback: remove type_/quality_, add format_/secondary_ routes
- Fix back navigation to rebuild format IDs list
This commit is contained in:
2026-06-25 15:37:47 +03:30
parent 7de79b50e1
commit e65ade6c3c
7 changed files with 286 additions and 198 deletions

View File

@@ -61,8 +61,8 @@ func parseProgressLine(line string) *progressUpdate {
}
// readProgress reads yt-dlp stderr and sends progress updates to the channel.
// The caller is responsible for closing the updates channel.
func readProgress(stderr io.ReadCloser, updates chan<- *domain.DownloadJob, job *domain.DownloadJob) {
defer close(updates)
scanner := bufio.NewScanner(stderr)
for scanner.Scan() {
line := scanner.Text()