This commit is contained in:
Jesse Bannon 2025-05-08 22:37:47 -07:00
parent 10a3a1623b
commit b0319c39f3

View file

@ -10,22 +10,22 @@ from ytdl_sub.prebuilt_presets.tv_show import TvShowByDatePresets
from ytdl_sub.script.utils.exceptions import UserThrownRuntimeError
from ytdl_sub.subscriptions.subscription import Subscription
DEFAULT_SEASON_ORDERING = "upload-year"
DEFAULT_EPISODE_ORDERING = "upload-month-day"
VALID_ORDERING_COMBOS = [
# upload
("upload-year", "upload-month-day"),
("upload-year", "upload-month-day-reversed"),
("upload-year", "download-index"),
("upload-year-month", "upload-day"),
# release
("release-year", "release-month-day"),
("release-year", "release-month-day-reversed"),
("release-year", "download-index"),
("release-year-month", "release-day"),
]
VALID_ORDERING_COMBOS = [
# upload
("upload-year", "upload-month-day"),
("upload-year", "upload-month-day-reversed"),
("upload-year", "download-index"),
("upload-year-month", "upload-day"),
# release
("release-year", "release-month-day"),
("release-year", "release-month-day-reversed"),
("release-year", "download-index"),
("release-year-month", "release-day"),
]
class TestPrebuiltTVShowPresets:
@ -177,7 +177,7 @@ class TestPrebuiltTVShowPresets:
self, config, subscription_name, output_directory, mock_download_collection_entries
):
expected_message = (
'tv_show_by_date_season_ordering must be one of the following: '
"tv_show_by_date_season_ordering must be one of the following: "
'"upload-year", '
'"upload-year-month", '
'"release-year", '
@ -201,7 +201,7 @@ class TestPrebuiltTVShowPresets:
self, config, subscription_name, output_directory, mock_download_collection_entries
):
expected_message = (
'tv_show_by_date_episode_ordering must be one of the following: '
"tv_show_by_date_episode_ordering must be one of the following: "
'"upload-day", '
'"upload-month-day", '
'"upload-month-day-reversed", '
@ -224,7 +224,6 @@ class TestPrebuiltTVShowPresets:
episode_ordering="not-a-valid",
)
def test_invalid_season_episode_ordering_combo(
self, config, subscription_name, output_directory, mock_download_collection_entries
):
@ -257,4 +256,4 @@ class TestPrebuiltTVShowPresets:
tv_show_preset="Kodi TV Show by Date",
season_ordering=season_ordering,
episode_ordering=episode_ordering,
)
)