Add source filters and a full-window media view

This commit is contained in:
Fisto
2026-09-16 11:11:50 +02:00
parent 2573dd4d63
commit 902646224f
12 changed files with 179 additions and 32 deletions
+9 -6
View File
@@ -121,11 +121,14 @@ box live in Chat, not Call, and the connection stats are not chips yet.
## Media and Bot
- **Media** and **Bot** are scope buttons beside Guild and DM. They open overlays over the shell.
Mobile is out of scope for the media feature.
- Media lists scraped items with kind chips (All, Images, GIFs, Videos, Audio), a channel picker
with **Start links** / **Start download**, and the active scrapes with **Stop**. Images and GIFs
render from their Discord CDN URLs; videos and audio are link cards.
- **Media** and **Bot** are scope buttons beside Guild and DM. They open a full-window view below
the header and the call strip (the shell is covered; only the header, and the call strip when it
is visible, stay on screen). Mobile is out of scope for the media feature.
- Media lists scraped items with kind chips (All, Images, GIFs, Videos, Audio), a source filter
(any, attachments, stickers, embeds), a source-channel filter built from the scrape list, a
channel picker with **Start links** / **Start download**, and the active scrapes with **Stop**.
Images and GIFs render from the cached preview when one exists, then the local file, then the
Discord CDN URL; videos and audio are link cards.
- Bot shows the slopbot connection state and the scrape queue.
- The views are self-contained: `poc/public/media.js` and `media.css`, over the `/api/media/*`
routes in the table below. See [media.md](media.md).
@@ -249,7 +252,7 @@ replaceable.
| POST | `/api/audio/stop` | none | Stop speech and clear the queue |
| POST | `/api/audio/capture` | `start` | Start or stop capture |
| GET | `/api/transcript` | `limit?`, `sessionId?` | Sessions and captured segments |
| GET | `/api/media` | `kind?`, `limit?`, `offset?` | Media items across every scrape, newest first; `localUrl` when a file was downloaded |
| GET | `/api/media` | `kind?`, `source?`, `channelId?`, `limit?`, `offset?` | Media items across every scrape, newest first. `source` is `attachment`, `sticker`, or `embed`; `channelId` filters by source channel. `localUrl`/`thumbUrl` when a file or preview exists |
| GET | `/api/media/:scrapeId/:itemId/file` | none | The downloaded file, content-typed from its extension |
| GET | `/api/media/:scrapeId/:itemId/thumb` | none | The cached WebP preview |
| GET | `/api/media/scrapes` | none | Every scrape with state and counters |