[FEATURE] Simplify TV Show Collection Preset

This commit is contained in:
Jesse Bannon 2024-03-30 17:17:00 -07:00
parent d5e647554e
commit ae9eca6eac
4 changed files with 252 additions and 415 deletions

View file

@ -133,21 +133,12 @@ Episode Formatting Presets
* Only use playlist_index episode formatting for playlists that will be fully downloaded once and never again. Otherwise, indices can change.
* ``season_by_collection__episode_by_playlist_index_reversed``
Season Presets
~~~~~~~~~~~~~~
* ``collection_season_1``
* ``collection_season_2``
* ``collection_season_3``
* ``collection_season_4``
* ``...``
* ``collection_season_40``
Example
~~~~~~~
A preset/subscription requires specifying a player, episode formatting, and
one or more season presets, with the following override variables:
A preset/subscription requires specifying a player and episode formatting
with the following override variables:
.. code-block:: yaml
@ -155,8 +146,6 @@ one or more season presets, with the following override variables:
preset:
- "jellyfin_tv_show_collection"
- "season_by_collection__episode_by_year_month_day_reversed"
- "collection_season_1"
- "collection_season_2"
overrides:
# required
tv_show_name: "Rick A"

View file

@ -52,6 +52,8 @@ class TvShowCollectionEpisodeFormattingPresets(PrebuiltPresets):
class TvShowCollectionSeasonPresets(PrebuiltPresets):
"""Now Deprecated"""
preset_names = {
"collection_season_1",
"collection_season_2",

View file

@ -40,14 +40,6 @@ presets:
####################################################################################################
# TV show from a collection. Must specify additional `tv_show_collection_season` presets in
# addition. Each season sets its own `collection_season_number/_padded`
_tv_show_collection:
overrides:
collection_season_number_padded: "{ %pad_zero(%int(collection_season_number), 2) }"
season_number: "{collection_season_number}"
season_number_padded: "{collection_season_number_padded}"
_episode_video_tags:
video_tags:
show: "{tv_show_name}"

View file

@ -15,10 +15,7 @@ presets:
- "_plex_tv_show"
- "_tv_show_collection"
####################################################################################################
# SEASON PRESETS
collection_season_1:
_tv_show_collection:
download:
- url: "{collection_season_1_url}"
variables:
@ -38,16 +35,6 @@ presets:
uid: "avatar_uncropped"
- name: "{tv_show_fanart_file_name}"
uid: "banner_uncropped"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_1_name}"
attributes:
number: "1"
collection_season_2:
download:
- url: "{collection_season_2_url}"
variables:
collection_season_number: "2"
@ -55,16 +42,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_2_name}"
attributes:
number: "2"
collection_season_3:
download:
- url: "{collection_season_3_url}"
variables:
collection_season_number: "3"
@ -72,16 +49,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_3_name}"
attributes:
number: "3"
collection_season_4:
download:
- url: "{collection_season_4_url}"
variables:
collection_season_number: "4"
@ -89,16 +56,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_4_name}"
attributes:
number: "4"
collection_season_5:
download:
- url: "{collection_season_5_url}"
variables:
collection_season_number: "5"
@ -106,16 +63,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_5_name}"
attributes:
number: "5"
collection_season_6:
download:
- url: "{collection_season_6_url}"
variables:
collection_season_number: "6"
@ -123,16 +70,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_6_name}"
attributes:
number: "6"
collection_season_7:
download:
- url: "{collection_season_7_url}"
variables:
collection_season_number: "7"
@ -140,16 +77,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_7_name}"
attributes:
number: "7"
collection_season_8:
download:
- url: "{collection_season_8_url}"
variables:
collection_season_number: "8"
@ -157,16 +84,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_8_name}"
attributes:
number: "8"
collection_season_9:
download:
- url: "{collection_season_9_url}"
variables:
collection_season_number: "9"
@ -174,16 +91,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_9_name}"
attributes:
number: "9"
collection_season_10:
download:
- url: "{collection_season_10_url}"
variables:
collection_season_number: "10"
@ -191,16 +98,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_10_name}"
attributes:
number: "10"
collection_season_11:
download:
- url: "{collection_season_11_url}"
variables:
collection_season_number: "11"
@ -208,16 +105,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_11_name}"
attributes:
number: "11"
collection_season_12:
download:
- url: "{collection_season_12_url}"
variables:
collection_season_number: "12"
@ -225,16 +112,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_12_name}"
attributes:
number: "12"
collection_season_13:
download:
- url: "{collection_season_13_url}"
variables:
collection_season_number: "13"
@ -242,16 +119,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_13_name}"
attributes:
number: "13"
collection_season_14:
download:
- url: "{collection_season_14_url}"
variables:
collection_season_number: "14"
@ -259,16 +126,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_14_name}"
attributes:
number: "14"
collection_season_15:
download:
- url: "{collection_season_15_url}"
variables:
collection_season_number: "15"
@ -276,16 +133,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_15_name}"
attributes:
number: "15"
collection_season_16:
download:
- url: "{collection_season_16_url}"
variables:
collection_season_number: "16"
@ -293,16 +140,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_16_name}"
attributes:
number: "16"
collection_season_17:
download:
- url: "{collection_season_17_url}"
variables:
collection_season_number: "17"
@ -310,16 +147,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_17_name}"
attributes:
number: "17"
collection_season_18:
download:
- url: "{collection_season_18_url}"
variables:
collection_season_number: "18"
@ -327,16 +154,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_18_name}"
attributes:
number: "18"
collection_season_19:
download:
- url: "{collection_season_19_url}"
variables:
collection_season_number: "19"
@ -344,16 +161,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_19_name}"
attributes:
number: "19"
collection_season_20:
download:
- url: "{collection_season_20_url}"
variables:
collection_season_number: "20"
@ -361,16 +168,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_20_name}"
attributes:
number: "20"
collection_season_21:
download:
- url: "{collection_season_21_url}"
variables:
collection_season_number: "21"
@ -378,16 +175,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_21_name}"
attributes:
number: "21"
collection_season_22:
download:
- url: "{collection_season_22_url}"
variables:
collection_season_number: "22"
@ -395,16 +182,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_22_name}"
attributes:
number: "22"
collection_season_23:
download:
- url: "{collection_season_23_url}"
variables:
collection_season_number: "23"
@ -412,16 +189,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_23_name}"
attributes:
number: "23"
collection_season_24:
download:
- url: "{collection_season_24_url}"
variables:
collection_season_number: "24"
@ -429,16 +196,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_24_name}"
attributes:
number: "24"
collection_season_25:
download:
- url: "{collection_season_25_url}"
variables:
collection_season_number: "25"
@ -446,16 +203,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_25_name}"
attributes:
number: "25"
collection_season_26:
download:
- url: "{collection_season_26_url}"
variables:
collection_season_number: "26"
@ -463,16 +210,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_26_name}"
attributes:
number: "26"
collection_season_27:
download:
- url: "{collection_season_27_url}"
variables:
collection_season_number: "27"
@ -480,16 +217,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_27_name}"
attributes:
number: "27"
collection_season_28:
download:
- url: "{collection_season_28_url}"
variables:
collection_season_number: "28"
@ -497,16 +224,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_28_name}"
attributes:
number: "28"
collection_season_29:
download:
- url: "{collection_season_29_url}"
variables:
collection_season_number: "29"
@ -514,16 +231,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_29_name}"
attributes:
number: "29"
collection_season_30:
download:
- url: "{collection_season_30_url}"
variables:
collection_season_number: "30"
@ -531,16 +238,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_30_name}"
attributes:
number: "30"
collection_season_31:
download:
- url: "{collection_season_31_url}"
variables:
collection_season_number: "31"
@ -548,16 +245,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_31_name}"
attributes:
number: "31"
collection_season_32:
download:
- url: "{collection_season_32_url}"
variables:
collection_season_number: "32"
@ -565,16 +252,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_32_name}"
attributes:
number: "32"
collection_season_33:
download:
- url: "{collection_season_33_url}"
variables:
collection_season_number: "33"
@ -582,16 +259,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_33_name}"
attributes:
number: "33"
collection_season_34:
download:
- url: "{collection_season_34_url}"
variables:
collection_season_number: "34"
@ -599,16 +266,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_34_name}"
attributes:
number: "34"
collection_season_35:
download:
- url: "{collection_season_35_url}"
variables:
collection_season_number: "35"
@ -616,16 +273,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_35_name}"
attributes:
number: "35"
collection_season_36:
download:
- url: "{collection_season_36_url}"
variables:
collection_season_number: "36"
@ -633,16 +280,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_36_name}"
attributes:
number: "36"
collection_season_37:
download:
- url: "{collection_season_37_url}"
variables:
collection_season_number: "37"
@ -650,16 +287,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_37_name}"
attributes:
number: "37"
collection_season_38:
download:
- url: "{collection_season_38_url}"
variables:
collection_season_number: "38"
@ -667,16 +294,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_38_name}"
attributes:
number: "38"
collection_season_39:
download:
- url: "{collection_season_39_url}"
variables:
collection_season_number: "39"
@ -684,16 +301,6 @@ presets:
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_39_name}"
attributes:
number: "39"
collection_season_40:
download:
- url: "{collection_season_40_url}"
variables:
collection_season_number: "40"
@ -705,10 +312,257 @@ presets:
output_directory_nfo_tags:
tags:
namedseason:
- tag: "{collection_season_1_name}"
attributes:
number: "1"
- tag: "{collection_season_2_name}"
attributes:
number: "2"
- tag: "{collection_season_3_name}"
attributes:
number: "3"
- tag: "{collection_season_4_name}"
attributes:
number: "4"
- tag: "{collection_season_5_name}"
attributes:
number: "5"
- tag: "{collection_season_6_name}"
attributes:
number: "6"
- tag: "{collection_season_7_name}"
attributes:
number: "7"
- tag: "{collection_season_8_name}"
attributes:
number: "8"
- tag: "{collection_season_9_name}"
attributes:
number: "9"
- tag: "{collection_season_10_name}"
attributes:
number: "10"
- tag: "{collection_season_11_name}"
attributes:
number: "11"
- tag: "{collection_season_12_name}"
attributes:
number: "12"
- tag: "{collection_season_13_name}"
attributes:
number: "13"
- tag: "{collection_season_14_name}"
attributes:
number: "14"
- tag: "{collection_season_15_name}"
attributes:
number: "15"
- tag: "{collection_season_16_name}"
attributes:
number: "16"
- tag: "{collection_season_17_name}"
attributes:
number: "17"
- tag: "{collection_season_18_name}"
attributes:
number: "18"
- tag: "{collection_season_19_name}"
attributes:
number: "19"
- tag: "{collection_season_20_name}"
attributes:
number: "20"
- tag: "{collection_season_21_name}"
attributes:
number: "21"
- tag: "{collection_season_22_name}"
attributes:
number: "22"
- tag: "{collection_season_23_name}"
attributes:
number: "23"
- tag: "{collection_season_24_name}"
attributes:
number: "24"
- tag: "{collection_season_25_name}"
attributes:
number: "25"
- tag: "{collection_season_26_name}"
attributes:
number: "26"
- tag: "{collection_season_27_name}"
attributes:
number: "27"
- tag: "{collection_season_28_name}"
attributes:
number: "28"
- tag: "{collection_season_29_name}"
attributes:
number: "29"
- tag: "{collection_season_30_name}"
attributes:
number: "30"
- tag: "{collection_season_31_name}"
attributes:
number: "31"
- tag: "{collection_season_32_name}"
attributes:
number: "32"
- tag: "{collection_season_33_name}"
attributes:
number: "33"
- tag: "{collection_season_34_name}"
attributes:
number: "34"
- tag: "{collection_season_35_name}"
attributes:
number: "35"
- tag: "{collection_season_36_name}"
attributes:
number: "36"
- tag: "{collection_season_37_name}"
attributes:
number: "37"
- tag: "{collection_season_38_name}"
attributes:
number: "38"
- tag: "{collection_season_39_name}"
attributes:
number: "39"
- tag: "{collection_season_40_name}"
attributes:
number: "40"
overrides:
collection_season_number_padded: "{ %pad_zero(%int(collection_season_number), 2) }"
season_number: "{collection_season_number}"
season_number_padded: "{collection_season_number_padded}"
collection_season_1_url: ""
collection_season_1_name: ""
collection_season_2_url: ""
collection_season_2_name: ""
collection_season_3_url: ""
collection_season_3_name: ""
collection_season_4_url: ""
collection_season_4_name: ""
collection_season_5_url: ""
collection_season_5_name: ""
collection_season_6_url: ""
collection_season_6_name: ""
collection_season_7_url: ""
collection_season_7_name: ""
collection_season_8_url: ""
collection_season_8_name: ""
collection_season_9_url: ""
collection_season_9_name: ""
collection_season_10_url: ""
collection_season_10_name: ""
collection_season_11_url: ""
collection_season_11_name: ""
collection_season_12_url: ""
collection_season_12_name: ""
collection_season_13_url: ""
collection_season_13_name: ""
collection_season_14_url: ""
collection_season_14_name: ""
collection_season_15_url: ""
collection_season_15_name: ""
collection_season_16_url: ""
collection_season_16_name: ""
collection_season_17_url: ""
collection_season_17_name: ""
collection_season_18_url: ""
collection_season_18_name: ""
collection_season_19_url: ""
collection_season_19_name: ""
collection_season_20_url: ""
collection_season_20_name: ""
collection_season_21_url: ""
collection_season_21_name: ""
collection_season_22_url: ""
collection_season_22_name: ""
collection_season_23_url: ""
collection_season_23_name: ""
collection_season_24_url: ""
collection_season_24_name: ""
collection_season_25_url: ""
collection_season_25_name: ""
collection_season_26_url: ""
collection_season_26_name: ""
collection_season_27_url: ""
collection_season_27_name: ""
collection_season_28_url: ""
collection_season_28_name: ""
collection_season_29_url: ""
collection_season_29_name: ""
collection_season_30_url: ""
collection_season_30_name: ""
collection_season_31_url: ""
collection_season_31_name: ""
collection_season_32_url: ""
collection_season_32_name: ""
collection_season_33_url: ""
collection_season_33_name: ""
collection_season_34_url: ""
collection_season_34_name: ""
collection_season_35_url: ""
collection_season_35_name: ""
collection_season_36_url: ""
collection_season_36_name: ""
collection_season_37_url: ""
collection_season_37_name: ""
collection_season_38_url: ""
collection_season_38_name: ""
collection_season_39_url: ""
collection_season_39_name: ""
collection_season_40_url: ""
collection_season_40_name: ""
####################################################################################################
# DEPRECATED SEASON PRESETS
collection_season_1: {}
collection_season_2: {}
collection_season_3: {}
collection_season_4: {}
collection_season_5: {}
collection_season_6: {}
collection_season_7: {}
collection_season_8: {}
collection_season_9: {}
collection_season_10: {}
collection_season_11: {}
collection_season_12: {}
collection_season_13: {}
collection_season_14: {}
collection_season_15: {}
collection_season_16: {}
collection_season_17: {}
collection_season_18: {}
collection_season_19: {}
collection_season_20: {}
collection_season_21: {}
collection_season_22: {}
collection_season_23: {}
collection_season_24: {}
collection_season_25: {}
collection_season_26: {}
collection_season_27: {}
collection_season_28: {}
collection_season_29: {}
collection_season_30: {}
collection_season_31: {}
collection_season_32: {}
collection_season_33: {}
collection_season_34: {}
collection_season_35: {}
collection_season_36: {}
collection_season_37: {}
collection_season_38: {}
collection_season_39: {}
collection_season_40: {}
###############