summaryrefslogtreecommitdiff
path: root/docs/podcasts.md
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-05 21:26:46 +0300
committerPaul Buetow <paul@buetow.org>2026-05-05 21:26:46 +0300
commit83ffe8544aa7845810049083d1376f7c7d01cd2c (patch)
tree12010312175f9fca91c9115ca865bb0fb50fd63c /docs/podcasts.md
parent7bc3b65b3c66c7744e1c6d4fa69842985d06d9b7 (diff)
Expand README and split documentation into docs/ directory
Diffstat (limited to 'docs/podcasts.md')
-rw-r--r--docs/podcasts.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/podcasts.md b/docs/podcasts.md
new file mode 100644
index 0000000..6d03601
--- /dev/null
+++ b/docs/podcasts.md
@@ -0,0 +1,31 @@
+Podcast Support
+===============
+
+Podcasts are **special sets** (`sets.is_podcast = 1`). They reuse set permissions, browsing, and cover images, while adding feed management and episode tracking.
+
+### Subscribing
+
+Admin opens the **Podcasts** button in the admin panel (or calls `POST /api/podcasts`):
+- Submit an RSS/Atom feed URL and optional folder name.
+- Server creates a set folder, parses the feed, downloads the cover image, and inserts episodes into `podcast_episodes`.
+
+### Episode Management
+
+Episodes are stored in `podcast_episodes` and rendered in the browse grid for podcast sets:
+- **Undownloaded** episodes show a **Download to server** button (calls `POST /api/podcasts/episodes/{id}/download`).
+- **Downloaded** episodes become regular `media` rows and appear as normal media cards.
+- Users can mark episodes as listened/unlistened via the checkmark button.
+
+### Background Feed Checker
+
+A background goroutine (`CheckFeeds`) refreshes feeds every hour (configurable via `PODCAST_CHECK_INTERVAL_MINUTES`). It uses conditional GET (`If-None-Match`, `If-Modified-Since`) to avoid re-downloading unchanged feeds.
+
+### API Endpoints
+
+| Method | Path | Description |
+|--------|------|-------------|
+| `GET` | `/api/podcasts` | List podcast sets |
+| `POST` | `/api/podcasts` | Subscribe to a new feed (admin) |
+| `GET` | `/api/podcasts/{id}/episodes` | List episodes with status |
+| `POST` | `/api/podcasts/episodes/{id}/download` | Server-side download |
+| `POST` | `/api/podcasts/episodes/{id}/complete` | Toggle completion | \ No newline at end of file