From b54c8efa3d2006586c01af6ab14e70b42559e684 Mon Sep 17 00:00:00 2001 From: DarkTankist <47301523+DarkTankist@users.noreply.github.com> Date: Sun, 20 Jul 2025 22:53:59 +0200 Subject: [PATCH 1/3] Update util.go Used FormatStream instead of Adaptive. --- ext/youtube/util.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ext/youtube/util.go b/ext/youtube/util.go index 71393c3..dbf3a3e 100644 --- a/ext/youtube/util.go +++ b/ext/youtube/util.go @@ -14,11 +14,16 @@ const invEndpoint = "/api/v1/videos/" var invInstance string + func ParseInvFormats(data *InvResponse) []*models.MediaFormat { - formats := make([]*models.MediaFormat, 0, len(data.AdaptiveFormats)) + // Decided to use FormatStream instead of AdaptiveFormats since this latter might not be available in some videos. + //formats := make([]*models.MediaFormat, 0, len(data.AdaptiveFormats)) + formats := make([]*models.MediaFormat, 0, len(data.FormatStreams)) duration := data.LengthSeconds - - for _, format := range data.AdaptiveFormats { + + // As explained above, using FormatStreams + //for _, format := range data.AdaptiveFormats { + for _, format := range data.FormatStreams { if format.URL == "" { continue } From 8b8e15c1b516fbfb9078c05587332a2a00dffa2d Mon Sep 17 00:00:00 2001 From: DarkTankist <47301523+DarkTankist@users.noreply.github.com> Date: Sun, 20 Jul 2025 22:54:49 +0200 Subject: [PATCH 2/3] Update docker-compose.yaml Added downloads folder --- docker-compose.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index c8764fe..7b17ab0 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -10,6 +10,7 @@ services: volumes: - ./config.yaml:/app/config.yaml - ./cookies:/app/cookies + - ./downloads:/app/downloads depends_on: db: condition: service_healthy From c791226943d86bef6605507c18065a8c75036799 Mon Sep 17 00:00:00 2001 From: DarkTankist <47301523+DarkTankist@users.noreply.github.com> Date: Sun, 20 Jul 2025 22:58:24 +0200 Subject: [PATCH 3/3] Update and rename config.example.yaml to config.yaml File already exists so it won't create any directory when building the first time. --- config.example.yaml => config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename config.example.yaml => config.yaml (83%) diff --git a/config.example.yaml b/config.yaml similarity index 83% rename from config.example.yaml rename to config.yaml index 7a352c8..2558dce 100644 --- a/config.example.yaml +++ b/config.yaml @@ -6,4 +6,4 @@ reddit: youtube: instance: https://example.com - disabled: true \ No newline at end of file + disabled: true