print emtpy functionality, do not use TP on soundcloud or bandcamp
This commit is contained in:
parent
7c940f98c6
commit
c004ec3b0b
6 changed files with 9 additions and 5 deletions
|
|
@ -22,4 +22,5 @@ presets:
|
||||||
|
|
||||||
"YouTube Full Albums":
|
"YouTube Full Albums":
|
||||||
preset:
|
preset:
|
||||||
- "_albums_from_chapters"
|
- "_albums_from_chapters"
|
||||||
|
- "_throttle_protection"
|
||||||
|
|
@ -18,6 +18,7 @@ presets:
|
||||||
"YouTube Releases":
|
"YouTube Releases":
|
||||||
preset:
|
preset:
|
||||||
- "_albums_from_playlists"
|
- "_albums_from_playlists"
|
||||||
|
- "_throttle_protection"
|
||||||
|
|
||||||
"Bandcamp":
|
"Bandcamp":
|
||||||
preset:
|
preset:
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,6 @@ presets:
|
||||||
|
|
||||||
|
|
||||||
_music_base:
|
_music_base:
|
||||||
preset:
|
|
||||||
# ytdl-sub includes throttle prootection by default or all prebuilt presets.
|
|
||||||
# Can be disabled with override variable `enable_throttle_protection: False`
|
|
||||||
- "_throttle_protection"
|
|
||||||
|
|
||||||
output_options:
|
output_options:
|
||||||
output_directory: "{music_directory}"
|
output_directory: "{music_directory}"
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@ logger = Logger.get(name="preset")
|
||||||
|
|
||||||
|
|
||||||
def _log(message: AnyArgument, level: Optional[Integer]) -> None:
|
def _log(message: AnyArgument, level: Optional[Integer]) -> None:
|
||||||
|
if not str(message):
|
||||||
|
return
|
||||||
|
|
||||||
if level is None:
|
if level is None:
|
||||||
logger.info(str(message))
|
logger.info(str(message))
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,15 @@ class TestPrintFunctions:
|
||||||
("{%print('hi mom', True)}", "hi mom", True),
|
("{%print('hi mom', True)}", "hi mom", True),
|
||||||
("{%print('this is great', [1, 2, 3])}", "this is great", [1, 2, 3]),
|
("{%print('this is great', [1, 2, 3])}", "this is great", [1, 2, 3]),
|
||||||
("{%print([1, 2], [3, 4])}", "[1, 2]", [3, 4]),
|
("{%print([1, 2], [3, 4])}", "[1, 2]", [3, 4]),
|
||||||
|
("{%print('', True)}", None, True),
|
||||||
# print_if_true
|
# print_if_true
|
||||||
("{%print_if_true('hi mom', True)}", "hi mom", True),
|
("{%print_if_true('hi mom', True)}", "hi mom", True),
|
||||||
("{%print_if_true('hi mom', False)}", None, False),
|
("{%print_if_true('hi mom', False)}", None, False),
|
||||||
|
("{%print_if_true('', True)}", None, True),
|
||||||
# print_if_false
|
# print_if_false
|
||||||
("{%print_if_false('hi mom', True)}", None, True),
|
("{%print_if_false('hi mom', True)}", None, True),
|
||||||
("{%print_if_false('hi mom', False)}", "hi mom", False),
|
("{%print_if_false('hi mom', False)}", "hi mom", False),
|
||||||
|
("{%print_if_false('', True)}", None, True),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_print_functions(
|
def test_print_functions(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue