Added audio_lang to media_profile table
This commit is contained in:
parent
845910eaac
commit
4bc03c16e9
4 changed files with 13 additions and 1 deletions
|
|
@ -27,9 +27,10 @@ defmodule Pinchflat.Downloading.QualityOptionBuilder do
|
|||
|
||||
# TODO: pass in the entire media profile once we have the language preference column
|
||||
# TODO: test
|
||||
# TODO: Set to ba/b if it's audio-only
|
||||
defp build_format_string(language_preference) do
|
||||
if language_preference do
|
||||
["bestvideo*+bestaudio[#{build_format_modifier(language_preference)}]/bestvideo*+bestaudio/best"]
|
||||
["bestvideo+bestaudio[#{build_format_modifier(language_preference)}]/bestvideo*+bestaudio/best"]
|
||||
else
|
||||
["bestvideo*+bestaudio/best"]
|
||||
end
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ defmodule Pinchflat.Profiles.MediaProfile do
|
|||
sponsorblock_categories
|
||||
shorts_behaviour
|
||||
livestream_behaviour
|
||||
audio_lang
|
||||
preferred_resolution
|
||||
media_container
|
||||
redownload_delay_days
|
||||
|
|
@ -65,6 +66,7 @@ defmodule Pinchflat.Profiles.MediaProfile do
|
|||
# See `build_format_clauses` in the Media context for more.
|
||||
field :shorts_behaviour, Ecto.Enum, values: ~w(include exclude only)a, default: :include
|
||||
field :livestream_behaviour, Ecto.Enum, values: ~w(include exclude only)a, default: :include
|
||||
field :audio_lang, :string
|
||||
field :preferred_resolution, Ecto.Enum, values: ~w(4320p 2160p 1080p 720p 480p 360p audio)a, default: :"1080p"
|
||||
field :media_container, :string, default: nil
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 434 KiB After Width: | Height: | Size: 438 KiB |
|
|
@ -0,0 +1,9 @@
|
|||
defmodule Pinchflat.Repo.Migrations.AddAudioLangToMediaProfiles do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:media_profiles) do
|
||||
add :audio_lang, :string
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue