diff --git a/tests/conftest.py b/tests/conftest.py index 3f9fa442..3b88c827 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -110,6 +110,11 @@ def preset_dict_to_dl_args(preset_dict: Dict) -> str: Preset dict converted to CLI parameters """ + def _maybe_quote_value(value: Any): + if isinstance(value, str) and " " in value: + return f'"{value}"' + return value + def _recursive_preset_args(cli_key: str, current_value: Dict | Any) -> List[str]: if isinstance(current_value, dict): preset_args: List[str] = [] @@ -122,10 +127,11 @@ def preset_dict_to_dl_args(preset_dict: Dict) -> str: return preset_args elif isinstance(current_value, list): return [ - f"--{cli_key}[{idx + 1}] {current_value[idx]}" for idx in range(len(current_value)) + f"--{cli_key}[{idx + 1}] {_maybe_quote_value(current_value[idx])}" + for idx in range(len(current_value)) ] else: - return [f"--{cli_key} {current_value}"] + return [f"--{cli_key} {_maybe_quote_value(current_value)}"] return " ".join(_recursive_preset_args(cli_key="", current_value=preset_dict)) diff --git a/tests/e2e/conftest.py b/tests/e2e/conftest.py index 8516a433..d2957a27 100644 --- a/tests/e2e/conftest.py +++ b/tests/e2e/conftest.py @@ -1,4 +1,4 @@ -import json +import shlex import sys import tempfile from typing import List @@ -34,6 +34,6 @@ def timestamps_file_path(): def mock_run_from_cli(args: str) -> List[Subscription]: - args_list = ["ytdl-sub"] + args.split() + args_list = ["ytdl-sub"] + shlex.split(args) with patch.object(sys, "argv", args_list): return main() diff --git a/tests/e2e/plugins/test_subtitles.py b/tests/e2e/plugins/test_subtitles.py index 7737c9bb..ae5e14e9 100644 --- a/tests/e2e/plugins/test_subtitles.py +++ b/tests/e2e/plugins/test_subtitles.py @@ -19,7 +19,7 @@ def single_video_subs_embed_preset_dict(output_directory): "allow_auto_generated_subtitles": True, }, "format": "worst[ext=mp4]", # download the worst format so it is fast - "overrides": {"artist": "JMC"}, + "overrides": {"music_video_artist": "JMC"}, } @@ -27,19 +27,23 @@ def single_video_subs_embed_preset_dict(output_directory): def test_single_video_subs_embed_and_file_preset_dict(single_video_subs_embed_preset_dict): single_video_subs_embed_preset_dict["subtitles"][ "subtitles_name" - ] = "{music_video_name}.{lang}.{subtitles_ext}" + ] = "{music_video_file_name}.{lang}.{subtitles_ext}" return single_video_subs_embed_preset_dict class TestSubtitles: def test_subtitle_lang_variable_partial_validates(self, default_config): default_config_dict = default_config.as_dict() - default_config_dict["presets"]["Jellyfin Music Videos"]["subtitles"] = { - "embed_subtitles": False, - "languages": ["en", "de"], - "allow_auto_generated_subtitles": True, - "subtitles_name": "{episode_file_path}.{lang}.{subtitles_ext}", - "subtitles_type": "srt", + default_config_dict["presets"] = { + "test_lang_validates": { + "subtitles": { + "embed_subtitles": False, + "languages": ["en", "de"], + "allow_auto_generated_subtitles": True, + "subtitles_name": "{episode_file_path}.{lang}.{subtitles_ext}", + "subtitles_type": "srt", + } + } } _ = ConfigFile.from_dict(default_config_dict) diff --git a/tests/e2e/youtube/test_video.py b/tests/e2e/youtube/test_video.py index 9cc6acc0..f3a889e5 100644 --- a/tests/e2e/youtube/test_video.py +++ b/tests/e2e/youtube/test_video.py @@ -31,7 +31,7 @@ def single_video_preset_dict_old_video_tags_format(output_directory): "title": "{title}", } }, - "overrides": {"artist": "JMC"}, + "overrides": {"music_video_artist": "JMC"}, } @@ -51,7 +51,7 @@ def single_video_preset_dict(output_directory): "video_tags": { "title": "{title}", }, - "overrides": {"artist": "JMC"}, + "overrides": {"music_video_artist": "JMC"}, } diff --git a/tests/resources/expected_downloads_summaries/plugins/chapters/test_chapters_from_comments.json b/tests/resources/expected_downloads_summaries/plugins/chapters/test_chapters_from_comments.json index fad24055..72870ea2 100644 --- a/tests/resources/expected_downloads_summaries/plugins/chapters/test_chapters_from_comments.json +++ b/tests/resources/expected_downloads_summaries/plugins/chapters/test_chapters_from_comments.json @@ -1,7 +1,6 @@ { - ".ytdl-sub-chapters_from_comments-download-archive.json": "122723ce8d257eebb05178daa26141f6", - "JMC/JMC - Move 78 - Automated Improvisation [Full Album]-thumb.jpg": "c12e6a6f242680d1096a1a99d74a62c6", - "JMC/JMC - Move 78 - Automated Improvisation [Full Album].info.json": "INFO_JSON", - "JMC/JMC - Move 78 - Automated Improvisation [Full Album].mp4": "b82e8eb3f912a4ee2b14d90332fdce89", - "JMC/JMC - Move 78 - Automated Improvisation [Full Album].nfo": "7a65b184d24c68fc0ec5380432250f5b" + ".ytdl-sub-chapters_from_comments-download-archive.json": "9a12e88d62698611602aac01b2fabf20", + "chapters_from_comments/Move 78 - Automated Improvisation [Full Album].jpg": "c12e6a6f242680d1096a1a99d74a62c6", + "chapters_from_comments/Move 78 - Automated Improvisation [Full Album].mp4": "1fdb2cf035f7b7427650334f82d9cd1d", + "chapters_from_comments/Move 78 - Automated Improvisation [Full Album].nfo": "af234aa6b35a3f902f34fe348b8517a4" } \ No newline at end of file diff --git a/tests/resources/expected_downloads_summaries/plugins/file_convert/output.json b/tests/resources/expected_downloads_summaries/plugins/file_convert/output.json index 0c335817..79904d0c 100644 --- a/tests/resources/expected_downloads_summaries/plugins/file_convert/output.json +++ b/tests/resources/expected_downloads_summaries/plugins/file_convert/output.json @@ -1,7 +1,6 @@ { - ".ytdl-sub-file_convert_test-download-archive.json": "65aa49c7345f9fc201e42ddc4a96b19b", - "Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3-thumb.jpg": "662fcaadf6e80d63591bac19a5fdffb0", - "Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.info.json": "INFO_JSON", - "Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.mp4": "fa29d8b1482e37be643f1b4a127e5185", - "Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.nfo": "cacf09ab38f9b3085da9c5af516cf22a" + ".ytdl-sub-file_convert_test-download-archive.json": "f720289a704349fbe38ef5ed451af724", + "file_convert_test/When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.jpg": "662fcaadf6e80d63591bac19a5fdffb0", + "file_convert_test/When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.mp4": "108a978cb528e4aa509b310ede85b11f", + "file_convert_test/When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.nfo": "752e6b6eea853c8a1f62faa4b841b292" } \ No newline at end of file diff --git a/tests/resources/expected_downloads_summaries/plugins/file_convert/output_custom_ffmpeg.json b/tests/resources/expected_downloads_summaries/plugins/file_convert/output_custom_ffmpeg.json index c511bd2a..aea1b52f 100644 --- a/tests/resources/expected_downloads_summaries/plugins/file_convert/output_custom_ffmpeg.json +++ b/tests/resources/expected_downloads_summaries/plugins/file_convert/output_custom_ffmpeg.json @@ -1,7 +1,6 @@ { - ".ytdl-sub-file_convert_test-download-archive.json": "74813dccf4e9732e49f5dc3c2d66f3be", - "Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3-thumb.jpg": "662fcaadf6e80d63591bac19a5fdffb0", - "Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.info.json": "INFO_JSON", - "Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.mkv": "b5f248b560f89f3f2a83fcdcd197d486", - "Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.nfo": "cacf09ab38f9b3085da9c5af516cf22a" + ".ytdl-sub-file_convert_test-download-archive.json": "8fa4bf42c9686f8520ce107e48b73215", + "file_convert_test/When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.jpg": "662fcaadf6e80d63591bac19a5fdffb0", + "file_convert_test/When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.mkv": "591e4c18ac2a6d199dcd0df67c676184", + "file_convert_test/When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.nfo": "752e6b6eea853c8a1f62faa4b841b292" } \ No newline at end of file diff --git a/tests/resources/expected_downloads_summaries/plugins/match_filters/test_match_filters_partial.json b/tests/resources/expected_downloads_summaries/plugins/match_filters/test_match_filters_partial.json index cbac755a..ef55497a 100644 --- a/tests/resources/expected_downloads_summaries/plugins/match_filters/test_match_filters_partial.json +++ b/tests/resources/expected_downloads_summaries/plugins/match_filters/test_match_filters_partial.json @@ -1,7 +1,6 @@ { - ".ytdl-sub-match_filter_test-download-archive.json": "6017105735dd8fdfe18932c9c048dccf", - "Project Zombie/Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21]-thumb.jpg": "e7830aa8a64b0cde65ba3f7e5fc56530", - "Project Zombie/Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21].info.json": "INFO_JSON", - "Project Zombie/Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21].nfo": "17c303f07e9b3af77c90975f843c95bd", - "Project Zombie/Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21].webm": "ad90ebef1ea6cbdb924670cdd7d1b9b9" + ".ytdl-sub-match_filter_test-download-archive.json": "11d548b31fdb1aa0f7a1e9da6dde32ea", + "match_filter_test/Jesse's Minecraft Server [Trailer - Mar.21].jpg": "e7830aa8a64b0cde65ba3f7e5fc56530", + "match_filter_test/Jesse's Minecraft Server [Trailer - Mar.21].nfo": "d85f4500bb5d8a2425d734a23b5a944c", + "match_filter_test/Jesse's Minecraft Server [Trailer - Mar.21].webm": "b5b89b1cb1d6a4cf0d37fc42517c1acc" } \ No newline at end of file diff --git a/tests/resources/expected_downloads_summaries/plugins/test_chapters_sb_and_embedded_subs.json b/tests/resources/expected_downloads_summaries/plugins/test_chapters_sb_and_embedded_subs.json index 3ae584b8..1fc41928 100644 --- a/tests/resources/expected_downloads_summaries/plugins/test_chapters_sb_and_embedded_subs.json +++ b/tests/resources/expected_downloads_summaries/plugins/test_chapters_sb_and_embedded_subs.json @@ -1,7 +1,6 @@ { - ".ytdl-sub-sponsorblock_with_embedded_subs_test-download-archive.json": "40abc64a8fe93a10406bff1548a2cbe2", - "JMC/JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case-thumb.jpg": "b5353a824a4800cc26f884e3025ed969", - "JMC/JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.info.json": "INFO_JSON", - "JMC/JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.mp4": "9a86c8b65e02224383804d7fe2c9a7e9", - "JMC/JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.nfo": "b9bd35e4f260c728774d8dd31f83637c" + ".ytdl-sub-sponsorblock_with_embedded_subs_test-download-archive.json": "13d75ca0f23372d7d6311b0e3521665c", + "sponsorblock_with_embedded_subs_test/This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.jpg": "b5353a824a4800cc26f884e3025ed969", + "sponsorblock_with_embedded_subs_test/This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.mp4": "470e09382bfa4d467fbac2f897a3801e", + "sponsorblock_with_embedded_subs_test/This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.nfo": "98725407bc7e157444f314081e0fdd4d" } \ No newline at end of file diff --git a/tests/resources/expected_downloads_summaries/plugins/test_subtitles_embedded.json b/tests/resources/expected_downloads_summaries/plugins/test_subtitles_embedded.json index 0eee69ea..12800181 100644 --- a/tests/resources/expected_downloads_summaries/plugins/test_subtitles_embedded.json +++ b/tests/resources/expected_downloads_summaries/plugins/test_subtitles_embedded.json @@ -1,7 +1,6 @@ { - ".ytdl-sub-subtitles_embedded_test-download-archive.json": "1aa35c1d2663ac721f33f8374c00af1a", - "JMC/JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind-thumb.jpg": "50ee47c80f679029f5d3503bb91b045a", - "JMC/JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.info.json": "INFO_JSON", - "JMC/JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.mp4": "1f1f91f85b162c20596a2413e704b809", - "JMC/JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.nfo": "c64964fab07574080e5da3242e3bfd48" + ".ytdl-sub-subtitles_embedded_test-download-archive.json": "a74ecea9f7844be23f470bbe702788f3", + "JMC/YouTube Rewind 2019: For the Record | #YouTubeRewind.jpg": "50ee47c80f679029f5d3503bb91b045a", + "JMC/YouTube Rewind 2019: For the Record | #YouTubeRewind.mp4": "323f2b1053dae7f7c7c0a9abd0f063df", + "JMC/YouTube Rewind 2019: For the Record | #YouTubeRewind.nfo": "e6ac56ce52c747e2e271f12208f9a538" } \ No newline at end of file diff --git a/tests/resources/expected_downloads_summaries/plugins/test_subtitles_embedded_and_file.json b/tests/resources/expected_downloads_summaries/plugins/test_subtitles_embedded_and_file.json index 641645e9..6d04915e 100644 --- a/tests/resources/expected_downloads_summaries/plugins/test_subtitles_embedded_and_file.json +++ b/tests/resources/expected_downloads_summaries/plugins/test_subtitles_embedded_and_file.json @@ -1,9 +1,8 @@ { - ".ytdl-sub-subtitles_embedded_and_file_test-download-archive.json": "fb48a287b1af0c78d7f79749c0cec9d7", - "JMC/JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind-thumb.jpg": "50ee47c80f679029f5d3503bb91b045a", - "JMC/JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.de.srt": "b343c3bb9257b7ee7ba38f570a115b37", - "JMC/JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.en.srt": "fe8c6ee92cae6e059fd80fd61691adbe", - "JMC/JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.info.json": "INFO_JSON", - "JMC/JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.mp4": "1f1f91f85b162c20596a2413e704b809", - "JMC/JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.nfo": "c64964fab07574080e5da3242e3bfd48" + ".ytdl-sub-subtitles_embedded_and_file_test-download-archive.json": "a05bbc3b8851e92da10c67cd9acb32d0", + "JMC/YouTube Rewind 2019: For the Record | #YouTubeRewind.de.srt": "b343c3bb9257b7ee7ba38f570a115b37", + "JMC/YouTube Rewind 2019: For the Record | #YouTubeRewind.en.srt": "fe8c6ee92cae6e059fd80fd61691adbe", + "JMC/YouTube Rewind 2019: For the Record | #YouTubeRewind.jpg": "50ee47c80f679029f5d3503bb91b045a", + "JMC/YouTube Rewind 2019: For the Record | #YouTubeRewind.mp4": "323f2b1053dae7f7c7c0a9abd0f063df", + "JMC/YouTube Rewind 2019: For the Record | #YouTubeRewind.nfo": "e6ac56ce52c747e2e271f12208f9a538" } \ No newline at end of file diff --git a/tests/resources/expected_downloads_summaries/youtube/test_video_cli.json b/tests/resources/expected_downloads_summaries/youtube/test_video_cli.json index 80da3488..4cbb7eca 100644 --- a/tests/resources/expected_downloads_summaries/youtube/test_video_cli.json +++ b/tests/resources/expected_downloads_summaries/youtube/test_video_cli.json @@ -1,6 +1,5 @@ { - "JMC/JMC - Oblivion Mod "Falcor" p.1-thumb.jpg": "fb95b510681676e81c321171fc23143e", - "JMC/JMC - Oblivion Mod "Falcor" p.1.info.json": "INFO_JSON", - "JMC/JMC - Oblivion Mod "Falcor" p.1.mp4": "797b44f3207be01651780d6d86cb70bb", - "JMC/JMC - Oblivion Mod "Falcor" p.1.nfo": "24cc4e17d2bebc89b2759ce5471d403e" + "JMC/Oblivion Mod "Falcor" p.1.jpg": "fb95b510681676e81c321171fc23143e", + "JMC/Oblivion Mod "Falcor" p.1.mp4": "0448c9fd3eeaba4eca7f650fb93fe21b", + "JMC/Oblivion Mod "Falcor" p.1.nfo": "58c2be339869b5d071c1758d55c72ddb" } \ No newline at end of file diff --git a/tests/resources/expected_downloads_summaries/youtube/test_video_missing_thumb.json b/tests/resources/expected_downloads_summaries/youtube/test_video_missing_thumb.json index 2a7a51e1..a02244e9 100644 --- a/tests/resources/expected_downloads_summaries/youtube/test_video_missing_thumb.json +++ b/tests/resources/expected_downloads_summaries/youtube/test_video_missing_thumb.json @@ -1,4 +1,4 @@ { - "music_video_single_video_test/Oblivion Mod "Falcor" p.1.mp4": "2d09787e633db9eb96431b0718a68bb4", - "music_video_single_video_test/Oblivion Mod "Falcor" p.1.nfo": "9879bddfbe5061de19a8baccc424ede7" + "JMC/Oblivion Mod "Falcor" p.1.mp4": "90efc28e68c8bd630f7059a4c9fa5423", + "JMC/Oblivion Mod "Falcor" p.1.nfo": "58c2be339869b5d071c1758d55c72ddb" } \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/plugins/chapters/test_chapters_from_comments.txt b/tests/resources/transaction_log_summaries/plugins/chapters/test_chapters_from_comments.txt index 00325e22..516829a9 100644 --- a/tests/resources/transaction_log_summaries/plugins/chapters/test_chapters_from_comments.txt +++ b/tests/resources/transaction_log_summaries/plugins/chapters/test_chapters_from_comments.txt @@ -2,10 +2,9 @@ Files created: ---------------------------------------- {output_directory} .ytdl-sub-chapters_from_comments-download-archive.json -{output_directory}/JMC - JMC - Move 78 - Automated Improvisation [Full Album]-thumb.jpg - JMC - Move 78 - Automated Improvisation [Full Album].info.json - JMC - Move 78 - Automated Improvisation [Full Album].mp4 +{output_directory}/chapters_from_comments + Move 78 - Automated Improvisation [Full Album].jpg + Move 78 - Automated Improvisation [Full Album].mp4 Chapters from comments: 0:00: 01. The Lonely Tears of Lee Seedol 4:30: 02. But What If We're Wrong @@ -17,10 +16,18 @@ Files created: 29:58: 08. Schnitzel Whisperer 32:16: 09. Teilo Embedded subtitles with lang(s) en, de - JMC - Move 78 - Automated Improvisation [Full Album].nfo + Video Tags: + album: Music Videos + artist: chapters_from_comments + genre: ytdl-sub + premiered: 2022-11-21 + title: Move 78 - Automated Improvisation [Full Album] + year: 2022 + Move 78 - Automated Improvisation [Full Album].nfo NFO tags: musicvideo: album: Music Videos - artist: JMC - title: Move 78 - Automated Improvisation [Full Album] - year: 2022 \ No newline at end of file + artist: chapters_from_comments + genre: ytdl-sub + premiered: 2022-11-21 + title: Move 78 - Automated Improvisation [Full Album] \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/plugins/file_convert/output.txt b/tests/resources/transaction_log_summaries/plugins/file_convert/output.txt index 94b941c6..ca2f3ae2 100644 --- a/tests/resources/transaction_log_summaries/plugins/file_convert/output.txt +++ b/tests/resources/transaction_log_summaries/plugins/file_convert/output.txt @@ -2,15 +2,22 @@ Files created: ---------------------------------------- {output_directory} .ytdl-sub-file_convert_test-download-archive.json -{output_directory}/Beyond The Guitar - Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3-thumb.jpg - Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.info.json - Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.mp4 +{output_directory}/file_convert_test + When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.jpg + When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.mp4 Converted from webm - Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.nfo + Video Tags: + album: Music Videos + artist: file_convert_test + genre: ytdl-sub + premiered: 2022-09-28 + title: When you hear Hugh Jackman is returning as Wolverine in Deadpool 3 + year: 2022 + When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.nfo NFO tags: musicvideo: album: Music Videos - artist: Beyond The Guitar - title: When you hear Hugh Jackman is returning as Wolverine in Deadpool 3 - year: 2022 \ No newline at end of file + artist: file_convert_test + genre: ytdl-sub + premiered: 2022-09-28 + title: When you hear Hugh Jackman is returning as Wolverine in Deadpool 3 \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/plugins/file_convert/output_custom_ffmpeg.txt b/tests/resources/transaction_log_summaries/plugins/file_convert/output_custom_ffmpeg.txt index a8f570fb..f6ffd206 100644 --- a/tests/resources/transaction_log_summaries/plugins/file_convert/output_custom_ffmpeg.txt +++ b/tests/resources/transaction_log_summaries/plugins/file_convert/output_custom_ffmpeg.txt @@ -2,15 +2,22 @@ Files created: ---------------------------------------- {output_directory} .ytdl-sub-file_convert_test-download-archive.json -{output_directory}/Beyond The Guitar - Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3-thumb.jpg - Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.info.json - Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.mkv +{output_directory}/file_convert_test + When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.jpg + When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.mkv Converted from webm - Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.nfo + Video Tags: + album: Music Videos + artist: file_convert_test + genre: ytdl-sub + premiered: 2022-09-28 + title: When you hear Hugh Jackman is returning as Wolverine in Deadpool 3 + year: 2022 + When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.nfo NFO tags: musicvideo: album: Music Videos - artist: Beyond The Guitar - title: When you hear Hugh Jackman is returning as Wolverine in Deadpool 3 - year: 2022 \ No newline at end of file + artist: file_convert_test + genre: ytdl-sub + premiered: 2022-09-28 + title: When you hear Hugh Jackman is returning as Wolverine in Deadpool 3 \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/plugins/match_filters/test_match_filters_partial.txt b/tests/resources/transaction_log_summaries/plugins/match_filters/test_match_filters_partial.txt index 4b827ab2..f05831ce 100644 --- a/tests/resources/transaction_log_summaries/plugins/match_filters/test_match_filters_partial.txt +++ b/tests/resources/transaction_log_summaries/plugins/match_filters/test_match_filters_partial.txt @@ -2,14 +2,21 @@ Files created: ---------------------------------------- {output_directory} .ytdl-sub-match_filter_test-download-archive.json -{output_directory}/Project Zombie - Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21]-thumb.jpg - Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21].info.json - Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21].nfo +{output_directory}/match_filter_test + Jesse's Minecraft Server [Trailer - Mar.21].jpg + Jesse's Minecraft Server [Trailer - Mar.21].nfo NFO tags: musicvideo: album: Music Videos - artist: Project Zombie + artist: match_filter_test + genre: ytdl-sub + premiered: 2011-03-21 title: Jesse's Minecraft Server [Trailer - Mar.21] - year: 2011 - Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21].webm \ No newline at end of file + Jesse's Minecraft Server [Trailer - Mar.21].webm + Video Tags: + album: Music Videos + artist: match_filter_test + genre: ytdl-sub + premiered: 2011-03-21 + title: Jesse's Minecraft Server [Trailer - Mar.21] + year: 2011 \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/plugins/nfo_tags/test_nfo.txt b/tests/resources/transaction_log_summaries/plugins/nfo_tags/test_nfo.txt index 0b510cd1..268f1451 100644 --- a/tests/resources/transaction_log_summaries/plugins/nfo_tags/test_nfo.txt +++ b/tests/resources/transaction_log_summaries/plugins/nfo_tags/test_nfo.txt @@ -34,15 +34,22 @@ Files created: tag: the tag 🎸🎸 -{output_directory}/Rick Beato - Rick Beato - Can you hear the difference? 🎸🔥 #shorts-thumb.jpg - Rick Beato - Can you hear the difference? 🎸🔥 #shorts.info.json - Rick Beato - Can you hear the difference? 🎸🔥 #shorts.mp4 - Rick Beato - Can you hear the difference? 🎸🔥 #shorts.nfo +{output_directory}/kodi_safe_xml + Can you hear the difference? 🎸🔥 #shorts.jpg + Can you hear the difference? 🎸🔥 #shorts.mp4 + Video Tags: + album: Music Videos + artist: kodi_safe_xml + genre: ytdl-sub + premiered: 2022-06-30 + title: Can you hear the difference? 🎸🔥 #shorts + year: 2022 + Can you hear the difference? 🎸🔥 #shorts.nfo NFO tags: musicvideo: album: Music Videos - artist: Rick Beato + artist: kodi_safe_xml + genre: ytdl-sub kodi_safe_multi_title 🎸: - value 1 🎸 - value 2 🎸 @@ -72,5 +79,5 @@ Files created: tag: the tag 🎸🎸 - title: Can you hear the difference? 🎸🔥 #shorts - year: 2022 \ No newline at end of file + premiered: 2022-06-30 + title: Can you hear the difference? 🎸🔥 #shorts \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/plugins/nfo_tags/test_nfo_kodi_safe.txt b/tests/resources/transaction_log_summaries/plugins/nfo_tags/test_nfo_kodi_safe.txt index c707561b..12d167e5 100644 --- a/tests/resources/transaction_log_summaries/plugins/nfo_tags/test_nfo_kodi_safe.txt +++ b/tests/resources/transaction_log_summaries/plugins/nfo_tags/test_nfo_kodi_safe.txt @@ -34,15 +34,22 @@ Files created: tag: the tag □□ -{output_directory}/Rick Beato - Rick Beato - Can you hear the difference? 🎸🔥 #shorts-thumb.jpg - Rick Beato - Can you hear the difference? 🎸🔥 #shorts.info.json - Rick Beato - Can you hear the difference? 🎸🔥 #shorts.mp4 - Rick Beato - Can you hear the difference? 🎸🔥 #shorts.nfo +{output_directory}/kodi_safe_xml + Can you hear the difference? 🎸🔥 #shorts.jpg + Can you hear the difference? 🎸🔥 #shorts.mp4 + Video Tags: + album: Music Videos + artist: kodi_safe_xml + genre: ytdl-sub + premiered: 2022-06-30 + title: Can you hear the difference? 🎸🔥 #shorts + year: 2022 + Can you hear the difference? 🎸🔥 #shorts.nfo NFO tags: musicvideo: album: Music Videos - artist: Rick Beato + artist: kodi_safe_xml + genre: ytdl-sub kodi_safe_multi_title □: - value 1 □ - value 2 □ @@ -72,5 +79,5 @@ Files created: tag: the tag □□ - title: Can you hear the difference? □□ #shorts - year: 2022 \ No newline at end of file + premiered: 2022-06-30 + title: Can you hear the difference? □□ #shorts \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/plugins/test_chapters_sb_and_embedded_subs.txt b/tests/resources/transaction_log_summaries/plugins/test_chapters_sb_and_embedded_subs.txt index 30f8f2df..b04893e4 100644 --- a/tests/resources/transaction_log_summaries/plugins/test_chapters_sb_and_embedded_subs.txt +++ b/tests/resources/transaction_log_summaries/plugins/test_chapters_sb_and_embedded_subs.txt @@ -2,10 +2,9 @@ Files created: ---------------------------------------- {output_directory} .ytdl-sub-sponsorblock_with_embedded_subs_test-download-archive.json -{output_directory}/JMC - JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case-thumb.jpg - JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.info.json - JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.mp4 +{output_directory}/sponsorblock_with_embedded_subs_test + This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.jpg + This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.mp4 Embedded Chapters: Removed Chapter(s): Intro, Outro Removed SponsorBlock Category Count(s): @@ -14,10 +13,18 @@ Files created: Intermission/Intro Animation: 1 Unpaid/Self Promotion: 1 Embedded subtitles with lang(s) en, de - JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.nfo + Video Tags: + album: Music Videos + artist: sponsorblock_with_embedded_subs_test + genre: ytdl-sub + premiered: 2021-12-19 + title: This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case + year: 2021 + This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.nfo NFO tags: musicvideo: album: Music Videos - artist: JMC - title: This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case - year: 2021 \ No newline at end of file + artist: sponsorblock_with_embedded_subs_test + genre: ytdl-sub + premiered: 2021-12-19 + title: This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/plugins/test_regex.txt b/tests/resources/transaction_log_summaries/plugins/test_regex.txt index e8e5f863..3ec6c7c9 100644 --- a/tests/resources/transaction_log_summaries/plugins/test_regex.txt +++ b/tests/resources/transaction_log_summaries/plugins/test_regex.txt @@ -2,38 +2,52 @@ Files created: ---------------------------------------- {output_directory} .ytdl-sub-regex_capture_playlist_test-download-archive.json -{output_directory}/Project Zombie - Project Zombie - Jesse's Minecraft Server [Trailer - Feb.1]-thumb.jpg - Project Zombie - Jesse's Minecraft Server [Trailer - Feb.1].info.json - Project Zombie - Jesse's Minecraft Server [Trailer - Feb.1].mp4 - Project Zombie - Jesse's Minecraft Server [Trailer - Feb.1].nfo +{output_directory}/regex_capture_playlist_test + Jesse's Minecraft Server [Trailer - Feb.1].jpg + Jesse's Minecraft Server [Trailer - Feb.1].mp4 + Video Tags: + album: Music Videos + artist: regex_capture_playlist_test + genre: ytdl-sub + premiered: 2011-02-01 + title: Jesse's Minecraft Server [Trailer - Feb.1] + year: 2011 + Jesse's Minecraft Server [Trailer - Feb.1].nfo NFO tags: musicvideo: album: Music Videos - artist: Project Zombie + artist: regex_capture_playlist_test desc_cap: www.jesseminecraft.webs + genre: ytdl-sub override_with_capture_variable: contains Trailer override_with_capture_variable_sanitized: contains Trailer + premiered: 2011-02-01 title: Jesse's Minecraft Server [Trailer - Feb.1] title_cap_1: Trailer title_cap_1_sanitized: Trailer title_cap_2: Feb.1 upload_date_both_caps: First and Second containing in regex default - year: 2011 - Project Zombie - Jesse's Minecraft Server [Trailer - Feb.27]-thumb.jpg - Project Zombie - Jesse's Minecraft Server [Trailer - Feb.27].info.json - Project Zombie - Jesse's Minecraft Server [Trailer - Feb.27].mp4 - Project Zombie - Jesse's Minecraft Server [Trailer - Feb.27].nfo + Jesse's Minecraft Server [Trailer - Feb.27].jpg + Jesse's Minecraft Server [Trailer - Feb.27].mp4 + Video Tags: + album: Music Videos + artist: regex_capture_playlist_test + genre: ytdl-sub + premiered: 2011-02-27 + title: Jesse's Minecraft Server [Trailer - Feb.27] + year: 2011 + Jesse's Minecraft Server [Trailer - Feb.27].nfo NFO tags: musicvideo: album: Music Videos - artist: Project Zombie + artist: regex_capture_playlist_test desc_cap: jesseminecraft.webs + genre: ytdl-sub override_with_capture_variable: contains Trailer override_with_capture_variable_sanitized: contains Trailer + premiered: 2011-02-27 title: Jesse's Minecraft Server [Trailer - Feb.27] title_cap_1: Trailer title_cap_1_sanitized: Trailer title_cap_2: Feb.27 - upload_date_both_caps: 2011 and 02 - year: 2011 \ No newline at end of file + upload_date_both_caps: 2011 and 02 \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/plugins/test_regex_exclude.txt b/tests/resources/transaction_log_summaries/plugins/test_regex_exclude.txt index f82556b6..7bdf2485 100644 --- a/tests/resources/transaction_log_summaries/plugins/test_regex_exclude.txt +++ b/tests/resources/transaction_log_summaries/plugins/test_regex_exclude.txt @@ -2,14 +2,21 @@ Files created: ---------------------------------------- {output_directory} .ytdl-sub-regex_exclude_playlist_test-download-archive.json -{output_directory}/Project Zombie - Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21]-thumb.jpg - Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21].info.json - Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21].mp4 - Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21].nfo +{output_directory}/regex_exclude_playlist_test + Jesse's Minecraft Server [Trailer - Mar.21].jpg + Jesse's Minecraft Server [Trailer - Mar.21].mp4 + Video Tags: + album: Music Videos + artist: regex_exclude_playlist_test + genre: ytdl-sub + premiered: 2011-03-21 + title: Jesse's Minecraft Server [Trailer - Mar.21] + year: 2011 + Jesse's Minecraft Server [Trailer - Mar.21].nfo NFO tags: musicvideo: album: Music Videos - artist: Project Zombie - title: Jesse's Minecraft Server [Trailer - Mar.21] - year: 2011 \ No newline at end of file + artist: regex_exclude_playlist_test + genre: ytdl-sub + premiered: 2011-03-21 + title: Jesse's Minecraft Server [Trailer - Mar.21] \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/plugins/test_regex_match_and_exclude.txt b/tests/resources/transaction_log_summaries/plugins/test_regex_match_and_exclude.txt index 6a23ffab..74f9b7c9 100644 --- a/tests/resources/transaction_log_summaries/plugins/test_regex_match_and_exclude.txt +++ b/tests/resources/transaction_log_summaries/plugins/test_regex_match_and_exclude.txt @@ -2,21 +2,28 @@ Files created: ---------------------------------------- {output_directory} .ytdl-sub-regex_match_and_exclude_playlist_test-download-archive.json -{output_directory}/Project Zombie - Project Zombie - Jesse's Minecraft Server [Trailer - Feb.1]-thumb.jpg - Project Zombie - Jesse's Minecraft Server [Trailer - Feb.1].info.json - Project Zombie - Jesse's Minecraft Server [Trailer - Feb.1].mp4 - Project Zombie - Jesse's Minecraft Server [Trailer - Feb.1].nfo +{output_directory}/regex_match_and_exclude_playlist_test + Jesse's Minecraft Server [Trailer - Feb.1].jpg + Jesse's Minecraft Server [Trailer - Feb.1].mp4 + Video Tags: + album: Music Videos + artist: regex_match_and_exclude_playlist_test + genre: ytdl-sub + premiered: 2011-02-01 + title: Jesse's Minecraft Server [Trailer - Feb.1] + year: 2011 + Jesse's Minecraft Server [Trailer - Feb.1].nfo NFO tags: musicvideo: album: Music Videos - artist: Project Zombie + artist: regex_match_and_exclude_playlist_test desc_cap: www.jesseminecraft.webs + genre: ytdl-sub override_with_capture_variable: contains Trailer override_with_capture_variable_sanitized: contains Trailer + premiered: 2011-02-01 title: Jesse's Minecraft Server [Trailer - Feb.1] title_cap_1: Trailer title_cap_1_sanitized: Trailer title_cap_2: Feb.1 - upload_date_both_caps: First and Second containing in regex default - year: 2011 \ No newline at end of file + upload_date_both_caps: First and Second containing in regex default \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/plugins/test_regex_overrides.txt b/tests/resources/transaction_log_summaries/plugins/test_regex_overrides.txt index 663087d2..f8444df7 100644 --- a/tests/resources/transaction_log_summaries/plugins/test_regex_overrides.txt +++ b/tests/resources/transaction_log_summaries/plugins/test_regex_overrides.txt @@ -2,14 +2,21 @@ Files created: ---------------------------------------- {output_directory} .ytdl-sub-regex_using_overrides_test-download-archive.json -{output_directory}/Project Zombie - Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21]-thumb.jpg - Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21].info.json - Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21].mp4 - Project Zombie - Jesse's Minecraft Server [Trailer - Mar.21].nfo +{output_directory}/regex_using_overrides_test + Jesse's Minecraft Server [Trailer - Mar.21].jpg + Jesse's Minecraft Server [Trailer - Mar.21].mp4 + Video Tags: + album: Music Videos + artist: regex_using_overrides_test + genre: ytdl-sub + premiered: 2011-03-21 + title: Jesse's Minecraft Server [Trailer - Mar.21] + year: 2011 + Jesse's Minecraft Server [Trailer - Mar.21].nfo NFO tags: musicvideo: album: Music Videos - artist: Project Zombie - title: Jesse's Minecraft Server [Trailer - Mar.21] - year: 2011 \ No newline at end of file + artist: regex_using_overrides_test + genre: ytdl-sub + premiered: 2011-03-21 + title: Jesse's Minecraft Server [Trailer - Mar.21] \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/plugins/test_subtitles_embedded.txt b/tests/resources/transaction_log_summaries/plugins/test_subtitles_embedded.txt index 6f055950..c4b02af2 100644 --- a/tests/resources/transaction_log_summaries/plugins/test_subtitles_embedded.txt +++ b/tests/resources/transaction_log_summaries/plugins/test_subtitles_embedded.txt @@ -3,14 +3,21 @@ Files created: {output_directory} .ytdl-sub-subtitles_embedded_test-download-archive.json {output_directory}/JMC - JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind-thumb.jpg - JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.info.json - JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.mp4 + YouTube Rewind 2019: For the Record | #YouTubeRewind.jpg + YouTube Rewind 2019: For the Record | #YouTubeRewind.mp4 Embedded subtitles with lang(s) en, de - JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.nfo + Video Tags: + album: Music Videos + artist: JMC + genre: ytdl-sub + premiered: 2019-12-05 + title: YouTube Rewind 2019: For the Record | #YouTubeRewind + year: 2019 + YouTube Rewind 2019: For the Record | #YouTubeRewind.nfo NFO tags: musicvideo: album: Music Videos artist: JMC - title: YouTube Rewind 2019: For the Record | #YouTubeRewind - year: 2019 \ No newline at end of file + genre: ytdl-sub + premiered: 2019-12-05 + title: YouTube Rewind 2019: For the Record | #YouTubeRewind \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/plugins/test_subtitles_embedded_and_file.txt b/tests/resources/transaction_log_summaries/plugins/test_subtitles_embedded_and_file.txt index 51c22158..c466b11f 100644 --- a/tests/resources/transaction_log_summaries/plugins/test_subtitles_embedded_and_file.txt +++ b/tests/resources/transaction_log_summaries/plugins/test_subtitles_embedded_and_file.txt @@ -3,16 +3,23 @@ Files created: {output_directory} .ytdl-sub-subtitles_embedded_and_file_test-download-archive.json {output_directory}/JMC - JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind-thumb.jpg - JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.de.srt - JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.en.srt - JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.info.json - JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.mp4 + YouTube Rewind 2019: For the Record | #YouTubeRewind.de.srt + YouTube Rewind 2019: For the Record | #YouTubeRewind.en.srt + YouTube Rewind 2019: For the Record | #YouTubeRewind.jpg + YouTube Rewind 2019: For the Record | #YouTubeRewind.mp4 Embedded subtitles with lang(s) en, de - JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.nfo + Video Tags: + album: Music Videos + artist: JMC + genre: ytdl-sub + premiered: 2019-12-05 + title: YouTube Rewind 2019: For the Record | #YouTubeRewind + year: 2019 + YouTube Rewind 2019: For the Record | #YouTubeRewind.nfo NFO tags: musicvideo: album: Music Videos artist: JMC - title: YouTube Rewind 2019: For the Record | #YouTubeRewind - year: 2019 \ No newline at end of file + genre: ytdl-sub + premiered: 2019-12-05 + title: YouTube Rewind 2019: For the Record | #YouTubeRewind \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/youtube/test_video.txt b/tests/resources/transaction_log_summaries/youtube/test_video.txt index 4693de95..48cb51eb 100644 --- a/tests/resources/transaction_log_summaries/youtube/test_video.txt +++ b/tests/resources/transaction_log_summaries/youtube/test_video.txt @@ -1,11 +1,11 @@ Files created: ---------------------------------------- -{output_directory}/music_video_single_video_test +{output_directory}/JMC Oblivion Mod "Falcor" p.1.jpg Oblivion Mod "Falcor" p.1.mp4 Video Tags: album: Music Videos - artist: music_video_single_video_test + artist: JMC genre: ytdl-sub premiered: 2010-08-13 title: Oblivion Mod "Falcor" p.1 @@ -15,7 +15,7 @@ Files created: NFO tags: musicvideo: album: Music Videos - artist: music_video_single_video_test + artist: JMC genre: ytdl-sub premiered: 2010-08-13 title: Oblivion Mod "Falcor" p.1 \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/youtube/test_video_cli.txt b/tests/resources/transaction_log_summaries/youtube/test_video_cli.txt index 43da748f..48cb51eb 100644 --- a/tests/resources/transaction_log_summaries/youtube/test_video_cli.txt +++ b/tests/resources/transaction_log_summaries/youtube/test_video_cli.txt @@ -1,16 +1,21 @@ 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 + Oblivion Mod "Falcor" p.1.jpg + Oblivion Mod "Falcor" p.1.mp4 Video Tags: + album: Music Videos + artist: JMC + genre: ytdl-sub + premiered: 2010-08-13 title: Oblivion Mod "Falcor" p.1 + year: 2010 Embedded thumbnail - JMC - Oblivion Mod "Falcor" p.1.nfo + Oblivion Mod "Falcor" p.1.nfo NFO tags: musicvideo: album: Music Videos artist: JMC - title: Oblivion Mod "Falcor" p.1 - year: 2010 \ No newline at end of file + genre: ytdl-sub + premiered: 2010-08-13 + title: Oblivion Mod "Falcor" p.1 \ No newline at end of file diff --git a/tests/resources/transaction_log_summaries/youtube/test_video_missing_thumb.txt b/tests/resources/transaction_log_summaries/youtube/test_video_missing_thumb.txt index 541020c4..2c196a39 100644 --- a/tests/resources/transaction_log_summaries/youtube/test_video_missing_thumb.txt +++ b/tests/resources/transaction_log_summaries/youtube/test_video_missing_thumb.txt @@ -1,10 +1,10 @@ Files created: ---------------------------------------- -{output_directory}/music_video_single_video_test +{output_directory}/JMC Oblivion Mod "Falcor" p.1.mp4 Video Tags: album: Music Videos - artist: music_video_single_video_test + artist: JMC genre: ytdl-sub premiered: 2010-08-13 title: Oblivion Mod "Falcor" p.1 @@ -13,7 +13,7 @@ Files created: NFO tags: musicvideo: album: Music Videos - artist: music_video_single_video_test + artist: JMC genre: ytdl-sub premiered: 2010-08-13 title: Oblivion Mod "Falcor" p.1 \ No newline at end of file