diff --git a/lib/pinchflat/downloading/download_option_builder.ex b/lib/pinchflat/downloading/download_option_builder.ex index a966e4b..c1ccf6f 100644 --- a/lib/pinchflat/downloading/download_option_builder.ex +++ b/lib/pinchflat/downloading/download_option_builder.ex @@ -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 diff --git a/lib/pinchflat/profiles/media_profile.ex b/lib/pinchflat/profiles/media_profile.ex index fadc90b..3111640 100644 --- a/lib/pinchflat/profiles/media_profile.ex +++ b/lib/pinchflat/profiles/media_profile.ex @@ -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 diff --git a/lib/pinchflat_web/controllers/media_profiles/media_profile_html.ex b/lib/pinchflat_web/controllers/media_profiles/media_profile_html.ex index aae74ce..44ed8da 100644 --- a/lib/pinchflat_web/controllers/media_profiles/media_profile_html.ex +++ b/lib/pinchflat_web/controllers/media_profiles/media_profile_html.ex @@ -23,6 +23,7 @@ defmodule PinchflatWeb.MediaProfiles.MediaProfileHTML do def friendly_resolution_options do [ + {"8k", "4320p"}, {"4k", "2160p"}, {"1080p", "1080p"}, {"720p", "720p"}, diff --git a/test/pinchflat/downloading/download_option_builder_test.exs b/test/pinchflat/downloading/download_option_builder_test.exs index e356ec8..735e72d 100644 --- a/test/pinchflat/downloading/download_option_builder_test.exs +++ b/test/pinchflat/downloading/download_option_builder_test.exs @@ -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")