forked from shawaj/ifi-tidal-release
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added instructions for audiocontrol2 and some cleanup
- Loading branch information
Showing
11 changed files
with
116 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
# start/stop script for running the Speaker Controller Application | ||
# This application enables controlling Tidal from the mobile device (Volume,Start/Stop,Next/Prev etc) | ||
|
||
function start() { | ||
# Stop if already running | ||
if pgrep -f ^/app/ifi-tidal-release/bin/speaker_controller_application >/dev/null 2>&1 | ||
then | ||
echo "Already running..." | ||
stop | ||
fi | ||
|
||
echo "Starting Speaker Controller Application..." | ||
docker exec -ti tidal_connect /usr/bin/tmux new-session -d -s speaker_controller_application '/app/ifi-tidal-release/bin/speaker_controller_application' | ||
} | ||
|
||
|
||
function stop() { | ||
echo "Stopping Speaker Controller Application..." | ||
docker exec -ti tidal_connect /usr/bin/tmux kill-session -t speaker_controller_application | ||
} | ||
|
||
|
||
case "$1" in | ||
start) start ;; | ||
stop) stop ;; | ||
restart) stop; start ;; | ||
*) echo "usage: $0 start|stop|restart" >&2 | ||
echo "" | ||
exit 1 | ||
;; | ||
esac | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
|
||
* Note! This modification is work-in-progress | ||
And requires manual editting of the HifiBerryOS files. | ||
If you are not comfortable with editting in Linux environment, wrongly modifying these files can lead to a non-working HifiBerryOS system. Therefore: ALWAYS make a backup of files that you are about to change. You do this modication at your own risk. | ||
|
||
* Installation | ||
|
||
1. You can either run the ./install.sh script or create the symbolic link manually. | ||
|
||
``` | ||
# create symbolic link to add TidalController to AudioControl2 daemon | ||
ln -s ${PWD}/tidalcontrol.py /opt/audiocontrol2/ac2/players/tidalcontrol.py | ||
``` | ||
2. go and edit the file and initialize the player | ||
``` | ||
nano /opt/audiocontrol2/audiocontrol2.py | ||
``` | ||
|
||
3. Look for the following section and import the TidalControl class | ||
``` | ||
from ac2.players.vollibrespot import VollibspotifyControl | ||
from ac2.players.vollibrespot import MYNAME as SPOTIFYNAME | ||
``` | ||
|
||
and add the following line so it looks like | ||
``` | ||
from ac2.players.vollibrespot import VollibspotifyControl | ||
from ac2.players.vollibrespot import MYNAME as SPOTIFYNAME | ||
from ac2.players.tidalcontrol import TidalControl | ||
``` | ||
|
||
4. Look for the following section and add code to add and initialize the TidalController | ||
``` | ||
# Vollibrespot | ||
vlrctl = VollibspotifyControl() | ||
vlrctl.start() | ||
mpris.register_nonmpris_player(SPOTIFYNAME,vlrctl) | ||
``` | ||
|
||
into | ||
``` | ||
# Vollibrespot | ||
vlrctl = VollibspotifyControl() | ||
vlrctl.start() | ||
mpris.register_nonmpris_player(SPOTIFYNAME,vlrctl) | ||
# TidalControl (ADD THIS PART) | ||
tdctl = TidalControl() | ||
tdctl.start() | ||
mpris.register_nonmpris_player(tdctl.playername,tdctl) | ||
``` | ||
|
||
5. Restart the AudioControl2 Daemon | ||
``` | ||
# Stop AudioControl2 Daemon | ||
systemctl stop audiocontrol2 | ||
# Start AudioControl2 Daemon | ||
systemctl start audiocontrol2 | ||
``` | ||
|
||
6. Done!!!... Now open your HifiBerryOS webpage and start a song... you should see track metadata in the player. (controls from WEBUI still needs to be implemted. Controls work via Phone.) | ||
|
||
* Audio Controll Api Reference | ||
https://github.com/hifiberry/audiocontrol2/blob/master/doc/api.md | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
echo "Stopping audiocontrol2" | ||
systemctl stop audiocontrol2 | ||
|
||
echo "Starting audiocontrol2" | ||
systemctl start audiocontrol2 | ||
|