aunetx / deezer-linux

An universal linux port of deezer, supporting Flatpak, Appimage, Snap, RPM, DEB...
https://flathub.org/apps/dev.aunetx.deezer
288 stars 14 forks source link

Prevent disabling the screensaver #60

Open vincentbernat opened 3 months ago

vincentbernat commented 3 months ago

Hey!

I've noticed the screensaver is disabled while playing. This is dangerous as it can prevent screen locking to work properly. I think this can be disabled by removing this piece of code (or making it conditional?):

    PlayerIpc_ipc.on(
      "channel-player-state-update",
      external_lodash_debounce_default()((event, state) => {
        media.setPlayerInfo({ state }),
          state === MediaPlayerState.Playing
            ? powerSave.start()
            : powerSave.stop();
      }, 3e3)
    ),
jackwalten commented 4 weeks ago

Quite obviously you do not want your computer to go to sleep when you are listening to music?