Add file-type and host filters with a 4chan default
This commit is contained in:
+2
-1
@@ -24,7 +24,8 @@ interface MediaService {
|
||||
```
|
||||
|
||||
`MediaQuery` (implemented): `kind`, `source`, `scrapeId`, `channelId`, `authorIds`, `origin`
|
||||
(`guild`/`dm`), `cachedOnly`, `aspect`, `resolution`, `after`, `before`, `limit`, `offset`. The
|
||||
(`guild`/`dm`), `cachedOnly`, `exts`, `excludeHosts`, `aspect`, `resolution`, `after`, `before`,
|
||||
`limit`, `offset`. The
|
||||
`aspect` and `resolution` values are the preset keys from `filter-presets.ts`; `after`/`before` are
|
||||
ISO times on `posted_at`. Planned: `guildId`, `text`.
|
||||
|
||||
|
||||
+2
-2
@@ -147,8 +147,8 @@ that deletion is irreversible. The delete button is disabled for a 5 second coun
|
||||
|
||||
- **Media** tab: the bar carries the common filters — kind chips, source kind, server/DM origin,
|
||||
and the multi-select People popover. The **Advanced search** drawer has aspect ratio, resolution,
|
||||
source channel, posted-date range, and cached-only, with **Apply filters** / **Reset** in the
|
||||
bar.
|
||||
source channel, posted-date range, file-type chips, cached-only, and a default-on hide for 4chan
|
||||
links (they 404 almost always), with **Apply filters** / **Reset** in the bar.
|
||||
Nothing renders until **Load media** is pressed. A **Metadata** dropdown toggles which fields
|
||||
show in the small banner under each tile (User, Type, Date, Source, Resolution, Length). Video
|
||||
tiles carry a translucent play icon top-right. Discord serves no thumbnails for uploaded videos,
|
||||
|
||||
+4
-2
@@ -129,7 +129,9 @@ box live in Chat, not Call, and the connection stats are not chips yet.
|
||||
- Media lists scraped items. The bar shows the common filters: filetype chips, source kind
|
||||
(attachments/stickers/embeds), origin (server channels or DMs), and a multi-select **People**
|
||||
popover. The **Advanced search** drawer holds aspect ratio, resolution, source channel,
|
||||
posted-date range, and **Show only cached previews**, plus the card-size slider. Filters do not
|
||||
posted-date range, file-type chips (video mp4/webm/mov/mkv, image png/jpg/gif/webp/avif, audio),
|
||||
**Show only cached previews**, and a default-on **Hide 4chan links (usually dead)**, plus the
|
||||
card-size slider. Filters do not
|
||||
apply until **Apply filters** is pressed; **Reset** clears every filter and the zoom, unloads the
|
||||
grid, and brings back the initial Load media prompt.
|
||||
- A **Card size** slider scales tiles from two-thirds of the old size up to one image per row; the
|
||||
@@ -265,7 +267,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?`, `source?`, `channelId?`, `authorId?` (comma list), `origin?` (`guild`/`dm`), `cachedOnly?`, `aspect?`, `resolution?`, `after?`, `before?`, `limit?`, `offset?` | Media items across every scrape, newest first. `source` is `attachment`, `sticker`, or `embed`; `aspect` and `resolution` are the preset keys; `after`/`before` are ISO times on `posted_at`. Items carry `authorName`, `postedAt`, `width`, `height`, `aspectRatio`, `contentType`, `durationSecs`, `previewError`, `animUrl`; `localUrl`/`thumbUrl` when a file or preview exists |
|
||||
| GET | `/api/media` | `kind?`, `source?`, `channelId?`, `authorId?` (comma list), `origin?` (`guild`/`dm`), `cachedOnly?`, `ext?` (comma list), `excludeHosts?` (comma list), `aspect?`, `resolution?`, `after?`, `before?`, `limit?`, `offset?` | Media items across every scrape, newest first. `source` is `attachment`, `sticker`, or `embed`; `aspect` and `resolution` are the preset keys; `after`/`before` are ISO times on `posted_at`. Items carry `authorName`, `postedAt`, `width`, `height`, `aspectRatio`, `contentType`, `durationSecs`, `previewError`, `animUrl`; `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 preview (type from `preview_ext`) |
|
||||
| GET | `/api/media/:scrapeId/:itemId/stream` | none | Playback/full-view source: the local file, or the remote URL refreshed from the source message. Supports `Range`. Non-media upstream responses (provider pages) return `415` |
|
||||
|
||||
Reference in New Issue
Block a user