diff --git a/lib/pinchflat/downloading/output_path_builder.ex b/lib/pinchflat/downloading/output_path_builder.ex index d4f6e27..c924653 100644 --- a/lib/pinchflat/downloading/output_path_builder.ex +++ b/lib/pinchflat/downloading/output_path_builder.ex @@ -54,7 +54,11 @@ defmodule Pinchflat.Downloading.OutputPathBuilder do "season_from_date" => "%(upload_date>%Y)S", "season_episode_from_date" => "s%(upload_date>%Y)Se%(upload_date>%m%d)S", "season_episode_index_from_date" => "s%(upload_date>%Y)Se%(upload_date>%m%d)S{{ media_upload_date_index }}", - "artist_name" => "%(artist,creator,uploader,uploader_id)S" + "artist_name" => "%(artist,creator,uploader,uploader_id)S", + "static_season__episode_by_index" => "Season 1/s01e{{ media_playlist_index }}", + "season_by_year__episode_by_date" => "Season %(upload_date>%Y)S/s%(upload_date>%Y)Se%(upload_date>%m%d)S", + "season_by_year__episode_by_date_and_index" => + "Season %(upload_date>%Y)S/s%(upload_date>%Y)Se%(upload_date>%m%d)S{{ media_upload_date_index }}" } end end diff --git a/lib/pinchflat_web/controllers/media_profiles/media_profile_html.ex b/lib/pinchflat_web/controllers/media_profiles/media_profile_html.ex index b54061d..b44388e 100644 --- a/lib/pinchflat_web/controllers/media_profiles/media_profile_html.ex +++ b/lib/pinchflat_web/controllers/media_profiles/media_profile_html.ex @@ -53,12 +53,22 @@ defmodule PinchflatWeb.MediaProfiles.MediaProfileHTML do ] end - def custom_output_template_options do + def media_center_custom_output_template_options do + %{ + season_by_year__episode_by_date: "Season YYYY/sYYYYeMMDD", + season_by_year__episode_by_date_and_index: + "same as the above but it handles dates better. This is the recommended option", + static_season__episode_by_index: + "Season 1/s01eXX where XX is the video's position in the playlist. Only recommended for playlists (not channels) that don't change" + } + end + + def other_custom_output_template_options do %{ upload_day: nil, upload_month: nil, upload_year: nil, - upload_yyyy_mm_dd: "the upload date in the format YYYY-MM-DD", + upload_yyyy_mm_dd: "the upload date in the format YYYY-MM-DD", source_custom_name: "the name of the sources that use this profile", source_collection_id: "the YouTube ID of the sources that use this profile", source_collection_name: @@ -66,9 +76,9 @@ defmodule PinchflatWeb.MediaProfiles.MediaProfileHTML do source_collection_type: "the collection type of the sources using this profile. Either 'channel' or 'playlist'", artist_name: "the name of the artist with fallbacks to other uploader fields", season_from_date: "alias for upload_year", - season_episode_from_date: "the upload date formatted as sYYYYeMMDD", + season_episode_from_date: "the upload date formatted as sYYYYeMMDD", season_episode_index_from_date: - "the upload date formatted as sYYYYeMMDDII where II is an index to prevent date collisions", + "the upload date formatted as sYYYYeMMDDII where II is an index to prevent date collisions", media_playlist_index: "the place of the media item in the playlist. Do not use with channels. May not work if the playlist is updated" } @@ -79,7 +89,6 @@ defmodule PinchflatWeb.MediaProfiles.MediaProfileHTML do id ext title - fulltitle uploader channel upload_date @@ -101,7 +110,7 @@ defmodule PinchflatWeb.MediaProfiles.MediaProfileHTML do end defp media_center_output_template do - "/shows/{{ source_custom_name }}/Season {{ season_from_date }}/{{ season_episode_index_from_date }} - {{ title }}.{{ ext }}" + "/shows/{{ source_custom_name }}/{{ season_by_year__episode_by_date_and_index }} - {{ title }}.{{ ext }}" end defp audio_output_template do diff --git a/lib/pinchflat_web/controllers/media_profiles/media_profile_html/output_template_help.html.heex b/lib/pinchflat_web/controllers/media_profiles/media_profile_html/output_template_help.html.heex index 7dd6df2..45ecf4f 100644 --- a/lib/pinchflat_web/controllers/media_profiles/media_profile_html/output_template_help.html.heex +++ b/lib/pinchflat_web/controllers/media_profiles/media_profile_html/output_template_help.html.heex @@ -1,7 +1,7 @@ <%!-- The heex HTML formatter is really struggling with this file - I apologize in advance --%>