fix(media): gate spectrum pipeline on playback to cut idle CPU

Issue: #2393
This commit is contained in:
Lysec
2026-04-04 15:31:11 +02:00
parent 4b9a607151
commit a0093e509b
8 changed files with 25 additions and 19 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ NBox {
readonly property bool hasActivePlayer: MediaService.currentPlayer && MediaService.canPlay
// SpectrumService registration for visualizer
readonly property bool needsSpectrum: Settings.data.audio.visualizerType !== "" && Settings.data.audio.visualizerType !== "none"
readonly property bool needsSpectrum: Settings.data.audio.visualizerType !== "" && Settings.data.audio.visualizerType !== "none" && MediaService.isPlaying
onNeedsSpectrumChanged: {
if (root.needsSpectrum) {
@@ -138,7 +138,7 @@ NBox {
// Background visualizer on top of the artwork
Loader {
anchors.fill: parent
active: Settings.data.audio.visualizerType !== "" && Settings.data.audio.visualizerType !== "none"
active: root.needsSpectrum
sourceComponent: {
switch (Settings.data.audio.visualizerType) {