From c064d3ab57c424694d5cc638ddab2c424954ab2e Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Thu, 12 Nov 2026 08:54:43 +0100 Subject: [PATCH] Restore Companion location bars on MPC presets --- companion-modules/media-player-classic/README.md | 1 + companion-modules/media-player-classic/src/definitions.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/companion-modules/media-player-classic/README.md b/companion-modules/media-player-classic/README.md index b23127e..19e7a03 100644 --- a/companion-modules/media-player-classic/README.md +++ b/companion-modules/media-player-classic/README.md @@ -70,6 +70,7 @@ when it becomes full red. Previous/Next stay subdued blue. Mute is neutral when unmuted and full red with **MUTED** text when muted. Playback state is full green while playing, full red while stopped, and amber while paused. Timers stay dark with progress bars; backup sync keeps its original status colors. +Presets keep Companion’s standard top bar with the button location. Re-add copied presets to apply styling updates; linked presets update automatically. The progress bar fills from left to right. It turns amber with 10 seconds left diff --git a/companion-modules/media-player-classic/src/definitions.js b/companion-modules/media-player-classic/src/definitions.js index 8c00a11..3c27824 100644 --- a/companion-modules/media-player-classic/src/definitions.js +++ b/companion-modules/media-player-classic/src/definitions.js @@ -54,7 +54,7 @@ export function presets(label = 'MPC_DEV') { const button = (name, text, id, feedback = [], size = '18', bgcolor = colors.dark) => ({ type: 'simple', name, - style: { text, size, color: colors.white, bgcolor, show_topbar: false }, + style: { text, size, color: colors.white, bgcolor, show_topbar: true }, steps: [{ down: id ? [{ actionId: id, options: { target: 'both' } }] : [], up: [] }], feedbacks: [...feedback, offline], }) @@ -62,7 +62,7 @@ export function presets(label = 'MPC_DEV') { transport_redundancy: { type: 'simple', name: 'Backup sync status', - style: { text: 'No\nbackup', size: '14', color: 0x99a4af, bgcolor: colors.dark, show_topbar: false }, + style: { text: 'No\nbackup', size: '14', color: 0x99a4af, bgcolor: colors.dark, show_topbar: true }, steps: [{ down: [], up: [] }], feedbacks: [{ feedbackId: 'redundancy', options: {} }], }, @@ -105,7 +105,7 @@ export function presets(label = 'MPC_DEV') { `ELAPSED\n$(${label}:elapsed)`, null, [{ feedbackId: 'progress_bar', options: {} }], - '14', + 12, ), transport_state: button( 'Playback state',