fix: show bitrate for audio-only formats, filter subtitle languages, improve feedback
All checks were successful
CI / build (push) Successful in 50s
All checks were successful
CI / build (push) Successful in 50s
- Prioritize IsAudioOnly check in formatLabelForDisplay so bitrate is shown instead of yt-dlp's generic 'audio only' resolution - Only collect languages from formats with audio/video to prevent subtitle-only tracks from triggering the language selection prompt - Show 'Fetching metadata...' message before GetMediaInfo and edit with results, improving UX for URL input - Add test coverage for audio-only format labels
This commit is contained in:
@@ -194,6 +194,18 @@ func TestFormatLabelForDisplay(t *testing.T) {
|
||||
f: domain.Format{ID: "137"},
|
||||
want: "137",
|
||||
},
|
||||
{
|
||||
f: domain.Format{IsAudioOnly: true, Bitrate: "128k", Filesize: 1048576, Resolution: "audio only"},
|
||||
want: "128k (1.0MB)",
|
||||
},
|
||||
{
|
||||
f: domain.Format{IsAudioOnly: true, Bitrate: "128k", Resolution: "audio only"},
|
||||
want: "128k",
|
||||
},
|
||||
{
|
||||
f: domain.Format{IsAudioOnly: true, ID: "140", Extension: "m4a", Filesize: 1048576, Resolution: "audio only"},
|
||||
want: "140 (m4a) (1.0MB)",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
got := formatLabelForDisplay(tt.f)
|
||||
|
||||
Reference in New Issue
Block a user