tests updated
This commit is contained in:
parent
27cfa32b95
commit
4b2bde5b4f
3 changed files with 24 additions and 1 deletions
|
|
@ -38,9 +38,9 @@ class YoutubeChannelDownloaderOptions(YoutubeDownloaderOptions, DateRangeValidat
|
|||
# optional
|
||||
channel_avatar_path: "poster.jpg"
|
||||
channel_banner_path: "fanart.jpg"
|
||||
download_individually: True
|
||||
before: "now"
|
||||
after: "today-2weeks"
|
||||
download_individually: True
|
||||
"""
|
||||
|
||||
_required_keys = {"channel_url"}
|
||||
|
|
|
|||
|
|
@ -292,6 +292,10 @@ class Subscription:
|
|||
entry=entry, entry_metadata=entry_metadata
|
||||
)
|
||||
|
||||
# Re-save the download archive after each entry is moved to the output directory
|
||||
if self.maintain_download_archive:
|
||||
self._enhanced_download_archive.save_download_mappings()
|
||||
|
||||
downloader.post_download(overrides=self.overrides)
|
||||
for plugin in plugins:
|
||||
plugin.post_process_subscription()
|
||||
|
|
|
|||
|
|
@ -225,6 +225,7 @@ class TestChannelAsKodiTvShow:
|
|||
"""
|
||||
|
||||
@pytest.mark.parametrize("dry_run", [True, False])
|
||||
@pytest.mark.parametrize("download_individually", [True, False])
|
||||
def test_full_channel_download(
|
||||
self,
|
||||
channel_subscription_generator,
|
||||
|
|
@ -232,7 +233,10 @@ class TestChannelAsKodiTvShow:
|
|||
expected_full_channel_download,
|
||||
output_directory,
|
||||
dry_run,
|
||||
download_individually,
|
||||
):
|
||||
channel_preset_dict["youtube"]["download_individually"] = download_individually
|
||||
|
||||
full_channel_subscription = channel_subscription_generator(preset_dict=channel_preset_dict)
|
||||
transaction_log = full_channel_subscription.download(dry_run=dry_run)
|
||||
assert_transaction_log_matches(
|
||||
|
|
@ -244,6 +248,7 @@ class TestChannelAsKodiTvShow:
|
|||
expected_full_channel_download.assert_files_exist(relative_directory=output_directory)
|
||||
|
||||
@pytest.mark.parametrize("dry_run", [True, False])
|
||||
@pytest.mark.parametrize("download_individually", [True, False])
|
||||
def test_recent_channel_download(
|
||||
self,
|
||||
channel_subscription_generator,
|
||||
|
|
@ -251,7 +256,10 @@ class TestChannelAsKodiTvShow:
|
|||
expected_recent_channel_download,
|
||||
output_directory,
|
||||
dry_run,
|
||||
download_individually,
|
||||
):
|
||||
recent_channel_preset_dict["youtube"]["download_individually"] = download_individually
|
||||
|
||||
recent_channel_subscription = channel_subscription_generator(
|
||||
preset_dict=recent_channel_preset_dict
|
||||
)
|
||||
|
|
@ -283,6 +291,7 @@ class TestChannelAsKodiTvShow:
|
|||
)
|
||||
|
||||
@pytest.mark.parametrize("dry_run", [True, False])
|
||||
@pytest.mark.parametrize("download_individually", [True, False])
|
||||
def test_recent_channel_download__no_vids_in_range(
|
||||
self,
|
||||
channel_subscription_generator,
|
||||
|
|
@ -290,8 +299,11 @@ class TestChannelAsKodiTvShow:
|
|||
expected_recent_channel_no_vids_in_range_download,
|
||||
output_directory,
|
||||
dry_run,
|
||||
download_individually,
|
||||
):
|
||||
recent_channel_preset_dict["youtube"]["download_individually"] = download_individually
|
||||
recent_channel_preset_dict["youtube"]["after"] = "21000101"
|
||||
|
||||
recent_channel_no_vids_in_range_subscription = channel_subscription_generator(
|
||||
preset_dict=recent_channel_preset_dict
|
||||
)
|
||||
|
|
@ -309,6 +321,7 @@ class TestChannelAsKodiTvShow:
|
|||
)
|
||||
|
||||
@pytest.mark.parametrize("dry_run", [True, False])
|
||||
@pytest.mark.parametrize("download_individually", [True, False])
|
||||
def test_rolling_recent_channel_download(
|
||||
self,
|
||||
channel_subscription_generator,
|
||||
|
|
@ -318,7 +331,13 @@ class TestChannelAsKodiTvShow:
|
|||
expected_rolling_recent_channel_download,
|
||||
output_directory,
|
||||
dry_run,
|
||||
download_individually,
|
||||
):
|
||||
recent_channel_preset_dict["youtube"]["download_individually"] = download_individually
|
||||
rolling_recent_channel_preset_dict["youtube"][
|
||||
"download_individually"
|
||||
] = download_individually
|
||||
|
||||
recent_channel_subscription = channel_subscription_generator(
|
||||
preset_dict=recent_channel_preset_dict
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue