Browse Source

Validate output_format option

doc-issue-template
MrS0m30n3 8 years ago
parent
commit
648546832e
1 changed files with 3 additions and 3 deletions
  1. 6
      youtube_dl_gui/optionsmanager.py

6
youtube_dl_gui/optionsmanager.py

@ -16,6 +16,8 @@ from .utils import (
check_path check_path
) )
from .formats import OUTPUT_FORMATS
class OptionsManager(object): class OptionsManager(object):
@ -291,8 +293,6 @@ class OptionsManager(object):
VALID_AUDIO_QUALITY = ('0', '5', '9') VALID_AUDIO_QUALITY = ('0', '5', '9')
VALID_OUTPUT_FORMAT = ('title', 'id', 'custom')
VALID_FILESIZE_UNIT = ('', 'k', 'm', 'g', 't', 'p', 'e', 'z', 'y') VALID_FILESIZE_UNIT = ('', 'k', 'm', 'g', 't', 'p', 'e', 'z', 'y')
VALID_SUB_LANGUAGE = ('en', 'gr', 'pt', 'fr', 'it', 'ru', 'es', 'de') VALID_SUB_LANGUAGE = ('en', 'gr', 'pt', 'fr', 'it', 'ru', 'es', 'de')
@ -316,7 +316,7 @@ class OptionsManager(object):
'second_video_format': VALID_VIDEO_FORMAT, 'second_video_format': VALID_VIDEO_FORMAT,
'audio_format': VALID_AUDIO_FORMAT, 'audio_format': VALID_AUDIO_FORMAT,
'audio_quality': VALID_AUDIO_QUALITY, 'audio_quality': VALID_AUDIO_QUALITY,
#'output_format': VALID_OUTPUT_FORMAT, #TODO validate
'output_format': OUTPUT_FORMATS.keys(),
'min_filesize_unit': VALID_FILESIZE_UNIT, 'min_filesize_unit': VALID_FILESIZE_UNIT,
'max_filesize_unit': VALID_FILESIZE_UNIT, 'max_filesize_unit': VALID_FILESIZE_UNIT,
'subs_lang': VALID_SUB_LANGUAGE 'subs_lang': VALID_SUB_LANGUAGE

Loading…
Cancel
Save