Commit 1a47b2fa authored by david's avatar david

Consolidation of fallback playlist and folder. #66

parent b9ed1292
......@@ -24,6 +24,8 @@ RUN whoami
RUN mkdir -p /srv
RUN mkdir -p /var/audio
RUN mkdir -p /var/audio/source
RUN mkdir -p /var/audio/station
RUN mkdir -p /var/audio/playlist
COPY . /srv
WORKDIR /srv
RUN pip3 install -r requirements.txt
......
......@@ -132,9 +132,9 @@ daemonuser="engineuser"
socketdir="/home/username/code/aura/engine/src/liquidsoap"
[audiosources]
audio_source_folder="var/audio/source"
audio_source_folder="/var/audio/source"
audio_source_extension=".flac"
audio_playlist_folder="var/audio/playlist"
audio_playlist_folder="/var/audio/playlist"
[fallback]
# track_sensitive => fallback_folder track sensitivity
......@@ -144,8 +144,8 @@ audio_playlist_folder="var/audio/playlist"
fallback_max_blank="20."
fallback_min_noise="0."
fallback_threshold="-80."
# A playlist holding music for Station Fallbacks (optonal)
fallback_music_playlist= "/home/username/code/aura/config/playlists/station-fallback-playlist.m3u"
# A playlist holding music for Station Fallbacks (optional)
fallback_music_playlist= "station-fallback-playlist.m3u"
# A folder holding music for Station Fallbacks (optional)
fallback_music_folder="/var/audio/station"
# The time in seconds how often the folder should be re-scanned
......
......@@ -131,9 +131,9 @@ daemonuser="engineuser"
socketdir="/srv/src/liquidsoap"
[audiosources]
audio_source_folder="var/audio/source"
audio_source_folder="/var/audio/source"
audio_source_extension=".flac"
audio_playlist_folder="var/audio/playlist"
audio_playlist_folder="/var/audio/playlist"
[fallback]
# track_sensitive => fallback_folder track sensitivity
......@@ -143,8 +143,8 @@ audio_playlist_folder="var/audio/playlist"
fallback_max_blank="20."
fallback_min_noise="0."
fallback_threshold="-80."
# A playlist holding music for Station Fallbacks (optonal)
fallback_music_playlist= "/opt/aura/engine/config/playlists/station-fallback-playlist.m3u"
# A playlist holding music for Station Fallbacks (optional)
fallback_music_playlist= "station-fallback-playlist.m3u"
# A folder holding music for Station Fallbacks (optional)
fallback_music_folder="/var/audio/station"
# The time in seconds how often the folder should be re-scanned
......
......@@ -131,9 +131,9 @@ daemonuser="engineuser"
socketdir="/opt/aura/engine/src/liquidsoap"
[audiosources]
audio_source_folder="var/audio/source"
audio_source_folder="/var/audio/source"
audio_source_extension=".flac"
audio_playlist_folder="var/audio/playlist"
audio_playlist_folder="/var/audio/playlist"
[fallback]
# track_sensitive => fallback_folder track sensitivity
......@@ -143,8 +143,8 @@ audio_playlist_folder="var/audio/playlist"
fallback_max_blank="20."
fallback_min_noise="0."
fallback_threshold="-80."
# A playlist holding music for Station Fallbacks (optonal)
fallback_music_playlist= "/opt/aura/engine/config/playlists/station-fallback-playlist.m3u"
# A playlist holding music for Station Fallbacks (optional)
fallback_music_playlist= "station-fallback-playlist.m3u"
# A folder holding music for Station Fallbacks (optional)
fallback_music_folder="/var/audio/station"
# The time in seconds how often the folder should be re-scanned
......
......@@ -170,12 +170,13 @@ Ensure that the Liquidsoap installation path is valid:
liquidsoap_path="/home/david/.opam/4.08.0/bin/liquidsoap"
```
Finally Engine needs to be able to access the audio folder, where all the tracks of the playlists
are stored via *Tank*:
Finally Engine needs to be able to access the audio and playlist folders, where all the tracks of the playlists are stored via *Tank*:
```ini
[audiosource]
audio_source_folder="/var/audio"
audio_source_folder="/var/audio/source"
audio_source_extension=".flac"
audio_playlist_folder="/var/audio/playlist"
```
If the audio device desired for playback is set as `default`, the Engine now should be ready to play
......
......@@ -198,12 +198,13 @@ liquidsoap_path="/home/engineuser/.opam/4.08.0/bin/liquidsoap"
**Configuring the Audio Store**
Finally Engine needs to be able to access the audio folder, where all the tracks of the playlists
are stored via *Tank*:
Finally Engine needs to be able to access the audio and playlist folders, where all the tracks of the playlists are stored via *Tank*:
```ini
[audiosource]
audio_source_folder="/var/audio/source"
audio_source_extension=".flac"
audio_playlist_folder="/var/audio/playlist"
```
There is some document on how to [Setup the Audio Store](docs/setup-audio-store.md).
......
......@@ -120,7 +120,7 @@ user_allow_other
Now create the mount:
```shell
sudo sshfs -o allow_other -o IdentityFile=~/.ssh/id_rsa tankuser@192.168.0.111:/var/audio /opt/aura/audio-store -p22
sudo sshfs -o allow_other -o IdentityFile=~/.ssh/id_rsa tankuser@192.168.0.111:/var/audio/source /opt/aura/audio-store -p22
```
Replace `192.168.0.111` with the actual IP for your Engine and `-p22` with the actual port number your Engine's SSH service
......@@ -131,7 +131,7 @@ in the `/etc/fstab` file by adding this at the end:
```yaml
# Audio Store @ AURA Engine
sshfs#tankuser@192.168.0.111:/var/audio /opt/aura/audio-store fuse auto,port=22,identityfile=~/.ssh/id_rsa,allow_other,_netdev 0 0
sshfs#tankuser@192.168.0.111:/var/audio/source /opt/aura/audio-store fuse auto,port=22,identityfile=~/.ssh/id_rsa,allow_other,_netdev 0 0
```
......
......@@ -99,6 +99,8 @@ if [[ $docker == "true" ]]; then
-u $UID:$GID \
-v "$BASE_D":/srv \
-v "$BASE_D/audio/source":/var/audio/source:ro \
-v "$BASE_D/audio/station":/var/audio/station:ro \
-v "$BASE_D/audio/playlist":/var/audio/playlist:ro \
-v "$BASE_D/config/docker":/etc/aura \
-v "/dev/snd":/dev/snd \
--privileged \
......
......@@ -66,9 +66,15 @@ a4_out = list.assoc(default="", "output_device_4", ini)
input_stream_buffer = float_of_string(list.assoc(default="3.0", "input_stream_buffer", ini))
# AUDIO AND PLAYLIST SOURCES
audio_playlist_folder = "#{engine_config_folder}/playlists"
audio_playlist_folder = list.assoc(default=audio_playlist_folder, "audio_playlist_folder", ini)
# FALLBACK SETTINGS
fallback_station_playlist_path = "#{engine_config_folder}/playlists/station-fallback-playlist.m3u"
fallback_station_playlist_path = list.assoc(default=fallback_station_playlist_path, "fallback_music_playlist", ini)
fallback_station_playlist_name = "station-fallback-playlist.m3u"
fallback_station_playlist_name = list.assoc(default=fallback_station_playlist_name, "fallback_music_playlist", ini)
fallback_station_playlist_path = "#{audio_playlist_folder}/#{fallback_station_playlist_name}"
fallback_station_dir = list.assoc(default="/var/audio/station", "fallback_music_folder", ini)
fallback_station_dir_reload = int_of_string(list.assoc(default="300", "fallback_music_folder_reload", ini))
fallback_max_blank = float_of_string(list.assoc(default="", "fallback_max_blank", ini))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment