diff --git a/bin/yt-dlp b/bin/yt-dlp deleted file mode 100644 index 71c0b15a7..000000000 Binary files a/bin/yt-dlp and /dev/null differ diff --git a/docker/kmq/Dockerfile b/docker/kmq/Dockerfile index 8c0315f8f..04b12c0ec 100644 --- a/docker/kmq/Dockerfile +++ b/docker/kmq/Dockerfile @@ -22,9 +22,8 @@ COPY sql_dumps/kmq-test-cached.sql sql_dumps/kmq-test-cached.sql COPY sql/ sql/ COPY templates/ templates/ -COPY bin/ bin/ -# RUN mkdir bin -# RUN curl -L https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp -o bin/yt-dlp +RUN mkdir bin +RUN curl -L https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp -o bin/yt-dlp RUN chmod u+x bin/yt-dlp COPY src/ src/ diff --git a/src/helpers/kmq_song_downloader.ts b/src/helpers/kmq_song_downloader.ts index 86fef1d9f..92e2d40dd 100644 --- a/src/helpers/kmq_song_downloader.ts +++ b/src/helpers/kmq_song_downloader.ts @@ -439,11 +439,11 @@ export default class KmqSongDownloader { } try { - let ytdlpCommand = `${YT_DLP_LOCATION} -f bestaudio -o "${outputFile}" --abort-on-unavailable-fragments --extractor-arg "youtube:player_client=web;po_token=${this.youtubeSessionTokens.po_token};visitor_data=${this.youtubeSessionTokens.visitor_data};player_skip=webpage,configs" -- '${id}';`; + let ytdlpCommand = `${YT_DLP_LOCATION} -f bestaudio -o "${outputFile}" --abort-on-unavailable-fragments --extractor-arg "youtube:player-client=web_creator;po_token=web_creator+${this.youtubeSessionTokens.po_token};visitor_data=${this.youtubeSessionTokens.visitor_data};player_skip=webpage,configs" -- '${id}';`; if (KmqConfiguration.Instance.ytdlpDownloadWithCookie()) { if (this.hasYtDlpSessionCookies) { - ytdlpCommand = `${YT_DLP_LOCATION} -f bestaudio -o "${outputFile}" --abort-on-unavailable-fragments --extractor-args "youtube:player-client=web,default;po_token=${this.youtubeSessionTokens.po_token}" --cookies ${YOUTUBE_SESSION_COOKIE_PATH} -- '${id}';`; + ytdlpCommand = `${YT_DLP_LOCATION} -f bestaudio -o "${outputFile}" --abort-on-unavailable-fragments --extractor-args "youtube:player-client=web_creator;po_token=web_creator+${this.youtubeSessionTokens.po_token}" --cookies ${YOUTUBE_SESSION_COOKIE_PATH} -- '${id}';`; } else { logger.warn( "ytdlpDownloadWithCookie enabled but cookie file missing, falling back to non-cookie", diff --git a/src/kmq_configuration.ts b/src/kmq_configuration.ts index 75fe253d7..b48a8f184 100644 --- a/src/kmq_configuration.ts +++ b/src/kmq_configuration.ts @@ -77,7 +77,7 @@ export default class KmqConfiguration { } ytdlpUpdatesEnabled(): boolean { - return this.config["ytdlpUpdatesEnabled"] ?? false; + return this.config["ytdlpUpdatesEnabled"] ?? true; } ytdlpDownloadWithCookie(): boolean {