Add links-mode embed thumbnails, item metadata, and media filters
This commit is contained in:
+27
-1
@@ -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() });
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user