Compare commits

...

2 commits

Author SHA1 Message Date
j
4e04bec8ad add systemd service. 2023-11-08 23:31:06 +01:00
j
a33f94d5af retry 2023-11-08 23:04:17 +01:00
4 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,11 @@
[Unit]
Description=player
[Service]
Type=simple
Restart=always
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

View file

@ -0,0 +1,11 @@
[Unit]
Description=player
[Service]
Type=simple
Restart=always
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

View file

@ -158,6 +158,7 @@ class Sync(Thread):
data = self.sock.recvfrom(1024)[0].decode().split(" ", 1)
except socket.timeout:
logger.error("failed to receive data from main")
return self.read_position_main()
else:
self.main.time_pos = float(data[0])
self.main.playlist_current_pos = int(data[1])

11
player/saxophone.service Normal file
View file

@ -0,0 +1,11 @@
[Unit]
Description=saxophone loop
[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/mpv --quiet --loop /srv/t_for_time/render/Saxophone-5.1.mp4
KillSignal=SIGINT
[Install]
WantedBy=default.target