Made my options safe by default and removed special safe versions
This commit is contained in:
parent
fad1e39bad
commit
b3def0d88c
1 changed files with 22 additions and 27 deletions
|
|
@ -28,40 +28,35 @@ defmodule Pinchflat.Profiles.Options.YtDlp.OutputPathBuilder do
|
||||||
|
|
||||||
defp standard_yt_dlp_option_map do
|
defp standard_yt_dlp_option_map do
|
||||||
%{
|
%{
|
||||||
"id" => "%(id)s",
|
# Uppercase "S" means "safe" - ie: filepath-safe
|
||||||
"ext" => "%(ext)s",
|
"id" => "%(id)S",
|
||||||
"title" => "%(title)s",
|
"ext" => "%(ext)S",
|
||||||
"fulltitle" => "%(fulltitle)s",
|
"title" => "%(title)S",
|
||||||
"uploader" => "%(uploader)s",
|
"fulltitle" => "%(fulltitle)S",
|
||||||
"creator" => "%(creator)s",
|
"uploader" => "%(uploader)S",
|
||||||
"upload_date" => "%(upload_date)s",
|
"creator" => "%(creator)S",
|
||||||
"release_date" => "%(release_date)s",
|
"upload_date" => "%(upload_date)S",
|
||||||
"duration" => "%(duration)s",
|
"release_date" => "%(release_date)S",
|
||||||
|
"duration" => "%(duration)S",
|
||||||
# For videos classified as an episode of a series:
|
# For videos classified as an episode of a series:
|
||||||
"series" => "%(series)s",
|
"series" => "%(series)S",
|
||||||
"season" => "%(season)s",
|
"season" => "%(season)S",
|
||||||
"season_number" => "%(season_number)s",
|
"season_number" => "%(season_number)S",
|
||||||
"episode" => "%(episode)s",
|
"episode" => "%(episode)S",
|
||||||
"episode_number" => "%(episode_number)s",
|
"episode_number" => "%(episode_number)S",
|
||||||
"episode_id" => "%(episode_id)s",
|
"episode_id" => "%(episode_id)S",
|
||||||
# For videos classified as music:
|
# For videos classified as music:
|
||||||
"track" => "%(track)s",
|
"track" => "%(track)S",
|
||||||
"track_number" => "%(track_number)s",
|
"track_number" => "%(track_number)S",
|
||||||
"artist" => "%(artist)s",
|
"artist" => "%(artist)S",
|
||||||
"album" => "%(album)s",
|
"album" => "%(album)S",
|
||||||
"album_type" => "%(album_type)s",
|
"album_type" => "%(album_type)S",
|
||||||
"genre" => "%(genre)s"
|
"genre" => "%(genre)S"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
defp custom_yt_dlp_option_map do
|
defp custom_yt_dlp_option_map do
|
||||||
%{
|
%{
|
||||||
# Filepath-safe versions of some standard options
|
|
||||||
"safe_id" => "%(id)S",
|
|
||||||
"safe_title" => "%(title)S",
|
|
||||||
"safe_fulltitle" => "%(fulltitle)S",
|
|
||||||
"safe_uploader" => "%(uploader)S",
|
|
||||||
"safe_creator" => "%(creator)S",
|
|
||||||
# Individual parts of the upload date
|
# Individual parts of the upload date
|
||||||
"upload_year" => "%(upload_date>%Y)s",
|
"upload_year" => "%(upload_date>%Y)s",
|
||||||
"upload_month" => "%(upload_date>%m)s",
|
"upload_month" => "%(upload_date>%m)s",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue