Play new songs from YouTube in the browser
YouTube's bot checks block yt-dlp from fetching audio on the server, so suggested songs now play in YouTube's embedded player, kept out of sight, in the browser. yt-dlp is only used to search. - GET /api/discover/youtube/<id> returns candidate video IDs, best first, or the one that played before (?refresh=true searches again). - PUT /api/discover/youtube/<id> remembers the video that played. - The UI tries the next candidate when a video can't be embedded, searches again when a remembered video is gone, and skips the song otherwise. - Drop the YouTube audio proxy, and Deno from the image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
93e12cfc72
commit
c84e7e715d
11 files changed
+495
-181
No files matched your search
+1
-3
@@ -25,14 +25,12 @@ RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates libssl3 python3 python3-venv \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# yt-dlp plays suggested songs from YouTube. It has to be recent to keep working with YouTube, so
|
||||
# yt-dlp finds suggested songs on YouTube. It has to be recent to keep working with YouTube, so
|
||||
# the latest version is installed: rebuild the image to update it, or set YTDLP_VERSION to pin one.
|
||||
ARG YTDLP_VERSION=
|
||||
RUN python3 -m venv /opt/yt-dlp \
|
||||
&& /opt/yt-dlp/bin/pip install --no-cache-dir "yt-dlp[default]${YTDLP_VERSION:+==${YTDLP_VERSION}}" \
|
||||
&& ln -s /opt/yt-dlp/bin/yt-dlp /usr/local/bin/yt-dlp
|
||||
# yt-dlp needs a JavaScript runtime for YouTube; Deno is the one it uses by default
|
||||
COPY --from=denoland/deno:bin-2.9.8 /deno /usr/local/bin/deno
|
||||
|
||||
COPY --from=server /src/target/release/playlistd /usr/local/bin/playlistd
|
||||
COPY --from=ui /src/dist /usr/share/playlistd/discover
|
||||
|
||||
Reference in new issue
Block a user