Skip to content

Commit

Permalink
Ensure that ac2 is started after the container
Browse files Browse the repository at this point in the history
  • Loading branch information
fff0x committed Aug 14, 2022
1 parent 9df66dd commit be8356e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions work-in-progress/audiocontrol2/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

AC_CONTROL_FILE="/opt/audiocontrol2/audiocontrol2.py"
DST_PLAYER_FILE=/opt/audiocontrol2/ac2/players/tidalcontrol.py
AC_UNIT_FILE="/etc/systemd/system/multi-user.target.wants/audiocontrol2.service"

rm -f "$DST_PLAYER_FILE"
ln -s "${PWD}/tidalcontrol.py" "$DST_PLAYER_FILE"
Expand All @@ -12,6 +13,9 @@ PLACEHOLDER="$(sed -nE 's/^(.*)mpris\.register_nonmpris_player\(SPOTIFYNAME,vlrc
sed -i "/mpris.register_nonmpris_player(SPOTIFYNAME,vlrctl)/a \\\n${PLACEHOLDER}# TidalControl\n${PLACEHOLDER}tdctl = \
TidalControl()\n${PLACEHOLDER}tdctl.start()\n${PLACEHOLDER}mpris.register_nonmpris_player(tdctl.playername,tdctl)" "$AC_CONTROL_FILE"

# Ensure that `audiocontrol2` is started after the TidalConnect container
sed -i 's/^After=.*$/After=sound.target dbus.service tidal.service/' "$AC_UNIT_FILE"
systemctl daemon-reload
systemctl restart audiocontrol2

echo "NOTE - THIS IS STILL WORK IN PROGRESS"

0 comments on commit be8356e

Please sign in to comment.