multi created variables do not exist for update command!
This commit is contained in:
parent
ebb07d858d
commit
298a4c4435
2 changed files with 44 additions and 6 deletions
|
|
@ -8,7 +8,7 @@ Files created:
|
|||
date: 2020-08-07
|
||||
episode_id: 1
|
||||
genre: ytdl-sub
|
||||
show: unit_plex_tv_show_by_date_season_by_year__episode_by_month_day_is_yt_1
|
||||
show: Best Prebuilt TV Show by Date
|
||||
synopsis:
|
||||
https://20-3.com
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ Files created:
|
|||
date: 2020-08-08
|
||||
episode_id: 2
|
||||
genre: ytdl-sub
|
||||
show: unit_plex_tv_show_by_date_season_by_year__episode_by_month_day_is_yt_1
|
||||
show: Best Prebuilt TV Show by Date
|
||||
synopsis:
|
||||
https://20-2.com
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ Files created:
|
|||
date: 2020-08-08
|
||||
episode_id: 3
|
||||
genre: ytdl-sub
|
||||
show: unit_plex_tv_show_by_date_season_by_year__episode_by_month_day_is_yt_1
|
||||
show: Best Prebuilt TV Show by Date
|
||||
synopsis:
|
||||
https://20-1.com
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ Files created:
|
|||
date: 2021-08-08
|
||||
episode_id: 4
|
||||
genre: ytdl-sub
|
||||
show: unit_plex_tv_show_by_date_season_by_year__episode_by_month_day_is_yt_1
|
||||
show: Best Prebuilt TV Show by Date
|
||||
synopsis:
|
||||
https://21-1.com
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@ class TestPrebuiltTVShowPresets:
|
|||
)
|
||||
|
||||
###################################### Perform reformat
|
||||
|
||||
reformatted_tv_show_structure_preset = "season_by_year__episode_by_download_index"
|
||||
reformatted_expected_summary_name = "unit/{}/{}/is_yt_{}".format(
|
||||
media_player_preset,
|
||||
|
|
@ -125,7 +124,7 @@ class TestPrebuiltTVShowPresets:
|
|||
"preset": parent_presets + [reformatted_tv_show_structure_preset],
|
||||
"overrides": {
|
||||
"url": "https://your.name.here",
|
||||
"tv_show_name": expected_summary_name.replace("/", "_"),
|
||||
"tv_show_name": "Best Prebuilt TV Show by Date",
|
||||
"tv_show_directory": output_directory,
|
||||
},
|
||||
},
|
||||
|
|
@ -265,3 +264,42 @@ class TestPrebuiltTvShowCollectionPresets:
|
|||
dry_run=False,
|
||||
expected_download_summary_file_name=f"{expected_summary_name}.json",
|
||||
)
|
||||
|
||||
###################################### Perform reformat
|
||||
reformatted_tv_show_structure_preset = "season_by_collection__episode_by_playlist_index_reversed"
|
||||
reformatted_expected_summary_name = "unit/{}/{}/s_{}/is_yt_{}".format(
|
||||
media_player_preset,
|
||||
reformatted_tv_show_structure_preset,
|
||||
len(season_indices),
|
||||
int(is_youtube_channel),
|
||||
)
|
||||
|
||||
reformatted_subscription = Subscription.from_dict(
|
||||
config=config,
|
||||
preset_name=subscription_name,
|
||||
preset_dict={
|
||||
"preset": parent_presets + [reformatted_tv_show_structure_preset],
|
||||
"overrides": dict(
|
||||
overrides,
|
||||
**{
|
||||
"tv_show_name": "Best Prebuilt TV Show Collection",
|
||||
"tv_show_directory": output_directory,
|
||||
},
|
||||
),
|
||||
},
|
||||
)
|
||||
|
||||
reformatted_transaction_log = reformatted_subscription.update_with_info_json(dry_run=False)
|
||||
assert_transaction_log_matches(
|
||||
output_directory=output_directory,
|
||||
transaction_log=reformatted_transaction_log,
|
||||
transaction_log_summary_file_name=(
|
||||
f"{expected_summary_name}_reformatted_to_{reformatted_expected_summary_name}.txt"
|
||||
),
|
||||
regenerate_transaction_log=True
|
||||
)
|
||||
assert_expected_downloads(
|
||||
output_directory=output_directory,
|
||||
dry_run=False,
|
||||
expected_download_summary_file_name=f"{reformatted_expected_summary_name}.json",
|
||||
)
|
||||
Loading…
Reference in a new issue