Add links-mode embed thumbnails, item metadata, and media filters

This commit is contained in:
Fisto
2026-09-16 11:44:09 +02:00
parent 1fe204b91e
commit 973b9cff92
23 changed files with 863 additions and 82 deletions
+27 -1
View File
@@ -799,10 +799,36 @@ export function startWebUi(deps: WebUiDeps): WebUiHandle {
? String(req.query.source)
: undefined;
const channelId = req.query.channelId ? String(req.query.channelId) : undefined;
const authorId = req.query.authorId ? String(req.query.authorId) : undefined;
const aspect = req.query.aspect ? String(req.query.aspect) : undefined;
const resolution = req.query.resolution ? String(req.query.resolution) : undefined;
const after = req.query.after ? String(req.query.after) : undefined;
const before = req.query.before ? String(req.query.before) : undefined;
const limit = clampLimit(req.query.limit, 60, 500);
const offset = Math.max(0, Number(req.query.offset ?? 0) || 0);
res.json({ ok: true, result: deps.media.queryMedia({ kind, source, channelId, limit, offset }) });
res.json({
ok: true,
result: deps.media.queryMedia({
kind,
source,
channelId,
authorId,
aspect,
resolution,
after,
before,
limit,
offset
})
});
})
);
app.get(
"/api/media/authors",
wrap(async (_req, res) => {
res.json({ ok: true, result: deps.media.listAuthors() });
})
);