Share an episode as a page, on ipx-play (#447)
Share handed over the raw file address or the item's link: no preview, no time, nothing a person without iPX could do much with. Now, as Overcast does, an episode shares as a short link to its own page, play.ipxreader.app/e/<id>, which anyone can open: the show's art and name, the episode's title, date, length and notes, a player on the publisher's own file starting at ?t= if a time was shared, buttons to subscribe in Apple Podcasts, Overcast, Pocket Casts or Castro, and Open Graph tags for a preview where the link is pasted. ipx-play is a service of its own (crates/play), built like the directory: ipx sends it the episode with its token (POST /v1/shares) and gets the link back. The id comes from the feed's address and the guid, so the same episode is one link whoever shares it. Only episodes of feeds the directory would be sent go there, by the directory's own rule (snapshot_entries), so the two cannot disagree on what is private; ipx-play also refuses an address that looks private. Anything else, and any server without ipx-play set up, shares as before. In the page, Share on an episode opens a menu once the link is back: Share link, Share from 12:34 (the player's clock, or where you left off), Copy link. A menu because the share sheet needs a press of its own, and the request for the link used up the one that opened it. The page runs no script: the start time is the media fragment #t=, and its CSP loads nothing but its stylesheet, the art and the file. Admin, Directory, Sharing episodes sets the address and token. The browser suite starts its own ipx-play; it was not run here (no Caddy on this Mac). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
28
Dockerfile.play
Normal file
28
Dockerfile.play
Normal file
@@ -0,0 +1,28 @@
|
||||
# ipx-play (#447), the pages shared episodes open. Built from the repo's root:
|
||||
# sh scripts/build-image.sh play
|
||||
FROM rust:1-slim-trixie AS build
|
||||
# SQLite is compiled from source for sqlx, which needs a C toolchain.
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends build-essential \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /src
|
||||
# Every member of the workspace, since cargo reads them all to build one.
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY crates ./crates
|
||||
# The logo and icon its pages serve, compiled into the binary.
|
||||
COPY web/logo.svg web/favicon.png ./web/
|
||||
# Compiled crates kept in the builder between builds (#438), in a target of its own.
|
||||
RUN --mount=type=cache,id=ipx-cargo-registry,target=/usr/local/cargo/registry,sharing=locked \
|
||||
--mount=type=cache,id=ipx-play-target,target=/src/target,sharing=locked \
|
||||
touch crates/play/src/main.rs crates/play/src/lib.rs crates/directory/src/lib.rs crates/feed/src/lib.rs \
|
||||
&& cargo build --release --locked -p ipx-play \
|
||||
&& cp target/release/ipx-play /usr/local/bin/ipx-play
|
||||
|
||||
FROM debian:trixie-slim
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=build /usr/local/bin/ipx-play /usr/local/bin/ipx-play
|
||||
ENV PLAY_CONFIG=/config/play.toml
|
||||
# Unraid's nobody:users. It writes nothing to disk: the database is elsewhere.
|
||||
USER 99:100
|
||||
EXPOSE 8102
|
||||
CMD ["ipx-play"]
|
||||
Reference in New Issue
Block a user