Skip to content

Commit

Permalink
[BACKEND] Add collection_season_name variable to collection presets (
Browse files Browse the repository at this point in the history
…#850)

Can now be used to change directory names for collection presets
jmbannon authored Dec 20, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 308c76a commit b8fb119
Showing 3 changed files with 43 additions and 43 deletions.
3 changes: 1 addition & 2 deletions src/ytdl_sub/prebuilt_presets/tv_show/episode.yaml
Original file line number Diff line number Diff line change
@@ -35,15 +35,14 @@ presets:
tv_show_name: "{subscription_name}"
tv_show_genre: "{subscription_indent_1}"
tv_show_content_rating: "{subscription_indent_2}"
season_title: "{season_number_padded}"
season_directory_name: "Season {season_number_padded}"
episode_title: "{upload_date_standardized} - {title}"
episode_plot: "{webpage_url}\n\n{description}"
episode_year: "{upload_year}"
episode_content_rating: "{tv_show_content_rating}"
episode_date_standardized: "{upload_date_standardized}"
episode_file_name: "s{season_number_padded}.e{episode_number_padded} - {file_title}"
episode_file_path: "{season_directory_name}/{episode_file_name}"
episode_file_path: "{season_directory_name_sanitized}/{episode_file_name_sanitized}"

_episode_video_tags:
video_tags:
3 changes: 2 additions & 1 deletion src/ytdl_sub/prebuilt_presets/tv_show/tv_show.yaml
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ presets:
overrides:
tv_show_poster_file_name: "poster.jpg"
tv_show_fanart_file_name: "fanart.jpg"
season_poster_file_name: "Season {season_number_padded}/Season{season_number_padded}.jpg"
season_poster_file_name: "{season_directory_name_sanitized}/Season{season_number_padded}.jpg"
file_convert:
convert_to: "mp4" # webm doesn't play in many plex clients, so use mp4 instead

@@ -44,5 +44,6 @@ presets:
# 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}"
80 changes: 40 additions & 40 deletions src/ytdl_sub/prebuilt_presets/tv_show/tv_show_collection.yaml
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ presets:
- url: "{collection_season_1_url}"
variables:
collection_season_number: "1"
collection_season_number_padded: "01"
collection_season_name: "{collection_season_1_name}"
playlist_thumbnails:
# Use latest_entry first, then see if YT channel artwork exists
# ONLY FOR SEASON 1! The channel artwork will be the show's artwork.
@@ -47,7 +47,7 @@ presets:
- url: "{collection_season_2_url}"
variables:
collection_season_number: "2"
collection_season_number_padded: "02"
collection_season_name: "{collection_season_2_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -64,7 +64,7 @@ presets:
- url: "{collection_season_3_url}"
variables:
collection_season_number: "3"
collection_season_number_padded: "03"
collection_season_name: "{collection_season_3_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -81,7 +81,7 @@ presets:
- url: "{collection_season_4_url}"
variables:
collection_season_number: "4"
collection_season_number_padded: "04"
collection_season_name: "{collection_season_4_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -98,7 +98,7 @@ presets:
- url: "{collection_season_5_url}"
variables:
collection_season_number: "5"
collection_season_number_padded: "05"
collection_season_name: "{collection_season_5_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -115,7 +115,7 @@ presets:
- url: "{collection_season_6_url}"
variables:
collection_season_number: "6"
collection_season_number_padded: "06"
collection_season_name: "{collection_season_6_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -132,7 +132,7 @@ presets:
- url: "{collection_season_7_url}"
variables:
collection_season_number: "7"
collection_season_number_padded: "07"
collection_season_name: "{collection_season_7_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -149,7 +149,7 @@ presets:
- url: "{collection_season_8_url}"
variables:
collection_season_number: "8"
collection_season_number_padded: "08"
collection_season_name: "{collection_season_8_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -166,7 +166,7 @@ presets:
- url: "{collection_season_9_url}"
variables:
collection_season_number: "9"
collection_season_number_padded: "09"
collection_season_name: "{collection_season_9_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -183,7 +183,7 @@ presets:
- url: "{collection_season_10_url}"
variables:
collection_season_number: "10"
collection_season_number_padded: "10"
collection_season_name: "{collection_season_10_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -200,7 +200,7 @@ presets:
- url: "{collection_season_11_url}"
variables:
collection_season_number: "11"
collection_season_number_padded: "11"
collection_season_name: "{collection_season_11_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -217,7 +217,7 @@ presets:
- url: "{collection_season_12_url}"
variables:
collection_season_number: "12"
collection_season_number_padded: "12"
collection_season_name: "{collection_season_12_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -234,7 +234,7 @@ presets:
- url: "{collection_season_13_url}"
variables:
collection_season_number: "13"
collection_season_number_padded: "13"
collection_season_name: "{collection_season_13_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -251,7 +251,7 @@ presets:
- url: "{collection_season_14_url}"
variables:
collection_season_number: "14"
collection_season_number_padded: "14"
collection_season_name: "{collection_season_14_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -268,7 +268,7 @@ presets:
- url: "{collection_season_15_url}"
variables:
collection_season_number: "15"
collection_season_number_padded: "15"
collection_season_name: "{collection_season_15_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -285,7 +285,7 @@ presets:
- url: "{collection_season_16_url}"
variables:
collection_season_number: "16"
collection_season_number_padded: "16"
collection_season_name: "{collection_season_16_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -302,7 +302,7 @@ presets:
- url: "{collection_season_17_url}"
variables:
collection_season_number: "17"
collection_season_number_padded: "17"
collection_season_name: "{collection_season_17_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -319,7 +319,7 @@ presets:
- url: "{collection_season_18_url}"
variables:
collection_season_number: "18"
collection_season_number_padded: "18"
collection_season_name: "{collection_season_18_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -336,7 +336,7 @@ presets:
- url: "{collection_season_19_url}"
variables:
collection_season_number: "19"
collection_season_number_padded: "19"
collection_season_name: "{collection_season_19_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -353,7 +353,7 @@ presets:
- url: "{collection_season_20_url}"
variables:
collection_season_number: "20"
collection_season_number_padded: "20"
collection_season_name: "{collection_season_20_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -370,7 +370,7 @@ presets:
- url: "{collection_season_21_url}"
variables:
collection_season_number: "21"
collection_season_number_padded: "21"
collection_season_name: "{collection_season_21_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -387,7 +387,7 @@ presets:
- url: "{collection_season_22_url}"
variables:
collection_season_number: "22"
collection_season_number_padded: "22"
collection_season_name: "{collection_season_22_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -404,7 +404,7 @@ presets:
- url: "{collection_season_23_url}"
variables:
collection_season_number: "23"
collection_season_number_padded: "23"
collection_season_name: "{collection_season_23_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -421,7 +421,7 @@ presets:
- url: "{collection_season_24_url}"
variables:
collection_season_number: "24"
collection_season_number_padded: "24"
collection_season_name: "{collection_season_24_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -438,7 +438,7 @@ presets:
- url: "{collection_season_25_url}"
variables:
collection_season_number: "25"
collection_season_number_padded: "25"
collection_season_name: "{collection_season_25_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -455,7 +455,7 @@ presets:
- url: "{collection_season_26_url}"
variables:
collection_season_number: "26"
collection_season_number_padded: "26"
collection_season_name: "{collection_season_26_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -472,7 +472,7 @@ presets:
- url: "{collection_season_27_url}"
variables:
collection_season_number: "27"
collection_season_number_padded: "27"
collection_season_name: "{collection_season_27_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -489,7 +489,7 @@ presets:
- url: "{collection_season_28_url}"
variables:
collection_season_number: "28"
collection_season_number_padded: "28"
collection_season_name: "{collection_season_28_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -506,7 +506,7 @@ presets:
- url: "{collection_season_29_url}"
variables:
collection_season_number: "29"
collection_season_number_padded: "29"
collection_season_name: "{collection_season_29_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -523,7 +523,7 @@ presets:
- url: "{collection_season_30_url}"
variables:
collection_season_number: "30"
collection_season_number_padded: "30"
collection_season_name: "{collection_season_30_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -540,7 +540,7 @@ presets:
- url: "{collection_season_31_url}"
variables:
collection_season_number: "31"
collection_season_number_padded: "31"
collection_season_name: "{collection_season_31_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -557,7 +557,7 @@ presets:
- url: "{collection_season_32_url}"
variables:
collection_season_number: "32"
collection_season_number_padded: "32"
collection_season_name: "{collection_season_32_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -574,7 +574,7 @@ presets:
- url: "{collection_season_33_url}"
variables:
collection_season_number: "33"
collection_season_number_padded: "33"
collection_season_name: "{collection_season_33_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -591,7 +591,7 @@ presets:
- url: "{collection_season_34_url}"
variables:
collection_season_number: "34"
collection_season_number_padded: "34"
collection_season_name: "{collection_season_34_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -608,7 +608,7 @@ presets:
- url: "{collection_season_35_url}"
variables:
collection_season_number: "35"
collection_season_number_padded: "35"
collection_season_name: "{collection_season_35_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -625,7 +625,7 @@ presets:
- url: "{collection_season_36_url}"
variables:
collection_season_number: "36"
collection_season_number_padded: "36"
collection_season_name: "{collection_season_36_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -642,7 +642,7 @@ presets:
- url: "{collection_season_37_url}"
variables:
collection_season_number: "37"
collection_season_number_padded: "37"
collection_season_name: "{collection_season_37_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -659,7 +659,7 @@ presets:
- url: "{collection_season_38_url}"
variables:
collection_season_number: "38"
collection_season_number_padded: "38"
collection_season_name: "{collection_season_38_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -676,7 +676,7 @@ presets:
- url: "{collection_season_39_url}"
variables:
collection_season_number: "39"
collection_season_number_padded: "39"
collection_season_name: "{collection_season_39_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"
@@ -693,7 +693,7 @@ presets:
- url: "{collection_season_40_url}"
variables:
collection_season_number: "40"
collection_season_number_padded: "40"
collection_season_name: "{collection_season_40_name}"
playlist_thumbnails:
- name: "{season_poster_file_name}"
uid: "latest_entry"

0 comments on commit b8fb119

Please sign in to comment.