diff --git a/player/player-back.service b/player/player-back.service index 1ae4193..30cbe5f 100644 --- a/player/player-back.service +++ b/player/player-back.service @@ -8,4 +8,4 @@ KillSignal=SIGINT ExecStart=/srv/pandora/t_for_time/player/player.py --mode peer --playlist /srv/t_for_time/render/back.m3u [Install] -WantedBy=default.target +WantedBy=graphical-session.target diff --git a/player/player-front.service b/player/player-front.service index 6090352..856a32b 100644 --- a/player/player-front.service +++ b/player/player-front.service @@ -8,4 +8,4 @@ KillSignal=SIGINT ExecStart=/srv/pandora/t_for_time/player/player.py --mode main --playlist /srv/t_for_time/render/front.m3u [Install] -WantedBy=default.target +WantedBy=graphical-session.target diff --git a/player/player.py b/player/player.py index 89395d3..a408a54 100755 --- a/player/player.py +++ b/player/player.py @@ -80,7 +80,8 @@ class Sync(Thread): if self._tick and abs(time.time() - self._tick) > 60: logger.error("player is stuck") self._tick = 0 - self.quit() + self.stop() + self.mpv.stop() def q_binding(self, *args): self.stop() diff --git a/player/saxophone.service b/player/saxophone.service index dc6ce7a..2b9d2f0 100644 --- a/player/saxophone.service +++ b/player/saxophone.service @@ -8,4 +8,4 @@ ExecStart=/usr/bin/mpv --quiet --loop /srv/t_for_time/render/Saxophone-5.1.mp4 KillSignal=SIGINT [Install] -WantedBy=default.target +WantedBy=graphical-session.target