Improve episode-level compatability with media center apps (#86)
* Add media profile presets (#85) * Added presets for output templates * Added presets for the entire media profile form * Append `-thumb` to thumbnails when downloading (#87) * Appended -thumb to thumbnails when downloading * Added code to compensate for yt-dlp bug * Squash all the commits from the other branch bc I broke things (#88)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
defmodule PinchflatWeb.MediaProfiles.MediaProfileHTML do
|
||||
use PinchflatWeb, :html
|
||||
|
||||
alias Pinchflat.Profiles.MediaProfile
|
||||
|
||||
embed_templates "media_profile_html/*"
|
||||
|
||||
@doc """
|
||||
@@ -53,4 +55,25 @@ defmodule PinchflatWeb.MediaProfiles.MediaProfileHTML do
|
||||
duration_string
|
||||
)a
|
||||
end
|
||||
|
||||
def preset_options do
|
||||
[
|
||||
{"Default", "default"},
|
||||
{"Media Center (Plex, Jellyfin, Kodi, etc.)", "media_center"},
|
||||
{"Music", "audio"},
|
||||
{"Archiving", "archiving"}
|
||||
]
|
||||
end
|
||||
|
||||
defp default_output_template do
|
||||
%MediaProfile{}.output_path_template
|
||||
end
|
||||
|
||||
defp media_center_output_template do
|
||||
"/shows/{{ source_custom_name }}/{{ season_from_date }}/{{ season_episode_from_date }} - {{ title }}.{{ ext }}"
|
||||
end
|
||||
|
||||
defp audio_output_template do
|
||||
"/music/{{ source_custom_name }}/{{ title }}.{{ ext }}"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user