Add kiosk launcher downloads and player URL resolution

This commit is contained in:
2026-08-06 18:51:33 +01:00
parent 59730837ad
commit a4f8a807ff
23 changed files with 621 additions and 71 deletions
+12
View File
@@ -50,6 +50,17 @@ async function fetchScreenPlayerUrls(pool) {
return playerUrls;
}
async function fetchPlayerPublicBaseUrl(pool) {
const [rows] = await pool.query(`
SELECT public_base_url
FROM d_players
WHERE device_id = '1'
LIMIT 1
`);
return normalizePlayerBaseUrl(rows[0] && rows[0].public_base_url) || null;
}
async function fetchScreenPlayerRecord(pool, slug) {
const [rows] = await pool.query(`
SELECT p.device_id, p.public_base_url, p.internal_base_url, p.last_seen_at
@@ -103,6 +114,7 @@ module.exports = {
normalizePlayerBaseUrl,
buildScreenPlayerUrl,
fetchScreenPlayerUrls,
fetchPlayerPublicBaseUrl,
fetchScreenPlayerRecord,
uniqueScreenSlug,
fetchScreenById,