[Bugfix] Improve YouTube shorts detection for new YouTube pants (#618)

* Update youtube shorts detection to support youtube pants

* Updates a test
This commit is contained in:
Kieran
2025-02-20 15:49:09 -08:00
committed by GitHub
parent 464a595045
commit b62eb2bc6b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ defmodule Pinchflat.YtDlp.Media do
#
# These don't fail if duration or aspect_ratio are missing
# due to Elixir's comparison semantics
response["duration"] <= 60 && response["aspect_ratio"] <= 0.85
response["duration"] <= 180 && response["aspect_ratio"] <= 0.85
end
end
+1 -1
View File
@@ -269,7 +269,7 @@ defmodule Pinchflat.YtDlp.MediaTest do
response = %{
"original_url" => "https://www.youtube.com/watch?v=TiZPUDkDYbk",
"aspect_ratio" => 0.5,
"duration" => 59,
"duration" => 150,
"upload_date" => "20210101"
}