Added 8k support (#254)

This commit is contained in:
Kieran 2024-05-21 09:59:05 -07:00 committed by GitHub
parent a2a0f48065
commit dec3938780
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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

View file

@ -23,6 +23,7 @@ defmodule PinchflatWeb.MediaProfiles.MediaProfileHTML do
def friendly_resolution_options do
[
{"8k", "4320p"},
{"4k", "2160p"},
{"1080p", "1080p"},
{"720p", "720p"},

View file

@ -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")