From c95c7d444a73ba5da8f2d980f1a1202e1e78bc14 Mon Sep 17 00:00:00 2001 From: MrS0m30n3 Date: Mon, 9 Oct 2017 16:38:54 +0300 Subject: [PATCH] Add flac audio format. Closes #234 --- youtube_dl_gui/formats.py | 6 ++++-- youtube_dl_gui/optionsmanager.py | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/youtube_dl_gui/formats.py b/youtube_dl_gui/formats.py index 5fbd5ca..e41e3df 100644 --- a/youtube_dl_gui/formats.py +++ b/youtube_dl_gui/formats.py @@ -74,7 +74,8 @@ AUDIO_FORMATS = tdict([ ("aac", "aac"), ("m4a", "m4a"), ("vorbis", "vorbis"), - ("opus", "opus") + ("opus", "opus"), + ("flac", "flac") ]) @@ -173,7 +174,8 @@ def reload_strings(): ("aac", "aac"), ("m4a", "m4a"), ("vorbis", "vorbis"), - ("opus", "opus") + ("opus", "opus"), + ("flac", "flac") ]) diff --git a/youtube_dl_gui/optionsmanager.py b/youtube_dl_gui/optionsmanager.py index 794f590..291c021 100644 --- a/youtube_dl_gui/optionsmanager.py +++ b/youtube_dl_gui/optionsmanager.py @@ -83,7 +83,8 @@ class OptionsManager(object): after post processing it. audio_format (string): Audio format of the post processed file. - Available values are "mp3", "wav", "aac", "m4a", "vorbis", "opus". + Available values are "mp3", "wav", "aac", "m4a", "vorbis", + "opus" & "flac". audio_quality (string): Audio quality of the post processed file. Available values are "9", "5", "0". The lowest the value the @@ -339,7 +340,7 @@ class OptionsManager(object): '264', '138', '242', '243', '244', '247', '248', '271', '272', '82', '83', '84', '85', '100', '101', '102', '139', '140', '141', '171', '172') - VALID_AUDIO_FORMAT = ('mp3', 'wav', 'aac', 'm4a', 'vorbis', 'opus', '') + VALID_AUDIO_FORMAT = ('mp3', 'wav', 'aac', 'm4a', 'vorbis', 'opus', 'flac', '') VALID_AUDIO_QUALITY = ('0', '5', '9')