Release 2.6.15

This commit is contained in:
2026-08-08 23:15:04 +01:00
parent 6c28a1c028
commit 49c72923b4
12 changed files with 177 additions and 48 deletions
-25
View File
@@ -532,12 +532,6 @@ async function start() {
return res.status(400).json({ error: 'Device ID is required.' });
}
logBridge('Forwarding media upload to player', {
deviceId: deviceId,
relativePath: relativePath,
contentLength: Buffer.isBuffer(req.body) ? req.body.length : 0
});
const bodyBuffer = Buffer.isBuffer(req.body) ? req.body : Buffer.from(req.body || '');
const response = await sendPlayerCommand({
command: 'media-put',
@@ -545,13 +539,6 @@ async function start() {
bodyBase64: bodyBuffer.toString('base64')
}, deviceId);
logBridge('Player media upload completed', {
deviceId: deviceId,
relativePath: relativePath,
ok: Boolean(response && response.ok),
status: response && response.status ? response.status : null
});
res.status(response.status || (response.ok ? 200 : 502)).json(response);
} catch (error) {
logBridge('Player media upload failed', {
@@ -574,23 +561,11 @@ async function start() {
return res.status(400).json({ error: 'Device ID is required.' });
}
logBridge('Forwarding media delete to player', {
deviceId: deviceId,
relativePath: relativePath
});
const response = await sendPlayerCommand({
command: 'media-delete',
relativePath: relativePath
}, deviceId);
logBridge('Player media delete completed', {
deviceId: deviceId,
relativePath: relativePath,
ok: Boolean(response && response.ok),
status: response && response.status ? response.status : null
});
res.status(response.status || (response.ok ? 200 : 502)).json(response);
} catch (error) {
logBridge('Player media delete failed', {
-11
View File
@@ -252,10 +252,6 @@ async function start() {
if (!filePath) {
response.error = 'Invalid media path.';
} else {
console.info('[player] Removing media file', {
relativePath: relativePath,
filePath: filePath
});
try {
await fs.promises.unlink(filePath);
} catch (error) {
@@ -264,10 +260,6 @@ async function start() {
}
}
response.ok = true;
console.info('[player] Media file removed', {
relativePath: relativePath,
filePath: filePath
});
}
} else if (['refresh', 'reload', 'redirect', 'pause', 'blackout', 'previous', 'next', 'setclientname'].indexOf(command) !== -1) {
const screenSlug = String(payload.screenSlug || payload.slug || '').trim();
@@ -467,9 +459,6 @@ async function start() {
}
if (parsedMessage && String(parsedMessage.type || '').trim() === 'registered') {
console.info('[player] Bridge registration acknowledged', {
playerIdentifier: PLAYER_DEVICE_ID
});
sendHeartbeat();
return;
}
+22 -2
View File
@@ -959,9 +959,29 @@ function createUploadSyncService(options) {
if (operation.previousUploadRefs.length) {
const nextUploadRefSet = new Set(operation.nextUploadRefs);
await removeUnusedUploadFiles(pool, operation.localUploadDir, operation.previousUploadRefs.filter(function (reference) {
const removedUploadRefs = operation.previousUploadRefs.filter(function (reference) {
return !nextUploadRefSet.has(reference);
}));
});
for (let i = 0; i < removedUploadRefs.length; i += 1) {
const removedUploadRef = removedUploadRefs[i];
const referenceCount = await countUploadReferences(pool, removedUploadRef);
if (referenceCount > 0) {
continue;
}
const deleted = await removeUploadFileFromPlayer(removedUploadRef, operation.localUploadDir, taskPayload.playerInternalBaseUrl, taskPayload.playerIdentifier);
if (!deleted) {
queuePlayerUploadSync({
type: 'delete',
uploadPath: removedUploadRef,
uploadDir: operation.localUploadDir,
playerIdentifier: taskPayload.playerIdentifier,
playerInternalBaseUrl: taskPayload.playerInternalBaseUrl,
metadata: playerMetadata
});
}
}
await removeUnusedUploadFiles(pool, operation.localUploadDir, removedUploadRefs);
}
if (operation.refreshScreenSlugs.length) {
@@ -167,6 +167,31 @@ function buildTaskPlayerLabel(metadata) {
return '';
}
function buildTaskDescription(task, metadata) {
const playerLabel = buildTaskPlayerLabel(metadata);
const taskKey = String(task && task.key || '').trim();
let displayKey = taskKey;
if (playerLabel && displayKey) {
const playerPrefix = `${playerLabel}:`;
const playerSuffix = `:${playerLabel}`;
if (displayKey.startsWith(playerPrefix)) {
displayKey = displayKey.slice(playerPrefix.length);
}
if (displayKey.endsWith(playerSuffix)) {
displayKey = displayKey.slice(0, -playerSuffix.length);
}
if (displayKey === playerLabel) {
displayKey = '';
}
}
return [playerLabel, displayKey].filter(Boolean).join(':');
}
function buildQueuePageViewModel(data, message, currentUser) {
const tasks = (data && data.tasks) || [];
const summary = (data && data.summary) || { counts: {}, total: 0, activeCount: 0 };
@@ -262,7 +287,7 @@ function buildQueuePageViewModel(data, message, currentUser) {
const visibleTasksWithSources = visibleTasks.map(function (task) {
const playerLabel = buildTaskPlayerLabel(task.metadata);
const taskDescription = [playerLabel, String(task && task.key || '').trim()].filter(Boolean).join(':');
const taskDescription = buildTaskDescription(task, task.metadata);
return Object.assign({}, task, {
sourceUrl: buildTaskSourceFilterUrl(queryState, task, sourceFilter),
+5 -4
View File
@@ -43,9 +43,9 @@
</section>
{{#if (hasPermission currentUser "dashboard.allow")}}
<div class="row pb-4">
<div class="row">
<div class="col-12 col-xl-8">
<div class="card card-outline card-primary dashboard-actions-card">
<div class="card card-outline card-primary dashboard-actions-card pb-4">
<div class="card-header">
<div class="dashboard-card-heading">
<h3 class="card-title">Quick actions</h3>
@@ -109,7 +109,7 @@
</div>
</div>
<div class="col-12 col-xl-4">
<div class="card card-outline card-secondary dashboard-launcher-card h-100">
<div class="card card-outline card-secondary dashboard-launcher-card h-100 pb-4">
<div class="card-header">
<div class="dashboard-card-heading">
<h3 class="card-title">Kiosk launchers</h3>
@@ -144,7 +144,8 @@
<li>The script looks for a supported browser on the device and launches the first one it finds.</li>
<li>The launcher opens the correct player page automatically, so no manual URL entry is needed.</li>
<li>It uses a kiosk-mode browser window, so the screen stays focused on signage instead of normal browsing.</li>
<li>Exit with Alt+F4 on Windows or Linux. On Linux, that is usually the standard close-window shortcut too.</li>
<li>If a browser is already open or open in the background, the launcher will bring it to the front, but not enter kiosk mode.</li>
<li>Exit with Alt+F4 on Windows or Linux.</li>
</ul>
<div class="mt-3 pt-3 border-top">
<p class="mb-0 text-muted small">These downloads are scripts, not applications: the Windows download is a .bat file and the Linux download is a .sh file.</p>