forked from Furumi/furumi-web
Document finding and subscribing to shared podcasts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
59d94203db
commit
88af30754f
4 files changed
+72
-2
No files matched your search
@@ -253,6 +253,34 @@ only while the overlay runs.
|
||||
warnings is shared only with `confirm` naming exactly its current URLs
|
||||
(otherwise 409 `needs_confirmation` with the warnings, nothing written).
|
||||
|
||||
Search and subscription from a card (`src/podcasts/search.rs`):
|
||||
|
||||
- `GET /api/player/federation/search/events` starts `PodcastDht::search`
|
||||
(`Federation::spawn_podcast_search`, at most 20 hits, 20 s) next to the
|
||||
music DHT search. Music events stream first and are unchanged
|
||||
(`federation.track|artist|release`); every event now carries `"type":
|
||||
"music"` or `"type": "podcast"`. Podcast hits follow as
|
||||
`federation.podcast` events with a `PodcastHitView` entity: the card's
|
||||
public fields, the origin `feed_url` (never `claimed_feed_urls`),
|
||||
`publisher_count`, `rank` and `exact_match` from `merge_search_results`
|
||||
with the music items, and the searching account's `subscribed` /
|
||||
`local_podcast_id` (by id, or a known feed URL or alias through
|
||||
`resolve_podcast_id`). `search.completed` adds `podcast_discovery`
|
||||
(`running`, `off`, `failed`); a failed podcast search never fails the
|
||||
music search.
|
||||
- `POST /api/podcasts/discovery/preview` and `/discovery/subscribe` take
|
||||
`{"podcast_id", "feed_url"}` from a hit and refuse a URL the id does not
|
||||
hash from (422). The preview fetches the feed through the SSRF-guarded
|
||||
fetcher and returns the channel, season counts and the newest 50 episodes
|
||||
without storing anything; subscribe runs `runner::subscribe_url` with the
|
||||
origin URL (fetch first, then a private subscription with the card's id,
|
||||
or the account's existing podcast for a known URL), and writes nothing
|
||||
when the account is already subscribed. Both share the "add RSS" request
|
||||
limits.
|
||||
- The browser keeps only expected, typed card fields (`podcasts.foundHit`):
|
||||
ids must look like podcast ids, URLs must be absolute `http(s)` without
|
||||
credentials (artwork: `https` only), and texts render with `x-text`.
|
||||
|
||||
## Contributing
|
||||
|
||||
Bug reports, design discussions, and patches are welcome. Before submitting a
|
||||
|
||||
Reference in new issue
Block a user