mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-24 05:56:37 +00:00
Raise an error for an invalid custom value
This commit is contained in:
parent
a487e64550
commit
d33be55b51
@ -120,6 +120,8 @@ elif directory_mode.startswith('custom:'):
|
|||||||
custom_value = directory_mode.split(':', maxsplit=1)[1]
|
custom_value = directory_mode.split(':', maxsplit=1)[1]
|
||||||
if ',' in custom_value:
|
if ',' in custom_value:
|
||||||
DOWNLOAD_AUDIO_DIR, DOWNLOAD_VIDEO_DIR = custom_value.split(',', maxsplit=1)
|
DOWNLOAD_AUDIO_DIR, DOWNLOAD_VIDEO_DIR = custom_value.split(',', maxsplit=1)
|
||||||
|
else:
|
||||||
|
raise ValueError("Invalid format for TUBESYNC_DIRECTORY_MODE=custom. Expected 'custom:audio_prefix,video_prefix'.")
|
||||||
elif directory_mode not in ('', 'default'):
|
elif directory_mode not in ('', 'default'):
|
||||||
raise ValueError(f"Unsupported TUBESYNC_DIRECTORY_MODE: {directory_mode}")
|
raise ValueError(f"Unsupported TUBESYNC_DIRECTORY_MODE: {directory_mode}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user