[FEATURE] Change season/ep ordering via variables

This commit is contained in:
Jesse Bannon 2025-05-04 19:11:20 -07:00
parent a4293398b7
commit a74fc42d9f

View file

@ -56,19 +56,63 @@ presets:
"Provided `s01_url` or `s01_name` variable to TV Show by Date preset when it expects `url`. Perhaps you meant to use the `TV Show Collection` preset?" "Provided `s01_url` or `s01_name` variable to TV Show by Date preset when it expects `url`. Perhaps you meant to use the `TV Show Collection` preset?"
) )
} }
#################################################################################################### ####################################################################################################
_tv_show_by_date_season_ordering:
overrides:
tv_show_by_date_season_ordering: >-
{ %throw("Must specify tv_show_by_date_season_ordering") }
"%season_ordering_":
{ %eq( %lower(tv_show_by_date_season_ordering), $0 ) }
season_number: >-
{
%elif(
%season_ordering_( "year" ), upload_year,
%season_ordering_( "year-month" ), %concat(upload_year, upload_month_padded),
%throw(
"tv_show_by_date_season_ordering must be one of the following: 'year', 'year-month'"
)
)
}
# both year and year-month are fixed width, until the year 10000 :)
season_number_padded: "{season_number}"
# TODO
_tv_show_by_date_episode_ordering:
overrides:
tv_show_by_date_season_ordering: >-
{ %throw("Must specify tv_show_by_date_season_ordering") }
"%season_ordering_":
{ %eq( %lower(tv_show_by_date_season_ordering), $0 ) }
season_number: >-
{
%elif(
%season_ordering_( "year" ), upload_year,
%season_ordering_( "year-month" ), %concat(upload_year, upload_month_padded),
%throw(
"tv_show_by_date_season_ordering must be one of the following: 'year', 'year-month'"
)
)
}
# both year and year-month are fixed width, until the year 10000 :)
season_number_padded: "{season_number}"
####################################################################################################
# LEGACY PRESETS
_season_by_year: _season_by_year:
overrides: overrides:
season_number: "{upload_year}" tv_show_by_date_season_ordering: "year"
season_number_padded: "{season_number}"
_season_by_year_month: _season_by_year_month:
overrides: overrides:
season_number: "{upload_year}{upload_month_padded}" tv_show_by_date_season_ordering: "year-month"
season_number_padded: "{season_number}"
#################################################################################################### ####################################################################################################