feat: add auto-select from preferences and type picker
All checks were successful
CI / build (push) Successful in 52s
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:
@@ -6,13 +6,16 @@ import "os/exec"
|
||||
type MediaType int
|
||||
|
||||
const (
|
||||
MediaTypeAudio MediaType = iota + 1
|
||||
MediaTypeAsk MediaType = iota
|
||||
MediaTypeAudio
|
||||
MediaTypeVideo
|
||||
MediaTypeVideoAudio
|
||||
)
|
||||
|
||||
func (m MediaType) String() string {
|
||||
switch m {
|
||||
case MediaTypeAsk:
|
||||
return "ask"
|
||||
case MediaTypeAudio:
|
||||
return "audio"
|
||||
case MediaTypeVideo:
|
||||
|
||||
@@ -10,7 +10,7 @@ func TestMediaTypeString(t *testing.T) {
|
||||
{MediaTypeAudio, "audio"},
|
||||
{MediaTypeVideo, "video"},
|
||||
{MediaTypeVideoAudio, "video_audio"},
|
||||
{MediaType(0), "unknown"},
|
||||
{MediaTypeAsk, "ask"},
|
||||
{MediaType(99), "unknown"},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
|
||||
Reference in New Issue
Block a user