From 69c2f310c2ad2011da6bf258466b922ffda4613c Mon Sep 17 00:00:00 2001 From: PikuZheng Date: Fri, 7 Jun 2024 10:35:04 +0800 Subject: [PATCH] add flac format for audio --- app/dl_formats.py | 2 +- ui/src/app/app.component.ts | 2 +- ui/src/app/formats.ts | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/dl_formats.py b/app/dl_formats.py index 51bfc67..2ae0968 100644 --- a/app/dl_formats.py +++ b/app/dl_formats.py @@ -1,6 +1,6 @@ import copy -AUDIO_FORMATS = ("m4a", "mp3", "opus", "wav") +AUDIO_FORMATS = ("m4a", "mp3", "opus", "wav", "flac") def get_format(format: str, quality: str) -> str: diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts index 350bbed..29af8ee 100644 --- a/ui/src/app/app.component.ts +++ b/ui/src/app/app.component.ts @@ -113,7 +113,7 @@ export class AppComponent implements AfterViewInit { } isAudioType() { - return this.quality == 'audio' || this.format == 'mp3' || this.format == 'm4a' || this.format == 'opus' || this.format == 'wav'; + return this.quality == 'audio' || this.format == 'mp3' || this.format == 'm4a' || this.format == 'opus' || this.format == 'wav' || this.format == 'flac'; } getMatchingCustomDir() : Observable { diff --git a/ui/src/app/formats.ts b/ui/src/app/formats.ts index 81afe86..315c37c 100644 --- a/ui/src/app/formats.ts +++ b/ui/src/app/formats.ts @@ -66,6 +66,13 @@ export const Formats: Format[] = [ { id: 'best', text: 'Best' }, ], }, + { + id: 'flac', + text: 'FLAC', + qualities: [ + { id: 'best', text: 'Best' }, + ], + }, { id: 'thumbnail', text: 'Thumbnail',