v3: added opengraph support to the app, wrote README instructions incl. a Docker image

This commit is contained in:
khannurien
2026-03-26 19:55:48 +00:00
parent 0cb5a798c7
commit ca70bdc14b
26 changed files with 551 additions and 120 deletions

View File

@@ -34,7 +34,7 @@ const PLAYLIST_SELECT = `p.*, u.username as owner_username,
(SELECT COUNT(*) FROM playlist_dumps pd WHERE pd.playlist_id = p.id) as dump_count
FROM playlists p LEFT JOIN users u ON u.id = p.user_id`;
function getPlaylistById(idOrSlug: string): Playlist {
export function getPlaylistById(idOrSlug: string): Playlist {
const row = UUID_RE.test(idOrSlug)
? db.prepare(`SELECT ${PLAYLIST_SELECT} WHERE p.id = ?;`).get(idOrSlug)
: db.prepare(`SELECT ${PLAYLIST_SELECT} WHERE p.slug = ?;`).get(idOrSlug);