From f24860c7298ce3ab7271a58ed1e658997b0953fe Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Thu, 8 Sep 2022 07:47:55 -0700 Subject: [PATCH] [BUGFIX] Properly sanitize override variables after it is resolved (#223) * [BUGFIX] Properly sanitize override variables after it is resolved * fixtures --- .../validators/string_formatter_validators.py | 44 +++++++++++++------ .../date_range/test_channel_recent.json | 4 +- .../test_channel_rolling_recent.json | 2 +- .../plugins/split_by_chapters_video.json | 24 +++++----- ...ters_with_regex_no_chapters_video_pass.txt | 6 +-- .../split_by_chapters_with_regex_video.json | 24 +++++----- .../plugins/test_audio_extract_playlist.json | 6 +-- .../plugins/test_audio_extract_single.json | 4 +- .../test_chapters_from_ts_with_subs.json | 2 +- .../test_chapters_sb_and_embedded_subs.json | 2 +- .../plugins/test_subtitles_embedded.json | 2 +- .../test_subtitles_embedded_and_file.json | 2 +- .../test_soundcloud_discography.json | 26 +++++------ .../youtube/test_channel_full.json | 24 +++++----- .../youtube/test_merge_playlist.json | 2 +- .../youtube/test_playlist.json | 6 +-- .../youtube/test_split_video.json | 12 ++--- .../youtube/test_video.json | 2 +- .../split_by_chapters_video-dry-run.txt | 4 +- .../plugins/split_by_chapters_video.txt | 4 +- ...ters_with_regex_no_chapters_video_pass.txt | 6 +-- ...t_by_chapters_with_regex_video-dry-run.txt | 4 +- .../split_by_chapters_with_regex_video.txt | 4 +- .../plugins/test_audio_extract_single.txt | 4 +- .../test_string_formatter_validator.py | 13 ++++++ 25 files changed, 131 insertions(+), 102 deletions(-) diff --git a/src/ytdl_sub/validators/string_formatter_validators.py b/src/ytdl_sub/validators/string_formatter_validators.py index cd62b4a4..e8a4b22b 100644 --- a/src/ytdl_sub/validators/string_formatter_validators.py +++ b/src/ytdl_sub/validators/string_formatter_validators.py @@ -5,6 +5,8 @@ from typing import Dict from typing import List from typing import final +from yt_dlp.utils import sanitize_filename + from ytdl_sub.utils.exceptions import InvalidVariableNameException from ytdl_sub.utils.exceptions import StringFormattingException from ytdl_sub.utils.exceptions import StringFormattingVariableNotFoundException @@ -151,24 +153,23 @@ class StringFormatterValidator(Validator): value=formatter.format_string.format(**OrderedDict(variable_dict)), ) - def apply_formatter(self, variable_dict: Dict[str, str]) -> str: - """ - Calls `format` on the format string using the variable_dict as input kwargs - - Parameters - ---------- - variable_dict - kwargs to pass to the format string - - Returns - ------- - Format string formatted - """ - # Keep formatting the format string until no format_variables are present + def _apply_formatter(self, variable_dict: Dict[str, str], resolve_sanitized: bool = False): formatter = self recursion_depth = 0 max_depth = self._max_format_recursion + if resolve_sanitized: + for format_variable in formatter.format_variables: + # Must resolve the sanitized variable completely + if format_variable.endswith("_sanitized"): + # pylint: disable=protected-access + variable_dict[format_variable] = sanitize_filename( + StringFormatterValidator( + name=self._name, value=f"{{{format_variable}}}" + )._apply_formatter(variable_dict, resolve_sanitized=False) + ) + # pylint: enable=protected-access + while formatter.format_variables and recursion_depth < max_depth: formatter = self.__apply_formatter(formatter=formatter, variable_dict=variable_dict) recursion_depth += 1 @@ -183,6 +184,21 @@ class StringFormatterValidator(Validator): return formatter.format_string + def apply_formatter(self, variable_dict: Dict[str, str]) -> str: + """ + Calls `format` on the format string using the variable_dict as input kwargs + + Parameters + ---------- + variable_dict + kwargs to pass to the format string + + Returns + ------- + Format string formatted + """ + return self._apply_formatter(variable_dict=variable_dict, resolve_sanitized=True) + # pylint: disable=line-too-long class OverridesStringFormatterValidator(StringFormatterValidator): diff --git a/tests/e2e/resources/expected_downloads_summaries/plugins/date_range/test_channel_recent.json b/tests/e2e/resources/expected_downloads_summaries/plugins/date_range/test_channel_recent.json index f846dc88..8acac411 100644 --- a/tests/e2e/resources/expected_downloads_summaries/plugins/date_range/test_channel_recent.json +++ b/tests/e2e/resources/expected_downloads_summaries/plugins/date_range/test_channel_recent.json @@ -1,12 +1,12 @@ { ".ytdl-sub-recent-download-archive.json": "23520634f7908081f3d1333a1441a578", "Season 2018/s2018.e1029 - Jesse's Minecraft Server | Teaser Trailer-thumb.jpg": "705ca4e0d99b37e9ecdf6bfe4b90c59b", - "Season 2018/s2018.e1029 - Jesse's Minecraft Server | Teaser Trailer.info.json": "840bada48bd6aeec70444468dc21179b", + "Season 2018/s2018.e1029 - Jesse's Minecraft Server | Teaser Trailer.info.json": "32994d191719a206c2d8b4e4bb529ce6", "Season 2018/s2018.e1029 - Jesse's Minecraft Server | Teaser Trailer.mp4": "82f6ee7253e1dbb83ae7215af08ffacc", "Season 2018/s2018.e1029 - Jesse's Minecraft Server | Teaser Trailer.nfo": "368d68db0cbe9eb4f43ece0517445e82", "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id-thumb.jpg": "28d852ede73b879b9ebf9a061cfc7d46", "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.en.srt": "3d2c4e7f65d2ca5e96da38ce7eecfc4e", - "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.info.json": "1c14902576faa1ca51b6cfff92865a63", + "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.info.json": "81bd514b7bc8c0b57e87683bf05fb9bc", "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.mp4": "e733b4cc385b953b08c8eb0f47e03c1e", "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.nfo": "d9114d43d87907b2afc06eb089a8ac0a", "fanart.jpg": "129c6639b47299bc48062f0365e670ee", diff --git a/tests/e2e/resources/expected_downloads_summaries/plugins/date_range/test_channel_rolling_recent.json b/tests/e2e/resources/expected_downloads_summaries/plugins/date_range/test_channel_rolling_recent.json index 0ca2b070..a5bdb3e1 100644 --- a/tests/e2e/resources/expected_downloads_summaries/plugins/date_range/test_channel_rolling_recent.json +++ b/tests/e2e/resources/expected_downloads_summaries/plugins/date_range/test_channel_rolling_recent.json @@ -2,7 +2,7 @@ ".ytdl-sub-recent-download-archive.json": "3bbf72c014d055ecf672c8ea603140f7", "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id-thumb.jpg": "28d852ede73b879b9ebf9a061cfc7d46", "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.en.srt": "3d2c4e7f65d2ca5e96da38ce7eecfc4e", - "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.info.json": "1c14902576faa1ca51b6cfff92865a63", + "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.info.json": "81bd514b7bc8c0b57e87683bf05fb9bc", "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.mp4": "e733b4cc385b953b08c8eb0f47e03c1e", "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.nfo": "d9114d43d87907b2afc06eb089a8ac0a", "fanart.jpg": "129c6639b47299bc48062f0365e670ee", diff --git a/tests/e2e/resources/expected_downloads_summaries/plugins/split_by_chapters_video.json b/tests/e2e/resources/expected_downloads_summaries/plugins/split_by_chapters_video.json index bd62db62..f61a00c2 100644 --- a/tests/e2e/resources/expected_downloads_summaries/plugins/split_by_chapters_video.json +++ b/tests/e2e/resources/expected_downloads_summaries/plugins/split_by_chapters_video.json @@ -1,22 +1,22 @@ { - "01. Intro (Feat. Racheal Ofori & Barney Artist).info.json": "4ec926da9b74eee3f9bf9e1895d3af30", - "02. Answers (Feat. Rick David & Kaya Thomas - Dyke).info.json": "ae183114899d0b7bac8bfa01a09f6b36", - "03. Blaze (Feat. Kaya Thomas - Dyke).info.json": "86bff845b087dfc240d63a65afed9117", - "04. What If (Interlude).info.json": "d2e92735fcb8eaccaf2e28c8f2a0ab1f", - "05. No Peace (Feat. Tom Misch).info.json": "ed2a9ec8a833dd90bb6681d62c68ff3a", - "06. Closer (Feat. Lester Duval).info.json": "aa29efd172bb6afd27e948761087d01e", - "07. Delusions: Rumination (Interlude) (Feat. Racheal Ofori).info.json": "79c0626f28d0a02074f14eac90e0670e", - "08. Dreams (Feat. Carmody).info.json": "c7bb7c910c0d74492ef62e4a32922f17", - "09. Dreaming (Interlude) (Feat. Racheal Ofori).info.json": "077efa0aa1d25afb05fb3285f139b77b", - "10. Hopeful (Feat. Jordan Rakei).info.json": "4541ba99f9b683f34652a60bc3c34ff5", - "11. Sunrise (Pillows) (Feat. Emmavie).info.json": "41a7ceb520a7d9e6736cba3f4be6a9c4", + "01. Intro (Feat. Racheal Ofori & Barney Artist).info.json": "d6caed6a753a43d0b04631cef1a8dcb7", + "02. Answers (Feat. Rick David & Kaya Thomas - Dyke).info.json": "2bc497a07f620b2869737c91d4b2408e", + "03. Blaze (Feat. Kaya Thomas - Dyke).info.json": "50f1a853a78d17455f6b07283f13b77b", + "04. What If (Interlude).info.json": "59cfcb53a073943da369ff1e6ebdb3cb", + "05. No Peace (Feat. Tom Misch).info.json": "429ca06333d06d09ea5e958a98afa343", + "06. Closer (Feat. Lester Duval).info.json": "64fca065f1d01bb71cdff18b4e3526e3", + "07. Delusions: Rumination (Interlude) (Feat. Racheal Ofori).info.json": "dccc927e7522642cca3b79c6c15a9c80", + "08. Dreams (Feat. Carmody).info.json": "18e9a4f4609c9110a9da1669debdaf90", + "09. Dreaming (Interlude) (Feat. Racheal Ofori).info.json": "5393cc84a1b48e365ea337c28a66b3ba", + "10. Hopeful (Feat. Jordan Rakei).info.json": "117df1e4cbb2e3d476bc7b2608c3a656", + "11. Sunrise (Pillows) (Feat. Emmavie).info.json": "4ec5967d4a77ef974325243c317b6c0f", "Alfa Mist - Nocturne [Full Album]/01 - 01. Intro (Feat. Racheal Ofori & Barney Artist).mp3": "ddc24257729f24055bf1b8dc06f8224c", "Alfa Mist - Nocturne [Full Album]/02 - 02. Answers (Feat. Rick David & Kaya Thomas - Dyke).mp3": "10dd7f13c469bd51ffcf3f8ff3ed3d69", "Alfa Mist - Nocturne [Full Album]/03 - 03. Blaze (Feat. Kaya Thomas - Dyke).mp3": "376722aaf08d1ef6dcba0aaf7a3b7a79", "Alfa Mist - Nocturne [Full Album]/04 - 04. What If (Interlude).mp3": "2432e53f206149bb48d96eeb10eb1fb0", "Alfa Mist - Nocturne [Full Album]/05 - 05. No Peace (Feat. Tom Misch).mp3": "f01f0f7777cb90656eb83c685b4e2942", "Alfa Mist - Nocturne [Full Album]/06 - 06. Closer (Feat. Lester Duval).mp3": "232c28cb707b3be59f866c02a75e760f", - "Alfa Mist - Nocturne [Full Album]/07 - 07. Delusions: Rumination (Interlude) (Feat. Racheal Ofori).mp3": "2371a376778e5b34265db6b1a68a2c52", + "Alfa Mist - Nocturne [Full Album]/07 - 07. Delusions: Rumination (Interlude) (Feat. Racheal Ofori).mp3": "2371a376778e5b34265db6b1a68a2c52", "Alfa Mist - Nocturne [Full Album]/08 - 08. Dreams (Feat. Carmody).mp3": "a1fad1e44c847ff2c4ef385b15efac64", "Alfa Mist - Nocturne [Full Album]/09 - 09. Dreaming (Interlude) (Feat. Racheal Ofori).mp3": "a60179ce5580943e7db8aad8251aa69e", "Alfa Mist - Nocturne [Full Album]/10 - 10. Hopeful (Feat. Jordan Rakei).mp3": "f34d9b5efd737327b3b1484a59a49544", diff --git a/tests/e2e/resources/expected_downloads_summaries/plugins/split_by_chapters_with_regex_no_chapters_video_pass.txt b/tests/e2e/resources/expected_downloads_summaries/plugins/split_by_chapters_with_regex_no_chapters_video_pass.txt index 0657054e..2879b875 100644 --- a/tests/e2e/resources/expected_downloads_summaries/plugins/split_by_chapters_with_regex_no_chapters_video_pass.txt +++ b/tests/e2e/resources/expected_downloads_summaries/plugins/split_by_chapters_with_regex_no_chapters_video_pass.txt @@ -1,5 +1,5 @@ { - "Oblivion Mod \"Falcor\" p.1.info.json": "358e43cb1c00e7f4c960690994092e9e", - "Oblivion Mod \"Falcor\" p.1/01 - Oblivion Mod \"Falcor\" p.1.mp3": "703ffb93964ac025ee66221b98ee4d49", - "Oblivion Mod \"Falcor\" p.1/folder.jpg": "fb95b510681676e81c321171fc23143e" + "Oblivion Mod "Falcor" p.1.info.json": "1f0ddcab2854a515d27fba208ad23714", + "Oblivion Mod "Falcor" p.1/01 - Oblivion Mod "Falcor" p.1.mp3": "703ffb93964ac025ee66221b98ee4d49", + "Oblivion Mod "Falcor" p.1/folder.jpg": "fb95b510681676e81c321171fc23143e" } \ No newline at end of file diff --git a/tests/e2e/resources/expected_downloads_summaries/plugins/split_by_chapters_with_regex_video.json b/tests/e2e/resources/expected_downloads_summaries/plugins/split_by_chapters_with_regex_video.json index 18eb59df..a7dc5dbb 100644 --- a/tests/e2e/resources/expected_downloads_summaries/plugins/split_by_chapters_with_regex_video.json +++ b/tests/e2e/resources/expected_downloads_summaries/plugins/split_by_chapters_with_regex_video.json @@ -1,25 +1,25 @@ { - "Answers (Feat. Rick David & Kaya Thomas - Dyke).info.json": "b4d6ae81fd1313c5ce962e88ab027782", - "Blaze (Feat. Kaya Thomas - Dyke).info.json": "05857a128e229ac9b364e8f5f09ff4b4", - "Closer (Feat. Lester Duval).info.json": "00c3e84f0b5506051ed31071208ff33d", - "Delusions: Rumination (Interlude) (Feat. Racheal Ofori).info.json": "b360033980fda9bcc3056aed2c3265b1", - "Dreaming (Interlude) (Feat. Racheal Ofori).info.json": "fd3df9675d2b01ad88a6d12d75ab526e", - "Dreams (Feat. Carmody).info.json": "402fb9066d25db35f801a6b94524bb38", - "Hopeful (Feat. Jordan Rakei).info.json": "ab750e7c550aac184f3ef82c3cf64212", - "Intro (Feat. Racheal Ofori & Barney Artist).info.json": "0777ecaaac9ffb1c4df3989e618dedf7", - "No Peace (Feat. Tom Misch).info.json": "0de13987489e4a8f9a94dd91dcbc4cf5", + "Answers (Feat. Rick David & Kaya Thomas - Dyke).info.json": "02a0382fb418e279ae378ae6c79ba736", + "Blaze (Feat. Kaya Thomas - Dyke).info.json": "48ee2257b62a7e2d152bf6633105704a", + "Closer (Feat. Lester Duval).info.json": "4f3f15c93f5fbe5f9bf5154eb3da3ecd", + "Delusions: Rumination (Interlude) (Feat. Racheal Ofori).info.json": "15e3184ac935672ef51ca0ffea44a25d", + "Dreaming (Interlude) (Feat. Racheal Ofori).info.json": "bf97ae0ddddd3dc6546a50ff42e9861e", + "Dreams (Feat. Carmody).info.json": "ab159ed943d1b5d41fe1efd98c94d973", + "Hopeful (Feat. Jordan Rakei).info.json": "05c32307125de1a28586be687c675cc1", + "Intro (Feat. Racheal Ofori & Barney Artist).info.json": "c5dcd31ecc441011f9de08a999f5b0da", + "No Peace (Feat. Tom Misch).info.json": "0f9f982f6e41c73f9925ef18f7c591c6", "Nocturne/01 - Intro (Feat. Racheal Ofori & Barney Artist).mp3": "15157be58e0f72485de1e7e10961321f", "Nocturne/02 - Answers (Feat. Rick David & Kaya Thomas - Dyke).mp3": "28ff5e2dda45771f1c6d5265dd03095e", "Nocturne/03 - Blaze (Feat. Kaya Thomas - Dyke).mp3": "705d7fc1799c1a14aa0656bd6e2bf260", "Nocturne/04 - What If (Interlude).mp3": "9fc7715a2eadec6303a2952cabc8047d", "Nocturne/05 - No Peace (Feat. Tom Misch).mp3": "5c5ca334e214d5dabaa2d8788ed07675", "Nocturne/06 - Closer (Feat. Lester Duval).mp3": "91208771580610afaa010dbe235c0556", - "Nocturne/07 - Delusions: Rumination (Interlude) (Feat. Racheal Ofori).mp3": "cc02d8ae63e7eb056d5354576cd6e718", + "Nocturne/07 - Delusions: Rumination (Interlude) (Feat. Racheal Ofori).mp3": "cc02d8ae63e7eb056d5354576cd6e718", "Nocturne/08 - Dreams (Feat. Carmody).mp3": "bacdc9d1cf26ee0e3c0154785556a2e2", "Nocturne/09 - Dreaming (Interlude) (Feat. Racheal Ofori).mp3": "cd213379cf53a8c1e4eb9134da257cd8", "Nocturne/10 - Hopeful (Feat. Jordan Rakei).mp3": "ef7e06690ac849e1dd35771936d6ddb6", "Nocturne/11 - Sunrise (Pillows) (Feat. Emmavie).mp3": "56293fb70edc1ef7decc2d417d87ff1d", "Nocturne/folder.jpg": "bd3685acc53072e591bae2505ecb0648", - "Sunrise (Pillows) (Feat. Emmavie).info.json": "09f9975e3355e2d5888c07900f54f895", - "What If (Interlude).info.json": "328c05aeb45892d7ad6368e81d0947a5" + "Sunrise (Pillows) (Feat. Emmavie).info.json": "d90c8d11cd2cf7ec20c2b992c74bb93d", + "What If (Interlude).info.json": "c7f78947b22f8ebd838bd4df076944b2" } \ No newline at end of file diff --git a/tests/e2e/resources/expected_downloads_summaries/plugins/test_audio_extract_playlist.json b/tests/e2e/resources/expected_downloads_summaries/plugins/test_audio_extract_playlist.json index b357b31a..c2c31f50 100644 --- a/tests/e2e/resources/expected_downloads_summaries/plugins/test_audio_extract_playlist.json +++ b/tests/e2e/resources/expected_downloads_summaries/plugins/test_audio_extract_playlist.json @@ -1,8 +1,8 @@ { - "Jesse's Minecraft Server [Trailer - Feb.1].info.json": "0a484e88b6d37b20017615aa6df3b5d9", + "Jesse's Minecraft Server [Trailer - Feb.1].info.json": "15940eb703b80f718f8b23b98259ddff", "Jesse's Minecraft Server [Trailer - Feb.1].ogg": "16f66f1d81541a1f18b62bc08ad01d16", - "Jesse's Minecraft Server [Trailer - Feb.27].info.json": "807c9f35c97beac21d8b3ca64df50860", + "Jesse's Minecraft Server [Trailer - Feb.27].info.json": "84a6b6484a68179dac72ec2247a3eb22", "Jesse's Minecraft Server [Trailer - Feb.27].ogg": "6f322d842a1e43b4c9981b42423d9b4c", - "Jesse's Minecraft Server [Trailer - Mar.21].info.json": "b87e89258f04fb3acb669e5b1e0fa468", + "Jesse's Minecraft Server [Trailer - Mar.21].info.json": "7913fbea2ad4d5ea748342559a1a4d82", "Jesse's Minecraft Server [Trailer - Mar.21].ogg": "fe1dc3361a102661c27020d5b95a2a81" } \ No newline at end of file diff --git a/tests/e2e/resources/expected_downloads_summaries/plugins/test_audio_extract_single.json b/tests/e2e/resources/expected_downloads_summaries/plugins/test_audio_extract_single.json index 03192e80..612c988c 100644 --- a/tests/e2e/resources/expected_downloads_summaries/plugins/test_audio_extract_single.json +++ b/tests/e2e/resources/expected_downloads_summaries/plugins/test_audio_extract_single.json @@ -1,4 +1,4 @@ { - "YouTube Rewind 2019: For the Record | #YouTubeRewind.info.json": "ebc30f897906fa0f04738089c7e7715d", - "YouTube Rewind 2019: For the Record | #YouTubeRewind.mp3": "3a156b122bd79c956cce5079d3530cc3" + "YouTube Rewind 2019: For the Record | #YouTubeRewind.info.json": "1ed6876a5e9d78654667a33ff71b2ea3", + "YouTube Rewind 2019: For the Record | #YouTubeRewind.mp3": "3a156b122bd79c956cce5079d3530cc3" } \ No newline at end of file diff --git a/tests/e2e/resources/expected_downloads_summaries/plugins/test_chapters_from_ts_with_subs.json b/tests/e2e/resources/expected_downloads_summaries/plugins/test_chapters_from_ts_with_subs.json index ccae4743..8e6dbb64 100644 --- a/tests/e2e/resources/expected_downloads_summaries/plugins/test_chapters_from_ts_with_subs.json +++ b/tests/e2e/resources/expected_downloads_summaries/plugins/test_chapters_from_ts_with_subs.json @@ -1,6 +1,6 @@ { "JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case-thumb.jpg": "b5353a824a4800cc26f884e3025ed969", - "JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.info.json": "89d611e4f61a72204b9658acd492468d", + "JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.info.json": "f6ccef77e006c1c6c9ef5c94df5e38f2", "JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.mp4": "2d40822bf4c0527f9080f00357b26ce0", "JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.nfo": "b9bd35e4f260c728774d8dd31f83637c" } \ No newline at end of file diff --git a/tests/e2e/resources/expected_downloads_summaries/plugins/test_chapters_sb_and_embedded_subs.json b/tests/e2e/resources/expected_downloads_summaries/plugins/test_chapters_sb_and_embedded_subs.json index 68ad2956..4f175335 100644 --- a/tests/e2e/resources/expected_downloads_summaries/plugins/test_chapters_sb_and_embedded_subs.json +++ b/tests/e2e/resources/expected_downloads_summaries/plugins/test_chapters_sb_and_embedded_subs.json @@ -1,6 +1,6 @@ { "JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case-thumb.jpg": "b5353a824a4800cc26f884e3025ed969", - "JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.info.json": "c0ad8fd87d9a70bd66ce069ae0acd490", + "JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.info.json": "e49ee50fbe88e7d1415f2df84e9c85cb", "JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.mp4": "6f0bac1c364ff3bb13d3e8a955aaa002", "JMC - This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.nfo": "b9bd35e4f260c728774d8dd31f83637c" } \ No newline at end of file diff --git a/tests/e2e/resources/expected_downloads_summaries/plugins/test_subtitles_embedded.json b/tests/e2e/resources/expected_downloads_summaries/plugins/test_subtitles_embedded.json index 00c0f979..d050e85f 100644 --- a/tests/e2e/resources/expected_downloads_summaries/plugins/test_subtitles_embedded.json +++ b/tests/e2e/resources/expected_downloads_summaries/plugins/test_subtitles_embedded.json @@ -1,6 +1,6 @@ { "JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind-thumb.jpg": "50ee47c80f679029f5d3503bb91b045a", - "JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.info.json": "eedd73b78d8a9d3b129049e87eb17b6c", + "JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.info.json": "d34427224f4dbc62a0c6b48dbd10ec01", "JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.mp4": "8562853314b75c1e47abd4f5ba97315c", "JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.nfo": "c64964fab07574080e5da3242e3bfd48" } \ No newline at end of file diff --git a/tests/e2e/resources/expected_downloads_summaries/plugins/test_subtitles_embedded_and_file.json b/tests/e2e/resources/expected_downloads_summaries/plugins/test_subtitles_embedded_and_file.json index c376b9d0..6f916966 100644 --- a/tests/e2e/resources/expected_downloads_summaries/plugins/test_subtitles_embedded_and_file.json +++ b/tests/e2e/resources/expected_downloads_summaries/plugins/test_subtitles_embedded_and_file.json @@ -2,7 +2,7 @@ "JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind-thumb.jpg": "50ee47c80f679029f5d3503bb91b045a", "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.info.json": "577038a7e5a9833ebbd33562f5d6b376", + "JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.info.json": "9cdc849168fbc91724fe6fe6e4b72fed", "JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.mp4": "8562853314b75c1e47abd4f5ba97315c", "JMC - YouTube Rewind 2019: For the Record | #YouTubeRewind.nfo": "c64964fab07574080e5da3242e3bfd48" } \ No newline at end of file diff --git a/tests/e2e/resources/expected_downloads_summaries/soundcloud/test_soundcloud_discography.json b/tests/e2e/resources/expected_downloads_summaries/soundcloud/test_soundcloud_discography.json index 47dcb24d..24a7ae00 100644 --- a/tests/e2e/resources/expected_downloads_summaries/soundcloud/test_soundcloud_discography.json +++ b/tests/e2e/resources/expected_downloads_summaries/soundcloud/test_soundcloud_discography.json @@ -1,32 +1,32 @@ { ".ytdl-sub-jb-download-archive.json": "1114f07090dfb35eea6848efeaf9755a", - "j_b/[2021] Baby Santana's Dorian Groove/01 - Baby Santana's Dorian Groove.info.json": "8f736aac8bbaa732e89efdcb61c3bc3d", + "j_b/[2021] Baby Santana's Dorian Groove/01 - Baby Santana's Dorian Groove.info.json": "5eb47f40cb9de8fd324d66c31995f934", "j_b/[2021] Baby Santana's Dorian Groove/01 - Baby Santana's Dorian Groove.mp3": "bffbd558e12c6a9e029dc136a88342c4", "j_b/[2021] Baby Santana's Dorian Groove/folder.jpg": "967892be44b8c47e1be73f055a7c6f08", - "j_b/[2021] Purple Clouds/01 - Purple Clouds.info.json": "da0a923a6d0272e4dc726ac997360b28", + "j_b/[2021] Purple Clouds/01 - Purple Clouds.info.json": "3301ac86ee70a05abe0588277d1e4a6c", "j_b/[2021] Purple Clouds/01 - Purple Clouds.mp3": "038db58aebe2ba875b733932b42a94d6", "j_b/[2021] Purple Clouds/folder.jpg": "967892be44b8c47e1be73f055a7c6f08", - "j_b/[2022] Acoustic Treats/01 - 20160426 184214.info.json": "f952fe0830f106fac031d18022213892", + "j_b/[2022] Acoustic Treats/01 - 20160426 184214.info.json": "6d5cc99d594bd5b7183a37b005225400", "j_b/[2022] Acoustic Treats/01 - 20160426 184214.mp3": "e145f0a2f6012768280c38655ca58065", - "j_b/[2022] Acoustic Treats/02 - 20160502 123150.info.json": "63f5a211448f95c78b866f048e4f2fc9", + "j_b/[2022] Acoustic Treats/02 - 20160502 123150.info.json": "6d73a0fc77aa8b718857236d9f7c6cbd", "j_b/[2022] Acoustic Treats/02 - 20160502 123150.mp3": "60c8b8817a197a13e4bb90903af612c5", - "j_b/[2022] Acoustic Treats/03 - 20160504 143832.info.json": "a363365339ad3ab5139a51a6a6ed256d", + "j_b/[2022] Acoustic Treats/03 - 20160504 143832.info.json": "4e6fc80669ee79572182d3066575a6a7", "j_b/[2022] Acoustic Treats/03 - 20160504 143832.mp3": "8265b7e4f79878af877bc6ecd9757efe", - "j_b/[2022] Acoustic Treats/04 - 20160601 221234.info.json": "9a1901fbd9761e29173b0fda5654e908", + "j_b/[2022] Acoustic Treats/04 - 20160601 221234.info.json": "80aef642112e661d6eb30e0038cc7aed", "j_b/[2022] Acoustic Treats/04 - 20160601 221234.mp3": "accf46b76891d2954b893d0f91d82816", - "j_b/[2022] Acoustic Treats/05 - 20160601 222440.info.json": "886716e85228d46ce981aa0ba7bc2947", + "j_b/[2022] Acoustic Treats/05 - 20160601 222440.info.json": "25e5abf44f3bdb57c045c82121f7d11c", "j_b/[2022] Acoustic Treats/05 - 20160601 222440.mp3": "e1f584f523336160d5c1104a61de77f3", - "j_b/[2022] Acoustic Treats/06 - 20170604 190236.info.json": "d23e769c83bc3303709b64432400a60d", + "j_b/[2022] Acoustic Treats/06 - 20170604 190236.info.json": "4524f03ec40823085bc08294b108bfa9", "j_b/[2022] Acoustic Treats/06 - 20170604 190236.mp3": "f6885b25901177f0357649afe97328cc", - "j_b/[2022] Acoustic Treats/07 - 20170612 193646.info.json": "04f467b4903aa9f090dc705db432edf2", + "j_b/[2022] Acoustic Treats/07 - 20170612 193646.info.json": "83e5d1403994a9ecd20a9dcb545a4cb6", "j_b/[2022] Acoustic Treats/07 - 20170612 193646.mp3": "fa057f221cbe4cf2442cd2fdb960743e", - "j_b/[2022] Acoustic Treats/08 - 20170628 215206.info.json": "92f027ec29f445566242a82c27ed76ad", + "j_b/[2022] Acoustic Treats/08 - 20170628 215206.info.json": "5bccfb88c2441af51294cefb988ef131", "j_b/[2022] Acoustic Treats/08 - 20170628 215206.mp3": "7794ae812c64580e2ac8fc457d5cc85f", - "j_b/[2022] Acoustic Treats/09 - Finding Home.info.json": "f7458eaab93903e1568734ea1b33ee21", + "j_b/[2022] Acoustic Treats/09 - Finding Home.info.json": "84347cdbfb61ed1e2c21d3cab7325966", "j_b/[2022] Acoustic Treats/09 - Finding Home.mp3": "adbf02eddb2090c008eb497d13ff84b9", - "j_b/[2022] Acoustic Treats/10 - Shallow Water WIP.info.json": "553e676f982b364493fd323e6d886e05", + "j_b/[2022] Acoustic Treats/10 - Shallow Water WIP.info.json": "1eacf5411e7e7041609c9d194013c78d", "j_b/[2022] Acoustic Treats/10 - Shallow Water WIP.mp3": "65bb10c84366c71498161734f953e93d", - "j_b/[2022] Acoustic Treats/11 - Untold History.info.json": "8abbad5d0821ed6c64dc632b49a133ec", + "j_b/[2022] Acoustic Treats/11 - Untold History.info.json": "0ab0eb6aa6e8b3f38076aeed0fae2a13", "j_b/[2022] Acoustic Treats/11 - Untold History.mp3": "6904b2918e5dc38d9a9f72d967eb74bf", "j_b/[2022] Acoustic Treats/folder.jpg": "967892be44b8c47e1be73f055a7c6f08" } \ No newline at end of file diff --git a/tests/e2e/resources/expected_downloads_summaries/youtube/test_channel_full.json b/tests/e2e/resources/expected_downloads_summaries/youtube/test_channel_full.json index c225d558..affca557 100644 --- a/tests/e2e/resources/expected_downloads_summaries/youtube/test_channel_full.json +++ b/tests/e2e/resources/expected_downloads_summaries/youtube/test_channel_full.json @@ -1,52 +1,52 @@ { ".ytdl-sub-pz-download-archive.json": "70615451318cdb5e018e007c77893a39", "Season 2010/s2010.e0813 - Oblivion Mod "Falcor" p.1-thumb.jpg": "fb95b510681676e81c321171fc23143e", - "Season 2010/s2010.e0813 - Oblivion Mod "Falcor" p.1.info.json": "cb199cde602c000f76a165bda693df0b", + "Season 2010/s2010.e0813 - Oblivion Mod "Falcor" p.1.info.json": "321813dd5598303d5fc91c7aa302f1b5", "Season 2010/s2010.e0813 - Oblivion Mod "Falcor" p.1.mp4": "931a705864c57d21d6fedebed4af6bbc", "Season 2010/s2010.e0813 - Oblivion Mod "Falcor" p.1.nfo": "2d0738094d8e649eaebbab16fd647da1", "Season 2010/s2010.e1202 - Oblivion Mod "Falcor" p.2-thumb.jpg": "8b32ee9c037fa669e444a0ac181525a1", - "Season 2010/s2010.e1202 - Oblivion Mod "Falcor" p.2.info.json": "b6a315411037bec72dfec667ac858efd", + "Season 2010/s2010.e1202 - Oblivion Mod "Falcor" p.2.info.json": "461c98e86a4c3848fd89671a78900131", "Season 2010/s2010.e1202 - Oblivion Mod "Falcor" p.2.mp4": "d3469b4dca7139cb3dbc38712b6796bf", "Season 2010/s2010.e1202 - Oblivion Mod "Falcor" p.2.nfo": "5c258f9e54854ef292ce3c58331da110", "Season 2011/s2011.e0201 - Jesse's Minecraft Server [Trailer - Feb.1]-thumb.jpg": "b232d253df621aa770b780c1301d364d", - "Season 2011/s2011.e0201 - Jesse's Minecraft Server [Trailer - Feb.1].info.json": "b8c0fbca0e20b010d7645ff7bfd4b338", + "Season 2011/s2011.e0201 - Jesse's Minecraft Server [Trailer - Feb.1].info.json": "ccb88e48fa500e74f7a51fcac5d4934d", "Season 2011/s2011.e0201 - Jesse's Minecraft Server [Trailer - Feb.1].mp4": "e66287b9832277b6a4d1554e29d9fdcc", "Season 2011/s2011.e0201 - Jesse's Minecraft Server [Trailer - Feb.1].nfo": "abb3ac33366cc3b86d0467c8fb80a323", "Season 2011/s2011.e0227 - Jesse's Minecraft Server [Trailer - Feb.27]-thumb.jpg": "d17c379ea8b362f5b97c6b213b0342cb", - "Season 2011/s2011.e0227 - Jesse's Minecraft Server [Trailer - Feb.27].info.json": "f17666dc3d9b54034cdec31f7e68accd", + "Season 2011/s2011.e0227 - Jesse's Minecraft Server [Trailer - Feb.27].info.json": "157d3cb2fdb0f47d924fbab5a07bbe9e", "Season 2011/s2011.e0227 - Jesse's Minecraft Server [Trailer - Feb.27].mp4": "04ab5cb3cc12325d0c96a7cd04a8b91d", "Season 2011/s2011.e0227 - Jesse's Minecraft Server [Trailer - Feb.27].nfo": "46190954652c9d9812e061fc0c9e1d92", "Season 2011/s2011.e0321 - Jesse's Minecraft Server [Trailer - Mar.21]-thumb.jpg": "e7830aa8a64b0cde65ba3f7e5fc56530", - "Season 2011/s2011.e0321 - Jesse's Minecraft Server [Trailer - Mar.21].info.json": "fc8104b6194500847e3de85ec00d9d99", + "Season 2011/s2011.e0321 - Jesse's Minecraft Server [Trailer - Mar.21].info.json": "9660710f3aab66cbfaaa485eac55db13", "Season 2011/s2011.e0321 - Jesse's Minecraft Server [Trailer - Mar.21].mp4": "025de6099a5c98e6397153c7a62d517d", "Season 2011/s2011.e0321 - Jesse's Minecraft Server [Trailer - Mar.21].nfo": "30993fa8e00a0e370b4db244f3da8f7d", "Season 2011/s2011.e0529 - Project Zombie |Official Trailer| (IP: mc.projectzombie.beastnode.net)-thumb.jpg": "c956192a379b3661595c9920972d4819", - "Season 2011/s2011.e0529 - Project Zombie |Official Trailer| (IP: mc.projectzombie.beastnode.net).info.json": "4dbfe145b6e935c70410f4e5d46d79bc", + "Season 2011/s2011.e0529 - Project Zombie |Official Trailer| (IP: mc.projectzombie.beastnode.net).info.json": "d43ca09cff753e13c4d4badaad8b8cf3", "Season 2011/s2011.e0529 - Project Zombie |Official Trailer| (IP: mc.projectzombie.beastnode.net).mp4": "3d9c19835b03355d6fd5d00cd59dbe5b", "Season 2011/s2011.e0529 - Project Zombie |Official Trailer| (IP: mc.projectzombie.beastnode.net).nfo": "11a0e8754c414875bcd454358683da5f", "Season 2011/s2011.e0630 - Project Zombie |Fin|-thumb.jpg": "00ed383591779ffe98291de60f198fe9", - "Season 2011/s2011.e0630 - Project Zombie |Fin|.info.json": "ac137469ca4522387c06ef5959d663ce", + "Season 2011/s2011.e0630 - Project Zombie |Fin|.info.json": "351c14be8af8b7811515533f778252af", "Season 2011/s2011.e0630 - Project Zombie |Fin|.mp4": "4971cb2d4fa29460361031f3fa8e1ea9", "Season 2011/s2011.e0630 - Project Zombie |Fin|.nfo": "a464b9c8c48a9a5d4776436d8108f8f5", "Season 2011/s2011.e1121 - Skyrim 'Ultra HD w⧸Mods' [PC]-thumb.jpg": "1718599d5189c65f7d8cf6acfa5ea851", - "Season 2011/s2011.e1121 - Skyrim 'Ultra HD w⧸Mods' [PC].info.json": "ba85f0fc25267340d698b35efdfd69a6", + "Season 2011/s2011.e1121 - Skyrim 'Ultra HD w⧸Mods' [PC].info.json": "a46366e7be54d3cb755a8a2994a55d3e", "Season 2011/s2011.e1121 - Skyrim 'Ultra HD w⧸Mods' [PC].mp4": "55e9b0add08c48c9c66105da0def2426", "Season 2011/s2011.e1121 - Skyrim 'Ultra HD w⧸Mods' [PC].nfo": "3562934ab9a5e802d955eda24ad355de", "Season 2012/s2012.e0123 - Project Zombie |Map Trailer|-thumb.jpg": "54ebe9df801b278fdd17b21afa8373a6", - "Season 2012/s2012.e0123 - Project Zombie |Map Trailer|.info.json": "87579708714856023e39f0f9b1490e43", + "Season 2012/s2012.e0123 - Project Zombie |Map Trailer|.info.json": "64857d41adcad52bf97611e4fcae292d", "Season 2012/s2012.e0123 - Project Zombie |Map Trailer|.mp4": "65e4ce53ed5ec4139995469f99477a50", "Season 2012/s2012.e0123 - Project Zombie |Map Trailer|.nfo": "5e810d839be90dab579400a6177f90b3", "Season 2013/s2013.e0719 - Project Zombie Rewind |Trailer|-thumb.jpg": "e29d49433175de8a761af35c5307791f", - "Season 2013/s2013.e0719 - Project Zombie Rewind |Trailer|.info.json": "41aa5b9032f9a168323e8f317576e46d", + "Season 2013/s2013.e0719 - Project Zombie Rewind |Trailer|.info.json": "8d18bb9557625b910dd044f158969d05", "Season 2013/s2013.e0719 - Project Zombie Rewind |Trailer|.mp4": "18620a8257a686beda65e54add4d4cd1", "Season 2013/s2013.e0719 - Project Zombie Rewind |Trailer|.nfo": "83772bec917bb5d71e1ca0c061c1ec78", "Season 2018/s2018.e1029 - Jesse's Minecraft Server | Teaser Trailer-thumb.jpg": "705ca4e0d99b37e9ecdf6bfe4b90c59b", - "Season 2018/s2018.e1029 - Jesse's Minecraft Server | Teaser Trailer.info.json": "5c6d35f49bca1595780cca5dcc2806c7", + "Season 2018/s2018.e1029 - Jesse's Minecraft Server | Teaser Trailer.info.json": "d9088a723ce5445c88bf72cb5a39b933", "Season 2018/s2018.e1029 - Jesse's Minecraft Server | Teaser Trailer.mp4": "82f6ee7253e1dbb83ae7215af08ffacc", "Season 2018/s2018.e1029 - Jesse's Minecraft Server | Teaser Trailer.nfo": "368d68db0cbe9eb4f43ece0517445e82", "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id-thumb.jpg": "28d852ede73b879b9ebf9a061cfc7d46", "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.en.srt": "3d2c4e7f65d2ca5e96da38ce7eecfc4e", - "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.info.json": "de7779c95f99ea107afee7ac0409c10c", + "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.info.json": "7907cf957d8de4d4036af60d686061f5", "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.mp4": "e733b4cc385b953b08c8eb0f47e03c1e", "Season 2018/s2018.e1102 - Jesse's Minecraft Server | IP mc.jesse.id.nfo": "d9114d43d87907b2afc06eb089a8ac0a", "fanart.jpg": "129c6639b47299bc48062f0365e670ee", diff --git a/tests/e2e/resources/expected_downloads_summaries/youtube/test_merge_playlist.json b/tests/e2e/resources/expected_downloads_summaries/youtube/test_merge_playlist.json index b0db8a93..830bf42d 100644 --- a/tests/e2e/resources/expected_downloads_summaries/youtube/test_merge_playlist.json +++ b/tests/e2e/resources/expected_downloads_summaries/youtube/test_merge_playlist.json @@ -1,6 +1,6 @@ { "JMC - Jesse's Minecraft Server-thumb.jpg": "a3f1910f9c51f6442f845a528e190829", - "JMC - Jesse's Minecraft Server.info.json": "604a3e1f5b0f27524772a90869fbbe06", + "JMC - Jesse's Minecraft Server.info.json": "5f54afde1f0965c2ede30291d978c7bf", "JMC - Jesse's Minecraft Server.mkv": "21f246b1c922e11add509ea26c43c53d", "JMC - Jesse's Minecraft Server.nfo": "d16396c60b63c06a4f2c9239553bdf61" } \ No newline at end of file diff --git a/tests/e2e/resources/expected_downloads_summaries/youtube/test_playlist.json b/tests/e2e/resources/expected_downloads_summaries/youtube/test_playlist.json index a5e97f22..fa44bf04 100644 --- a/tests/e2e/resources/expected_downloads_summaries/youtube/test_playlist.json +++ b/tests/e2e/resources/expected_downloads_summaries/youtube/test_playlist.json @@ -1,15 +1,15 @@ { ".ytdl-sub-music_video_playlist_test-download-archive.json": "25b8e44961343116436584e341c7fe9b", "JMC - Jesse's Minecraft Server [Trailer - Feb.1]-thumb.jpg": "b232d253df621aa770b780c1301d364d", - "JMC - Jesse's Minecraft Server [Trailer - Feb.1].info.json": "149149c22855a42532bc11384a04d407", + "JMC - Jesse's Minecraft Server [Trailer - Feb.1].info.json": "a1763e5afb49be0935d932334336f62f", "JMC - Jesse's Minecraft Server [Trailer - Feb.1].mp4": "e66287b9832277b6a4d1554e29d9fdcc", "JMC - Jesse's Minecraft Server [Trailer - Feb.1].nfo": "f8fd72bb97ed03938487494ad9094ca0", "JMC - Jesse's Minecraft Server [Trailer - Feb.27]-thumb.jpg": "d17c379ea8b362f5b97c6b213b0342cb", - "JMC - Jesse's Minecraft Server [Trailer - Feb.27].info.json": "bb7a96dce625354e25ab7482a6e59912", + "JMC - Jesse's Minecraft Server [Trailer - Feb.27].info.json": "2d3b4299450776edd822514d071671a4", "JMC - Jesse's Minecraft Server [Trailer - Feb.27].mp4": "04ab5cb3cc12325d0c96a7cd04a8b91d", "JMC - Jesse's Minecraft Server [Trailer - Feb.27].nfo": "6de4d997cfb300356072b4ebb09cbe38", "JMC - Jesse's Minecraft Server [Trailer - Mar.21]-thumb.jpg": "e7830aa8a64b0cde65ba3f7e5fc56530", - "JMC - Jesse's Minecraft Server [Trailer - Mar.21].info.json": "dda22d8d8dfdc4fb49c0deab4ab214b0", + "JMC - Jesse's Minecraft Server [Trailer - Mar.21].info.json": "17a942919cb951d7cfd0dcc502bf4499", "JMC - Jesse's Minecraft Server [Trailer - Mar.21].mp4": "025de6099a5c98e6397153c7a62d517d", "JMC - Jesse's Minecraft Server [Trailer - Mar.21].nfo": "f000a6ed8caacb62a134a6ca81e3f308", "tvshow.nfo": "792b0594defdfd6642086b76fcc6a91b" diff --git a/tests/e2e/resources/expected_downloads_summaries/youtube/test_split_video.json b/tests/e2e/resources/expected_downloads_summaries/youtube/test_split_video.json index 60a8da02..31ad6e66 100644 --- a/tests/e2e/resources/expected_downloads_summaries/youtube/test_split_video.json +++ b/tests/e2e/resources/expected_downloads_summaries/youtube/test_split_video.json @@ -6,21 +6,21 @@ "Project Zombie - 5-6.Part 4.mp4": "de9afd0b6fa5f845b086e2d4915f2f14", "Project Zombie - 6-6.Part 5.mp4": "d485c2a5df9a2d5bf9037a7a96a04d10", "Project Zombie - Intro-thumb.jpg": "fb95b510681676e81c321171fc23143e", - "Project Zombie - Intro.info.json": "0aa234ae04a218f18c9aa2eb605ff078", + "Project Zombie - Intro.info.json": "fbb0c8cc4db7e0d3fe7ad944e7b7ef35", "Project Zombie - Intro.nfo": "3a89bd4707e64b66a22d13bb7f81bf16", "Project Zombie - Part 1-thumb.jpg": "fb95b510681676e81c321171fc23143e", - "Project Zombie - Part 1.info.json": "1d1a70bf1bd9753c7035c9069fb99859", + "Project Zombie - Part 1.info.json": "96ab416ebf6b7e334ad7a97f131c6cdc", "Project Zombie - Part 1.nfo": "a57a3a98d0b9db655bc4a792953ab96e", "Project Zombie - Part 2-thumb.jpg": "fb95b510681676e81c321171fc23143e", - "Project Zombie - Part 2.info.json": "2781ca7fae971ca7a2825a6f16f432aa", + "Project Zombie - Part 2.info.json": "e4912c1b4a400e0c1f9a99d2033a6883", "Project Zombie - Part 2.nfo": "68921dd5386fd90e2c0640127dda5dc2", "Project Zombie - Part 3-thumb.jpg": "fb95b510681676e81c321171fc23143e", - "Project Zombie - Part 3.info.json": "2d79048f59070044e519ab68ef469d62", + "Project Zombie - Part 3.info.json": "97195f3d2fa83e158c33fe9b43a0fd35", "Project Zombie - Part 3.nfo": "4198aec2d4cd70e4cb3946f10be205a7", "Project Zombie - Part 4-thumb.jpg": "fb95b510681676e81c321171fc23143e", - "Project Zombie - Part 4.info.json": "4074e8d1fa1c0fccf1fe55ba52cc46a1", + "Project Zombie - Part 4.info.json": "aa6844f8e820067bf4059bea5e72e514", "Project Zombie - Part 4.nfo": "8a87fa99c5ba5b11cd14c592a0b97dbb", "Project Zombie - Part 5-thumb.jpg": "fb95b510681676e81c321171fc23143e", - "Project Zombie - Part 5.info.json": "48b519b3867bafb51c8f463293f357c3", + "Project Zombie - Part 5.info.json": "f2d81af7e950dcc4c41de83b415617ee", "Project Zombie - Part 5.nfo": "73091166bd5bd3d65d7e481e317ed128" } \ No newline at end of file diff --git a/tests/e2e/resources/expected_downloads_summaries/youtube/test_video.json b/tests/e2e/resources/expected_downloads_summaries/youtube/test_video.json index 44d92c00..33c026fd 100644 --- a/tests/e2e/resources/expected_downloads_summaries/youtube/test_video.json +++ b/tests/e2e/resources/expected_downloads_summaries/youtube/test_video.json @@ -1,6 +1,6 @@ { "JMC - Oblivion Mod "Falcor" p.1-thumb.jpg": "fb95b510681676e81c321171fc23143e", - "JMC - Oblivion Mod "Falcor" p.1.info.json": "b7e3751fe749817392d2d69be71a391c", + "JMC - Oblivion Mod "Falcor" p.1.info.json": "9ded1b3bd37e1d8d04a417dfb8291810", "JMC - Oblivion Mod "Falcor" p.1.mp4": "28c14cdac05c803efe71abb9454ab306", "JMC - Oblivion Mod "Falcor" p.1.nfo": "24cc4e17d2bebc89b2759ce5471d403e" } \ No newline at end of file diff --git a/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_video-dry-run.txt b/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_video-dry-run.txt index 0bf96738..61047697 100644 --- a/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_video-dry-run.txt +++ b/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_video-dry-run.txt @@ -6,7 +6,7 @@ Files created in '{output_directory}' 04. What If (Interlude).info.json 05. No Peace (Feat. Tom Misch).info.json 06. Closer (Feat. Lester Duval).info.json -07. Delusions: Rumination (Interlude) (Feat. Racheal Ofori).info.json +07. Delusions: Rumination (Interlude) (Feat. Racheal Ofori).info.json 08. Dreams (Feat. Carmody).info.json 09. Dreaming (Interlude) (Feat. Racheal Ofori).info.json 10. Hopeful (Feat. Jordan Rakei).info.json @@ -89,7 +89,7 @@ Alfa Mist - Nocturne [Full Album]/06 - 06. Closer (Feat. Lester Duval).mp3 title: 06. Closer (Feat. Lester Duval) track: 6 year: 2017 -Alfa Mist - Nocturne [Full Album]/07 - 07. Delusions: Rumination (Interlude) (Feat. Racheal Ofori).mp3 +Alfa Mist - Nocturne [Full Album]/07 - 07. Delusions: Rumination (Interlude) (Feat. Racheal Ofori).mp3 From Chapter Split: Warning: Dry-run assumes embedded chapters with no modifications Source Title: Alfa Mist - Nocturne [Full Album] diff --git a/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_video.txt b/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_video.txt index 793a1533..e96eb343 100644 --- a/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_video.txt +++ b/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_video.txt @@ -6,7 +6,7 @@ Files created in '{output_directory}' 04. What If (Interlude).info.json 05. No Peace (Feat. Tom Misch).info.json 06. Closer (Feat. Lester Duval).info.json -07. Delusions: Rumination (Interlude) (Feat. Racheal Ofori).info.json +07. Delusions: Rumination (Interlude) (Feat. Racheal Ofori).info.json 08. Dreams (Feat. Carmody).info.json 09. Dreaming (Interlude) (Feat. Racheal Ofori).info.json 10. Hopeful (Feat. Jordan Rakei).info.json @@ -83,7 +83,7 @@ Alfa Mist - Nocturne [Full Album]/06 - 06. Closer (Feat. Lester Duval).mp3 title: 06. Closer (Feat. Lester Duval) track: 6 year: 2017 -Alfa Mist - Nocturne [Full Album]/07 - 07. Delusions: Rumination (Interlude) (Feat. Racheal Ofori).mp3 +Alfa Mist - Nocturne [Full Album]/07 - 07. Delusions: Rumination (Interlude) (Feat. Racheal Ofori).mp3 From Chapter Split: Source Title: Alfa Mist - Nocturne [Full Album] Segment: 17:57 - 20:05 diff --git a/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_with_regex_no_chapters_video_pass.txt b/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_with_regex_no_chapters_video_pass.txt index 0a5742a0..38de4cb0 100644 --- a/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_with_regex_no_chapters_video_pass.txt +++ b/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_with_regex_no_chapters_video_pass.txt @@ -1,7 +1,7 @@ Files created in '{output_directory}' ---------------------------------------- -Oblivion Mod "Falcor" p.1.info.json -Oblivion Mod "Falcor" p.1/01 - Oblivion Mod "Falcor" p.1.mp3 +Oblivion Mod "Falcor" p.1.info.json +Oblivion Mod "Falcor" p.1/01 - Oblivion Mod "Falcor" p.1.mp3 Music Tags: album: Oblivion Mod "Falcor" p.1 albumartist: Project Zombie @@ -10,4 +10,4 @@ Oblivion Mod "Falcor" p.1/01 - Oblivion Mod "Falcor" p.1.mp3 title: Oblivion Mod "Falcor" p.1 track: 1 year: 2010 -Oblivion Mod "Falcor" p.1/folder.jpg \ No newline at end of file +Oblivion Mod "Falcor" p.1/folder.jpg \ No newline at end of file diff --git a/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_with_regex_video-dry-run.txt b/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_with_regex_video-dry-run.txt index 15f5e407..8302623a 100644 --- a/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_with_regex_video-dry-run.txt +++ b/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_with_regex_video-dry-run.txt @@ -3,7 +3,7 @@ Files created in '{output_directory}' Answers (Feat. Rick David & Kaya Thomas - Dyke).info.json Blaze (Feat. Kaya Thomas - Dyke).info.json Closer (Feat. Lester Duval).info.json -Delusions: Rumination (Interlude) (Feat. Racheal Ofori).info.json +Delusions: Rumination (Interlude) (Feat. Racheal Ofori).info.json Dreaming (Interlude) (Feat. Racheal Ofori).info.json Dreams (Feat. Carmody).info.json Hopeful (Feat. Jordan Rakei).info.json @@ -87,7 +87,7 @@ Nocturne/06 - Closer (Feat. Lester Duval).mp3 title: Closer (Feat. Lester Duval) track: 6 year: 2017 -Nocturne/07 - Delusions: Rumination (Interlude) (Feat. Racheal Ofori).mp3 +Nocturne/07 - Delusions: Rumination (Interlude) (Feat. Racheal Ofori).mp3 From Chapter Split: Warning: Dry-run assumes embedded chapters with no modifications Source Title: Alfa Mist - Nocturne [Full Album] diff --git a/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_with_regex_video.txt b/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_with_regex_video.txt index 0efb31dd..c76b8a2b 100644 --- a/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_with_regex_video.txt +++ b/tests/e2e/resources/transaction_log_summaries/plugins/split_by_chapters_with_regex_video.txt @@ -3,7 +3,7 @@ Files created in '{output_directory}' Answers (Feat. Rick David & Kaya Thomas - Dyke).info.json Blaze (Feat. Kaya Thomas - Dyke).info.json Closer (Feat. Lester Duval).info.json -Delusions: Rumination (Interlude) (Feat. Racheal Ofori).info.json +Delusions: Rumination (Interlude) (Feat. Racheal Ofori).info.json Dreaming (Interlude) (Feat. Racheal Ofori).info.json Dreams (Feat. Carmody).info.json Hopeful (Feat. Jordan Rakei).info.json @@ -81,7 +81,7 @@ Nocturne/06 - Closer (Feat. Lester Duval).mp3 title: Closer (Feat. Lester Duval) track: 6 year: 2017 -Nocturne/07 - Delusions: Rumination (Interlude) (Feat. Racheal Ofori).mp3 +Nocturne/07 - Delusions: Rumination (Interlude) (Feat. Racheal Ofori).mp3 From Chapter Split: Source Title: Alfa Mist - Nocturne [Full Album] Segment: 17:57 - 20:05 diff --git a/tests/e2e/resources/transaction_log_summaries/plugins/test_audio_extract_single.txt b/tests/e2e/resources/transaction_log_summaries/plugins/test_audio_extract_single.txt index fa01724c..6421e8eb 100644 --- a/tests/e2e/resources/transaction_log_summaries/plugins/test_audio_extract_single.txt +++ b/tests/e2e/resources/transaction_log_summaries/plugins/test_audio_extract_single.txt @@ -1,7 +1,7 @@ Files created in '{output_directory}' ---------------------------------------- -YouTube Rewind 2019: For the Record | #YouTubeRewind.info.json -YouTube Rewind 2019: For the Record | #YouTubeRewind.mp3 +YouTube Rewind 2019: For the Record | #YouTubeRewind.info.json +YouTube Rewind 2019: For the Record | #YouTubeRewind.mp3 Music Tags: album: Singles albumartist: YouTube diff --git a/tests/unit/validators/test_string_formatter_validator.py b/tests/unit/validators/test_string_formatter_validator.py index 4a30ba7b..9481ec2a 100644 --- a/tests/unit/validators/test_string_formatter_validator.py +++ b/tests/unit/validators/test_string_formatter_validator.py @@ -1,4 +1,5 @@ import pytest +from yt_dlp.utils import sanitize_filename from ytdl_sub.utils.exceptions import StringFormattingException from ytdl_sub.utils.exceptions import ValidationException @@ -146,6 +147,18 @@ class TestStringFormatterValidator(object): assert format_string.apply_formatter(variable_dict=variable_dict) == expected_string + def test_entry_formatter_override_sanitized_recursive(self, string_formatter_class): + variable_dict = { + "level_a": "level a", + "level_b": "level b ? {level_a}", + "level_c_sanitized": "level c and {level_b}", + } + + format_string = string_formatter_class(name="test", value="level d and {level_c_sanitized}") + expected_string = "level d and " + sanitize_filename("level c and level b ? level a") + + assert format_string.apply_formatter(variable_dict=variable_dict) == expected_string + def test_entry_formatter_override_recursive_fail_cycle(self, string_formatter_class): variable_dict = { "level_a": "{level_b}",