fix video
This commit is contained in:
parent
59ec9d2652
commit
f215f99c65
8 changed files with 38 additions and 11 deletions
|
|
@ -134,6 +134,12 @@ class DownloadArgsParser:
|
|||
|
||||
next_dict[arg_name_split[-1]] = arg_value
|
||||
|
||||
# TODO: handle ints/floats
|
||||
if arg_value == "True":
|
||||
next_dict[arg_name_split[-1]] = True
|
||||
elif arg_value == "False":
|
||||
next_dict[arg_name_split[-1]] = False
|
||||
|
||||
return argument_dict
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ def preset_dict_to_dl_args(preset_dict: Dict) -> str:
|
|||
def _recursive_preset_args(cli_key: str, current_value: Dict | Any) -> List[str]:
|
||||
if isinstance(current_value, dict):
|
||||
preset_args: List[str] = []
|
||||
for v_key, v_value in current_value.items():
|
||||
for v_key, v_value in sorted(current_value.items()):
|
||||
preset_args.extend(
|
||||
_recursive_preset_args(
|
||||
cli_key=f"{cli_key}.{v_key}" if cli_key else v_key, current_value=v_value
|
||||
|
|
|
|||
|
|
@ -13,7 +13,10 @@ def single_video_preset_dict(output_directory):
|
|||
"preset": "music_video",
|
||||
"download": {"url": "https://youtube.com/watch?v=HKTNxEqsN3Q"},
|
||||
# override the output directory with our fixture-generated dir
|
||||
"output_options": {"output_directory": output_directory},
|
||||
"output_options": {
|
||||
"output_directory": output_directory,
|
||||
"maintain_download_archive": False,
|
||||
},
|
||||
# download the worst format so it is fast
|
||||
"ytdl_options": {
|
||||
"format": "worst[ext=mp4]",
|
||||
|
|
@ -79,10 +82,10 @@ class TestYoutubeVideo:
|
|||
assert_transaction_log_matches(
|
||||
output_directory=output_directory,
|
||||
transaction_log=transaction_log,
|
||||
transaction_log_summary_file_name="youtube/test_video.txt",
|
||||
transaction_log_summary_file_name="youtube/test_video_cli.txt",
|
||||
)
|
||||
assert_expected_downloads(
|
||||
output_directory=output_directory,
|
||||
dry_run=dry_run,
|
||||
expected_download_summary_file_name="youtube/test_video.json",
|
||||
expected_download_summary_file_name="youtube/test_video_cli.json",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
".ytdl-sub-music_video_playlist_test-download-archive.json": "e7f7c35e33c132a96d1f12b18f388b35",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Feb.1]-thumb.jpg": "b232d253df621aa770b780c1301d364d",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Feb.1].info.json": "4a344a302092b630d2f88af06b64d3d0",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Feb.1].info.json": "0cfc2ecee75f6f33efac020d0fab44fa",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Feb.1].mp4": "7bfa1475504a7c8a4aaa8c89f9306331",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Feb.1].nfo": "de6f9a17a5ebf92aa02b14f7342b8d36",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Feb.27]-thumb.jpg": "d17c379ea8b362f5b97c6b213b0342cb",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Feb.27].info.json": "3d86f417cca228617bf678b1b5ee34d4",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Feb.27].info.json": "6d3d49a3ba25746f786678838a64b485",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Feb.27].mp4": "04ab5cb3cc12325d0c96a7cd04a8b91d",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Feb.27].nfo": "9a4a57bb91f1ac97b588fdf66bac4c9b",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Mar.21]-thumb.jpg": "e7830aa8a64b0cde65ba3f7e5fc56530",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Mar.21].info.json": "266df7e3cfa50274bcf81e52d790f7de",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Mar.21].info.json": "19c04838f1aac493ba1eb2b9e933ba1f",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Mar.21].mp4": "025de6099a5c98e6397153c7a62d517d",
|
||||
"JMC/JMC - Jesse's Minecraft Server [Trailer - Mar.21].nfo": "b98f1fa3e76b4592aeeaed4f6e220809",
|
||||
"poster.jpg": "e7830aa8a64b0cde65ba3f7e5fc56530",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
".ytdl-sub-cli-dl-b84bbcd8-download-archive.json": "3b57be33efe7e2de0bc8cecfee86d1a8",
|
||||
"JMC/JMC - Oblivion Mod "Falcor" p.1-thumb.jpg": "fb95b510681676e81c321171fc23143e",
|
||||
"JMC/JMC - Oblivion Mod "Falcor" p.1.info.json": "e454c852e27e82d3252837e556d17dac",
|
||||
"JMC/JMC - Oblivion Mod "Falcor" p.1.info.json": "1651175b28db7c315df2758e6b66d353",
|
||||
"JMC/JMC - Oblivion Mod "Falcor" p.1.mp4": "3744c49f2e447bd7712a5aad5ed36be2",
|
||||
"JMC/JMC - Oblivion Mod "Falcor" p.1.nfo": "24cc4e17d2bebc89b2759ce5471d403e"
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"JMC/JMC - Oblivion Mod "Falcor" p.1-thumb.jpg": "fb95b510681676e81c321171fc23143e",
|
||||
"JMC/JMC - Oblivion Mod "Falcor" p.1.info.json": "8d1bfe968d6eae87462850be79abe13a",
|
||||
"JMC/JMC - Oblivion Mod "Falcor" p.1.mp4": "3744c49f2e447bd7712a5aad5ed36be2",
|
||||
"JMC/JMC - Oblivion Mod "Falcor" p.1.nfo": "24cc4e17d2bebc89b2759ce5471d403e"
|
||||
}
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
Files created:
|
||||
----------------------------------------
|
||||
{output_directory}
|
||||
.ytdl-sub-cli-dl-b84bbcd8-download-archive.json
|
||||
{output_directory}/JMC
|
||||
JMC - Oblivion Mod "Falcor" p.1-thumb.jpg
|
||||
JMC - Oblivion Mod "Falcor" p.1.info.json
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
Files created:
|
||||
----------------------------------------
|
||||
{output_directory}/JMC
|
||||
JMC - Oblivion Mod "Falcor" p.1-thumb.jpg
|
||||
JMC - Oblivion Mod "Falcor" p.1.info.json
|
||||
JMC - Oblivion Mod "Falcor" p.1.mp4
|
||||
Video Tags:
|
||||
title: Oblivion Mod "Falcor" p.1
|
||||
JMC - Oblivion Mod "Falcor" p.1.nfo
|
||||
NFO tags:
|
||||
musicvideo:
|
||||
album: Music Videos
|
||||
artist: JMC
|
||||
title: Oblivion Mod "Falcor" p.1
|
||||
year: 2010
|
||||
Loading…
Reference in a new issue