test
This commit is contained in:
parent
c415dfe3b0
commit
fcfd954cff
6 changed files with 16 additions and 158 deletions
|
|
@ -12,7 +12,6 @@ from ytdl_sub.validators.string_formatter_validators import DictFormatterValidat
|
|||
from ytdl_sub.validators.string_formatter_validators import OverridesBooleanFormatterValidator
|
||||
from ytdl_sub.validators.string_formatter_validators import OverridesStringFormatterValidator
|
||||
from ytdl_sub.validators.string_formatter_validators import StringFormatterValidator
|
||||
from ytdl_sub.validators.validators import BoolValidator
|
||||
from ytdl_sub.validators.validators import ListValidator
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -24,21 +24,28 @@ class TestPrebuiltMusicPresets:
|
|||
music_preset,
|
||||
],
|
||||
"overrides": {
|
||||
"url": "https://your.name.here",
|
||||
"subscription_value": "https://your.name.here",
|
||||
"music_directory": output_directory,
|
||||
},
|
||||
}
|
||||
|
||||
num_urls = 1
|
||||
if music_preset in {"YouTube Releases", "YouTube Full Albums"}:
|
||||
del preset_dict["overrides"]["subscription_value"]
|
||||
preset_dict["overrides"]["subscription_array"] = [
|
||||
"https://your.name.here",
|
||||
"https://your.name.here.2",
|
||||
]
|
||||
num_urls = 2
|
||||
elif music_preset == "SoundCloud Discography":
|
||||
num_urls = 2 # simulate albums + tracks
|
||||
|
||||
subscription = Subscription.from_dict(
|
||||
config=config,
|
||||
preset_name=subscription_name,
|
||||
preset_dict=preset_dict,
|
||||
)
|
||||
|
||||
num_urls = 1
|
||||
if music_preset == "SoundCloud Discography":
|
||||
num_urls = 2 # simulate /albums and /tracks
|
||||
|
||||
with mock_download_collection_entries(
|
||||
is_youtube_channel=False, num_urls=num_urls, is_extracted_audio=True
|
||||
):
|
||||
|
|
|
|||
|
|
@ -1,11 +1 @@
|
|||
{
|
||||
".ytdl-sub-subscription_test-download-archive.json": "9f6f4458d42da4561db236473896fe71",
|
||||
"subscription_test/[2020] Mock Entry 20-1/01 - Mock Entry 20-1.mp3": "c967fcb589fca43fb3ae9038290e3a49",
|
||||
"subscription_test/[2020] Mock Entry 20-1/folder.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
||||
"subscription_test/[2020] Mock Entry 20-2/01 - Mock Entry 20-2.mp3": "5f22ce0cdaa93518786f2d68ff088a83",
|
||||
"subscription_test/[2020] Mock Entry 20-2/folder.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
||||
"subscription_test/[2020] Mock Entry 20-3/01 - Mock Entry 20-3.mp3": "645dedee58a794da96e0e29129e90744",
|
||||
"subscription_test/[2020] Mock Entry 20-3/folder.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
||||
"subscription_test/[2021] Mock Entry 21-1/01 - Mock Entry 21-1.mp3": "ad3e8f379cae386dd6d76d5af4552d59",
|
||||
"subscription_test/[2021] Mock Entry 21-1/folder.jpg": "e80c508c4818454300133fe1dc1a9cd7"
|
||||
}
|
||||
{}
|
||||
|
|
@ -1,9 +1 @@
|
|||
{
|
||||
".ytdl-sub-subscription_test-download-archive.json": "36b3c7143ac4257489791309d802af82",
|
||||
"subscription_test/[2020] Download First/02 - Mock Entry 20-1.mp3": "f7169b5892ebb4285c33ee153abdbfdc",
|
||||
"subscription_test/[2020] Download First/03 - Mock Entry 20-2.mp3": "7ffd6a9e71c7f327e8f9765ad4645a0e",
|
||||
"subscription_test/[2020] Download First/04 - Mock Entry 20-3.mp3": "d3718a85ccd6cd03634cba94927496a6",
|
||||
"subscription_test/[2020] Download First/folder.jpg": "e80c508c4818454300133fe1dc1a9cd7",
|
||||
"subscription_test/[2021] Download First/01 - Mock Entry 21-1.mp3": "6b9c7da5acce22b180fd42a463806a68",
|
||||
"subscription_test/[2021] Download First/folder.jpg": "e80c508c4818454300133fe1dc1a9cd7"
|
||||
}
|
||||
{}
|
||||
|
|
@ -1,68 +1 @@
|
|||
Files created:
|
||||
----------------------------------------
|
||||
{output_directory}
|
||||
.ytdl-sub-subscription_test-download-archive.json
|
||||
{output_directory}/subscription_test/[2020] Mock Entry 20-1
|
||||
01 - Mock Entry 20-1.mp3
|
||||
Music Tags:
|
||||
album: Mock Entry 20-1
|
||||
albumartist: subscription_test
|
||||
albumartists: subscription_test
|
||||
artist: subscription_test
|
||||
artists: subscription_test
|
||||
date: 2020-08-08
|
||||
genres: Unset
|
||||
original_date: 2020-08-08
|
||||
title: Mock Entry 20-1
|
||||
track: 1
|
||||
tracktotal: 1
|
||||
year: 2020
|
||||
folder.jpg
|
||||
{output_directory}/subscription_test/[2020] Mock Entry 20-2
|
||||
01 - Mock Entry 20-2.mp3
|
||||
Music Tags:
|
||||
album: Mock Entry 20-2
|
||||
albumartist: subscription_test
|
||||
albumartists: subscription_test
|
||||
artist: subscription_test
|
||||
artists: subscription_test
|
||||
date: 2020-08-08
|
||||
genres: Unset
|
||||
original_date: 2020-08-08
|
||||
title: Mock Entry 20-2
|
||||
track: 1
|
||||
tracktotal: 1
|
||||
year: 2020
|
||||
folder.jpg
|
||||
{output_directory}/subscription_test/[2020] Mock Entry 20-3
|
||||
01 - Mock Entry 20-3.mp3
|
||||
Music Tags:
|
||||
album: Mock Entry 20-3
|
||||
albumartist: subscription_test
|
||||
albumartists: subscription_test
|
||||
artist: subscription_test
|
||||
artists: subscription_test
|
||||
date: 2020-08-07
|
||||
genres: Unset
|
||||
original_date: 2020-08-07
|
||||
title: Mock Entry 20-3
|
||||
track: 1
|
||||
tracktotal: 1
|
||||
year: 2020
|
||||
folder.jpg
|
||||
{output_directory}/subscription_test/[2021] Mock Entry 21-1
|
||||
01 - Mock Entry 21-1.mp3
|
||||
Music Tags:
|
||||
album: Mock Entry 21-1
|
||||
albumartist: subscription_test
|
||||
albumartists: subscription_test
|
||||
artist: subscription_test
|
||||
artists: subscription_test
|
||||
date: 2021-08-08
|
||||
genres: Unset
|
||||
original_date: 2021-08-08
|
||||
title: Mock Entry 21-1
|
||||
track: 1
|
||||
tracktotal: 1
|
||||
year: 2021
|
||||
folder.jpg
|
||||
No new, modified, or removed files in '{output_directory}'
|
||||
|
|
@ -1,64 +1 @@
|
|||
Files created:
|
||||
----------------------------------------
|
||||
{output_directory}
|
||||
.ytdl-sub-subscription_test-download-archive.json
|
||||
{output_directory}/subscription_test/[2020] Download First
|
||||
02 - Mock Entry 20-1.mp3
|
||||
Music Tags:
|
||||
album: Download First
|
||||
albumartist: subscription_test
|
||||
albumartists: subscription_test
|
||||
artist: subscription_test
|
||||
artists: subscription_test
|
||||
date: 2020-08-08
|
||||
genres: Unset
|
||||
original_date: 2020-08-08
|
||||
title: Mock Entry 20-1
|
||||
track: 2
|
||||
tracktotal: 4
|
||||
year: 2020
|
||||
03 - Mock Entry 20-2.mp3
|
||||
Music Tags:
|
||||
album: Download First
|
||||
albumartist: subscription_test
|
||||
albumartists: subscription_test
|
||||
artist: subscription_test
|
||||
artists: subscription_test
|
||||
date: 2020-08-08
|
||||
genres: Unset
|
||||
original_date: 2020-08-08
|
||||
title: Mock Entry 20-2
|
||||
track: 3
|
||||
tracktotal: 4
|
||||
year: 2020
|
||||
04 - Mock Entry 20-3.mp3
|
||||
Music Tags:
|
||||
album: Download First
|
||||
albumartist: subscription_test
|
||||
albumartists: subscription_test
|
||||
artist: subscription_test
|
||||
artists: subscription_test
|
||||
date: 2020-08-07
|
||||
genres: Unset
|
||||
original_date: 2020-08-07
|
||||
title: Mock Entry 20-3
|
||||
track: 4
|
||||
tracktotal: 4
|
||||
year: 2020
|
||||
folder.jpg
|
||||
{output_directory}/subscription_test/[2021] Download First
|
||||
01 - Mock Entry 21-1.mp3
|
||||
Music Tags:
|
||||
album: Download First
|
||||
albumartist: subscription_test
|
||||
albumartists: subscription_test
|
||||
artist: subscription_test
|
||||
artists: subscription_test
|
||||
date: 2021-08-08
|
||||
genres: Unset
|
||||
original_date: 2021-08-08
|
||||
title: Mock Entry 21-1
|
||||
track: 1
|
||||
tracktotal: 4
|
||||
year: 2021
|
||||
folder.jpg
|
||||
No new, modified, or removed files in '{output_directory}'
|
||||
Loading…
Reference in a new issue