From cf7aaa5059b1333555555d7bdcd516357a73bbdf Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Tue, 10 Jun 2025 14:22:07 +0200 Subject: [PATCH] Videos: Add "update-yt-dlp" init target to scripts/dist/Makefile #4982 Signed-off-by: Michael Mayer --- internal/photoprism/dl/dl_test.go | 2 +- internal/photoprism/dl/download_test.go | 2 ++ scripts/dist/Makefile | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/photoprism/dl/dl_test.go b/internal/photoprism/dl/dl_test.go index eedea76b5..74b5832bb 100644 --- a/internal/photoprism/dl/dl_test.go +++ b/internal/photoprism/dl/dl_test.go @@ -16,7 +16,7 @@ import ( ) const ( - testVideoRawURL = "https://youtu.be/fD6VYfy3B2s" + testVideoRawURL = "https://www.youtube.com/watch?v=fD6VYfy3B2s" playlistRawURL = "https://soundcloud.com/mattheis/sets/kindred-phenomena" channelRawURL = "https://www.youtube.com/channel/UCHDm-DKoMyJxKVgwGmuTaQA" subtitlesTestVideoRawURL = "https://www.youtube.com/watch?v=QRS8MkLhQmM" diff --git a/internal/photoprism/dl/download_test.go b/internal/photoprism/dl/download_test.go index bc9385319..7df61b54a 100644 --- a/internal/photoprism/dl/download_test.go +++ b/internal/photoprism/dl/download_test.go @@ -38,6 +38,8 @@ func TestDownload(t *testing.T) { t.Errorf("copy n not equal to download buffer: %d!=%d", n, downloadBuf.Len()) } + t.Logf("error: %s", stderrBuf.String()) + if n < 10000 { t.Errorf("should have copied at least 10000 bytes: %d", n) } diff --git a/scripts/dist/Makefile b/scripts/dist/Makefile index b7af82973..f501eaed8 100755 --- a/scripts/dist/Makefile +++ b/scripts/dist/Makefile @@ -61,6 +61,9 @@ darktable: sudo apt-get update sudo apt-get install darktable sudo apt-get autoremove +yt-dlp: update-yt-dlp +update-yt-dlp: + sudo yt-dlp -U # Declare all targets as "PHONY", see https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html. MAKEFLAGS += --always-make