diff --git a/src/ytdl_sub/utils/thumbnail.py b/src/ytdl_sub/utils/thumbnail.py index a999f01c..8f7ba153 100644 --- a/src/ytdl_sub/utils/thumbnail.py +++ b/src/ytdl_sub/utils/thumbnail.py @@ -72,8 +72,7 @@ def download_and_convert_url_thumbnail( if not thumbnail_url: return None - # timeout after 8 seconds - with urlopen(thumbnail_url, timeout=1.0) as file: + with urlopen(thumbnail_url, timeout=7.0) as file: with tempfile.NamedTemporaryFile(delete=False) as thumbnail: thumbnail.write(file.read()) diff --git a/tests/resources/expected_downloads_summaries/bandcamp/test_artist_url.json b/tests/resources/expected_downloads_summaries/bandcamp/test_artist_url.json index f56b6371..268b0aab 100644 --- a/tests/resources/expected_downloads_summaries/bandcamp/test_artist_url.json +++ b/tests/resources/expected_downloads_summaries/bandcamp/test_artist_url.json @@ -1,10 +1,5 @@ { - ".ytdl-sub-Sithu Aye-download-archive.json": "1c4bcf58581eac1851be92ee29a3c4d7", - "Sithu Aye/[2021] 10 Years: Remixes and Reimaginings/01 - Double Helix Reimagined.mp3": "ac0e6a2936c309765c69a4c98c42ad10", - "Sithu Aye/[2021] 10 Years: Remixes and Reimaginings/02 - Skye Reimagined.mp3": "38387bd0ec5fc229e30b1a8ce5b9cddb", - "Sithu Aye/[2021] 10 Years: Remixes and Reimaginings/03 - Baryofusion.mp3": "344dbb939b09713dcc33894a8b1b8459", - "Sithu Aye/[2021] 10 Years: Remixes and Reimaginings/04 - Mandalay Reimagined.mp3": "9bacbd5166a740c06d3329dcfae0d9aa", - "Sithu Aye/[2021] 10 Years: Remixes and Reimaginings/folder.jpg": "bf6f70d51557a71b69fed85b2cb476f0", + ".ytdl-sub-Sithu Aye-download-archive.json": "93ad50c4f4cca753f40c46bc6e31cabf", "Sithu Aye/[2022] Re:Invent the Universe (10th Anniversary Remaster)/01 - Invent the Universe.mp3": "482e97a4f9a30aa4413f45f5f3f5dbba", "Sithu Aye/[2022] Re:Invent the Universe (10th Anniversary Remaster)/02 - Grand Unification (feat. David Maxim Micic).mp3": "34e43fd80b4c61295abbb8b794e523a7", "Sithu Aye/[2022] Re:Invent the Universe (10th Anniversary Remaster)/03 - Expansion.mp3": "0ba4b8ef65e274cbf065b6f0a5f444e5", @@ -16,6 +11,10 @@ "Sithu Aye/[2022] Re:Invent the Universe (10th Anniversary Remaster)/09 - Formation.mp3": "d588ed8edc324ea657abb2be96d557a1", "Sithu Aye/[2022] Re:Invent the Universe (10th Anniversary Remaster)/10 - Pale Blue Dot.mp3": "8245d285ba2403bf512f83c4a585eb81", "Sithu Aye/[2022] Re:Invent the Universe (10th Anniversary Remaster)/folder.jpg": "d8cffeca026afaa619f641a95143f803", - "Sithu Aye/[2024] Kindness/01 - Run it Down.mp3": "9570867fd53419c1297411c9bf877a62", + "Sithu Aye/[2024] Kindness/01 - Run it Down.mp3": "227c366845913f3476ae83fce0b72c56", + "Sithu Aye/[2024] Kindness/02 - Zero Sum Groove.mp3": "0bd3b51acefc2a363309a8f94dd146d7", + "Sithu Aye/[2024] Kindness/03 - Obsidian.mp3": "2a6b87e1ab5a69fc6c4503dc0dd03623", + "Sithu Aye/[2024] Kindness/04 - Fear is the Kindness Killer.mp3": "4593d02a83f722d481846552554d13ba", + "Sithu Aye/[2024] Kindness/05 - Ghost;Cleanse.mp3": "f89156a892b597be9b594ce10131ab60", "Sithu Aye/[2024] Kindness/folder.jpg": "8f72c9acb1a2e49fcbdc2624a46b229c" } \ No newline at end of file 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 38d69b12..fc5ff67b 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,6 +1,6 @@ { ".ytdl-sub-chapters_from_comments-download-archive.json": "2510b2ff3c54aa4813a4f23ea079e1ec", "JMC/Move 78 - Automated Improvisation [Full Album].jpg": "c12e6a6f242680d1096a1a99d74a62c6", - "JMC/Move 78 - Automated Improvisation [Full Album].mp4": "63119bd17a035574263aeec188e11d5e", + "JMC/Move 78 - Automated Improvisation [Full Album].mp4": "fbe825bf5fb8ce193d47c3da3540e815", "JMC/Move 78 - Automated Improvisation [Full Album].nfo": "039268e97673a6f2b391772ec3b52fac" } \ 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 2a6691fb..31e5109d 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,6 +1,6 @@ { ".ytdl-sub-match_filter_test-download-archive.json": "30f10646149d9eea4eb970749f352f7d", "match_filter_test/Jesse's Minecraft Server [Trailer - Mar.21].jpg": "e7830aa8a64b0cde65ba3f7e5fc56530", - "match_filter_test/Jesse's Minecraft Server [Trailer - Mar.21].mp4": "f17a540070964a199b35f981561d94e4", + "match_filter_test/Jesse's Minecraft Server [Trailer - Mar.21].mp4": "a0dc417dbf369c47bbac571bdb18e0e4", "match_filter_test/Jesse's Minecraft Server [Trailer - Mar.21].nfo": "d85f4500bb5d8a2425d734a23b5a944c" } \ No newline at end of file diff --git a/tests/resources/expected_downloads_summaries/plugins/test_audio_extract_playlist.json b/tests/resources/expected_downloads_summaries/plugins/test_audio_extract_playlist.json index 83ed5f8b..7075adc2 100644 --- a/tests/resources/expected_downloads_summaries/plugins/test_audio_extract_playlist.json +++ b/tests/resources/expected_downloads_summaries/plugins/test_audio_extract_playlist.json @@ -1,6 +1,6 @@ { ".ytdl-sub-multiple_songs_test-download-archive.json": "54237df5e00d1598dfd39f341ee03d75", - "Project Zombie/[2011] Jesse's Minecraft Server/01 - Jesse's Minecraft Server [Trailer - Mar.21].ogg": "9e53a68a39f290899a3dce03fdca6490", + "Project Zombie/[2011] Jesse's Minecraft Server/01 - Jesse's Minecraft Server [Trailer - Mar.21].ogg": "221dab6e9d6840a0b4b7bb24444c87ff", "Project Zombie/[2011] Jesse's Minecraft Server/02 - Jesse's Minecraft Server [Trailer - Feb.27].ogg": "02dc8e368de9555d062bde31dcc82852", "Project Zombie/[2011] Jesse's Minecraft Server/03 - Jesse's Minecraft Server [Trailer - Feb.1].ogg": "c808e1da2bccd419201eeeffc32c3729", "Project Zombie/[2011] Jesse's Minecraft Server/folder.jpg": "e7830aa8a64b0cde65ba3f7e5fc56530" 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 dcf23c96..8c0c2b41 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,6 +1,6 @@ { ".ytdl-sub-sponsorblock_with_embedded_subs_test-download-archive.json": "2cb4b9586fd5bb7f1fed76ed9195e6e4", "JMC/This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.jpg": "b5353a824a4800cc26f884e3025ed969", - "JMC/This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.mp4": "0539ff781c824f17ae3ffbd7dc830a8f", + "JMC/This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.mp4": "19889ac778397147e55fe640c9a0f490", "JMC/This GPU SLIDES into this Case! - Silverstone SUGO 16 ITX Case.nfo": "ae73ec18a9f0e5a54c90061ccd32e7f4" } \ No newline at end of file diff --git a/tests/resources/expected_downloads_summaries/youtube/test_channel_full.json b/tests/resources/expected_downloads_summaries/youtube/test_channel_full.json index 7b5e7b2f..a1024507 100644 --- a/tests/resources/expected_downloads_summaries/youtube/test_channel_full.json +++ b/tests/resources/expected_downloads_summaries/youtube/test_channel_full.json @@ -18,7 +18,7 @@ "Project ⧸ Zombie/Season 2011/s2011.e022701 - Jesse's Minecraft Server [Trailer - Feb.27].nfo": "20af231e30a035fb2bc0c946f4b4026d", "Project ⧸ Zombie/Season 2011/s2011.e032101 - Jesse's Minecraft Server [Trailer - Mar.21]-thumb.jpg": "e7830aa8a64b0cde65ba3f7e5fc56530", "Project ⧸ Zombie/Season 2011/s2011.e032101 - Jesse's Minecraft Server [Trailer - Mar.21].info.json": "INFO_JSON", - "Project ⧸ Zombie/Season 2011/s2011.e032101 - Jesse's Minecraft Server [Trailer - Mar.21].mp4": "eac3dfce44c2a723f2fc74e9552aa510", + "Project ⧸ Zombie/Season 2011/s2011.e032101 - Jesse's Minecraft Server [Trailer - Mar.21].mp4": "7df8f1469adb02f1aecfbb049276cae7", "Project ⧸ Zombie/Season 2011/s2011.e032101 - Jesse's Minecraft Server [Trailer - Mar.21].nfo": "f8bdc463c0cb2ffdc82aba2bcc27ad5d", "Project ⧸ Zombie/Season 2011/s2011.e052901 - Project Zombie |Official Trailer| (IP: mc.projectzombie.beastnode.net)-thumb.jpg": "c956192a379b3661595c9920972d4819", "Project ⧸ Zombie/Season 2011/s2011.e052901 - Project Zombie |Official Trailer| (IP: mc.projectzombie.beastnode.net).info.json": "INFO_JSON", diff --git a/tests/resources/expected_downloads_summaries/youtube/test_playlist.json b/tests/resources/expected_downloads_summaries/youtube/test_playlist.json index d7ed7312..91b6495d 100644 --- a/tests/resources/expected_downloads_summaries/youtube/test_playlist.json +++ b/tests/resources/expected_downloads_summaries/youtube/test_playlist.json @@ -10,7 +10,7 @@ "JMC/Season 01/s01.e11022701 - Jesse's Minecraft Server [Trailer - Feb.27].nfo": "da7645e8826586388ae0d8278ef6a1c1", "JMC/Season 01/s01.e11032101 - Jesse's Minecraft Server [Trailer - Mar.21]-thumb.jpg": "e7830aa8a64b0cde65ba3f7e5fc56530", "JMC/Season 01/s01.e11032101 - Jesse's Minecraft Server [Trailer - Mar.21].info.json": "INFO_JSON", - "JMC/Season 01/s01.e11032101 - Jesse's Minecraft Server [Trailer - Mar.21].mp4": "dc04853870bbb811f6b312e20b58253b", + "JMC/Season 01/s01.e11032101 - Jesse's Minecraft Server [Trailer - Mar.21].mp4": "91f22944f797513fcda9856e244dd3b3", "JMC/Season 01/s01.e11032101 - Jesse's Minecraft Server [Trailer - Mar.21].nfo": "c56083e2f3545fa2cafc4d67cbfdacf8", "JMC/fanart.jpg": "129c6639b47299bc48062f0365e670ee", "JMC/poster.jpg": "5de28eea5a921a041452ab3ce1041f73", diff --git a/tests/resources/expected_downloads_summaries/youtube/test_playlist_archive_migrated.json b/tests/resources/expected_downloads_summaries/youtube/test_playlist_archive_migrated.json index a35908dc..50f91133 100644 --- a/tests/resources/expected_downloads_summaries/youtube/test_playlist_archive_migrated.json +++ b/tests/resources/expected_downloads_summaries/youtube/test_playlist_archive_migrated.json @@ -10,7 +10,7 @@ "JMC/Season 01/s01.e11022701 - Jesse's Minecraft Server [Trailer - Feb.27].nfo": "da7645e8826586388ae0d8278ef6a1c1", "JMC/Season 01/s01.e11032101 - Jesse's Minecraft Server [Trailer - Mar.21]-thumb.jpg": "e7830aa8a64b0cde65ba3f7e5fc56530", "JMC/Season 01/s01.e11032101 - Jesse's Minecraft Server [Trailer - Mar.21].info.json": "INFO_JSON", - "JMC/Season 01/s01.e11032101 - Jesse's Minecraft Server [Trailer - Mar.21].mp4": "dc04853870bbb811f6b312e20b58253b", + "JMC/Season 01/s01.e11032101 - Jesse's Minecraft Server [Trailer - Mar.21].mp4": "91f22944f797513fcda9856e244dd3b3", "JMC/Season 01/s01.e11032101 - Jesse's Minecraft Server [Trailer - Mar.21].nfo": "c56083e2f3545fa2cafc4d67cbfdacf8", "JMC/fanart.jpg": "129c6639b47299bc48062f0365e670ee", "JMC/poster.jpg": "5de28eea5a921a041452ab3ce1041f73", diff --git a/tests/resources/transaction_log_summaries/bandcamp/test_artist_url.txt b/tests/resources/transaction_log_summaries/bandcamp/test_artist_url.txt index 60d1e689..b5a0cc29 100644 --- a/tests/resources/transaction_log_summaries/bandcamp/test_artist_url.txt +++ b/tests/resources/transaction_log_summaries/bandcamp/test_artist_url.txt @@ -2,64 +2,6 @@ Files created: ---------------------------------------- {output_directory} .ytdl-sub-Sithu Aye-download-archive.json -{output_directory}/Sithu Aye/[2021] 10 Years: Remixes and Reimaginings - 01 - Double Helix Reimagined.mp3 - Music Tags: - album: 10 Years: Remixes and Reimaginings - albumartist: Sithu Aye - albumartists: Sithu Aye - artist: Sithu Aye - artists: Sithu Aye - date: 2021-11-26 - genres: Progressive Metal - original_date: 2021-11-26 - title: Double Helix Reimagined - track: 1 - tracktotal: 10 - year: 2021 - 02 - Skye Reimagined.mp3 - Music Tags: - album: 10 Years: Remixes and Reimaginings - albumartist: Sithu Aye - albumartists: Sithu Aye - artist: Sithu Aye - artists: Sithu Aye - date: 2021-11-26 - genres: Progressive Metal - original_date: 2021-11-26 - title: Skye Reimagined - track: 2 - tracktotal: 10 - year: 2021 - 03 - Baryofusion.mp3 - Music Tags: - album: 10 Years: Remixes and Reimaginings - albumartist: Sithu Aye - albumartists: Sithu Aye - artist: Sithu Aye - artists: Sithu Aye - date: 2021-11-26 - genres: Progressive Metal - original_date: 2021-11-26 - title: Baryofusion - track: 3 - tracktotal: 10 - year: 2021 - 04 - Mandalay Reimagined.mp3 - Music Tags: - album: 10 Years: Remixes and Reimaginings - albumartist: Sithu Aye - albumartists: Sithu Aye - artist: Sithu Aye - artists: Sithu Aye - date: 2021-11-26 - genres: Progressive Metal - original_date: 2021-11-26 - title: Mandalay Reimagined - track: 4 - tracktotal: 10 - year: 2021 - folder.jpg {output_directory}/Sithu Aye/[2022] Re:Invent the Universe (10th Anniversary Remaster) 01 - Invent the Universe.mp3 Music Tags: @@ -215,6 +157,62 @@ Files created: original_date: 2024-03-23 title: Run it Down track: 1 - tracktotal: 1 + tracktotal: 5 + year: 2024 + 02 - Zero Sum Groove.mp3 + Music Tags: + album: Kindness + albumartist: Sithu Aye + albumartists: Sithu Aye + artist: Sithu Aye + artists: Sithu Aye + date: 2024-03-23 + genres: Progressive Metal + original_date: 2024-03-23 + title: Zero Sum Groove + track: 2 + tracktotal: 5 + year: 2024 + 03 - Obsidian.mp3 + Music Tags: + album: Kindness + albumartist: Sithu Aye + albumartists: Sithu Aye + artist: Sithu Aye + artists: Sithu Aye + date: 2024-03-23 + genres: Progressive Metal + original_date: 2024-03-23 + title: Obsidian + track: 3 + tracktotal: 5 + year: 2024 + 04 - Fear is the Kindness Killer.mp3 + Music Tags: + album: Kindness + albumartist: Sithu Aye + albumartists: Sithu Aye + artist: Sithu Aye + artists: Sithu Aye + date: 2024-03-23 + genres: Progressive Metal + original_date: 2024-03-23 + title: Fear is the Kindness Killer + track: 4 + tracktotal: 5 + year: 2024 + 05 - Ghost;Cleanse.mp3 + Music Tags: + album: Kindness + albumartist: Sithu Aye + albumartists: Sithu Aye + artist: Sithu Aye + artists: Sithu Aye + date: 2024-03-23 + genres: Progressive Metal + original_date: 2024-03-23 + title: Ghost;Cleanse + track: 5 + tracktotal: 5 year: 2024 folder.jpg \ 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 007c19b8..cdbbfa60 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 @@ -5,6 +5,16 @@ Files created: {output_directory}/JMC 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 + 9:16: 03. Follow the Earworm Pt.2 + 12:25: 04. Keyword Salad + 16:48: 05. Ultra Natural + 20:47: 06. Flight Instructions + 25:46: 07. Dawn of the Useless Class + 29:58: 08. Schnitzel Whisperer + 32:16: 09. Teilo Embedded subtitles with lang(s) en, de Video Tags: album: Music Videos