Added 8k support (#254)
This commit is contained in:
parent
a2a0f48065
commit
dec3938780
4 changed files with 4 additions and 2 deletions
|
|
@ -142,6 +142,7 @@ defmodule Pinchflat.Downloading.DownloadOptionBuilder do
|
|||
:"720p" -> video_codec_option.("720")
|
||||
:"1080p" -> video_codec_option.("1080")
|
||||
:"2160p" -> video_codec_option.("2160")
|
||||
:"4320p" -> video_codec_option.("4320")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,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 :preferred_resolution, Ecto.Enum, values: ~w(2160p 1080p 720p 480p 360p audio)a, default: :"1080p"
|
||||
field :preferred_resolution, Ecto.Enum, values: ~w(4320p 2160p 1080p 720p 480p 360p audio)a, default: :"1080p"
|
||||
|
||||
has_many :sources, Source
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ defmodule PinchflatWeb.MediaProfiles.MediaProfileHTML do
|
|||
|
||||
def friendly_resolution_options do
|
||||
[
|
||||
{"8k", "4320p"},
|
||||
{"4k", "2160p"},
|
||||
{"1080p", "1080p"},
|
||||
{"720p", "720p"},
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ defmodule Pinchflat.Downloading.DownloadOptionBuilderTest do
|
|||
|
||||
describe "build/1 when testing quality options" do
|
||||
test "it includes quality options" do
|
||||
resolutions = ["360", "480", "720", "1080", "2160"]
|
||||
resolutions = ["360", "480", "720", "1080", "2160", "4320"]
|
||||
|
||||
Enum.each(resolutions, fn resolution ->
|
||||
resolution_atom = String.to_existing_atom(resolution <> "p")
|
||||
|
|
|
|||
Loading…
Reference in a new issue