forked from buttstuf/soapdish
testing-stream_live_alsa bug fix
This commit is contained in:
parent
ff057d906d
commit
079112804e
|
@ -14,35 +14,35 @@ STREAMABLE_CONFIG_FILE_PATH="$CONFIG_DIRECTORY/config-$CURRENTLY_ACTIVE_CONFIG_N
|
||||||
|
|
||||||
|
|
||||||
# Check if config file exists
|
# Check if config file exists
|
||||||
if [[ -f "$CURRENTLY_ACTIVE_CONFIG_NAME" ]];
|
if [[ -f "$STREAMABLE_CONFIG_FILE_PATH" ]];
|
||||||
|
|
||||||
# If exists
|
# If exists
|
||||||
then
|
then
|
||||||
|
|
||||||
# Parse JSON config file for each crucial streaming variable
|
# Parse JSON config file for each crucial streaming variable
|
||||||
v1='testing_host'
|
v1='testing_host'
|
||||||
TESTING_HOST=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v1//p" $CURRENTLY_ACTIVE_CONFIG_NAME))
|
TESTING_HOST=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v1//p" $STREAMABLE_CONFIG_FILE_PATH))
|
||||||
v2='testing_port'
|
v2='testing_port'
|
||||||
TESTING_PORT=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v2//p" $CURRENTLY_ACTIVE_CONFIG_NAME))
|
TESTING_PORT=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v2//p" $STREAMABLE_CONFIG_FILE_PATH))
|
||||||
v3='testing_user'
|
v3='testing_user'
|
||||||
TESTING_USER=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v3//p" $CURRENTLY_ACTIVE_CONFIG_NAME))
|
TESTING_USER=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v3//p" $STREAMABLE_CONFIG_FILE_PATH))
|
||||||
v4='testing_password'
|
v4='testing_password'
|
||||||
TESTING_PASSWORD=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v4//p" $CURRENTLY_ACTIVE_CONFIG_NAME))
|
TESTING_PASSWORD=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v4//p" $STREAMABLE_CONFIG_FILE_PATH))
|
||||||
v5='testing_mount'
|
v5='testing_mount'
|
||||||
TESTING_MOUNT=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v5//p" $CURRENTLY_ACTIVE_CONFIG_NAME))
|
TESTING_MOUNT=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v5//p" $STREAMABLE_CONFIG_FILE_PATH))
|
||||||
v6='playlist_url'
|
v6='playlist_url'
|
||||||
PLAYLIST_URL=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v6//p" $CURRENTLY_ACTIVE_CONFIG_NAME))
|
PLAYLIST_URL=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v6//p" $STREAMABLE_CONFIG_FILE_PATH))
|
||||||
v7='randomize_playlist_files'
|
v7='randomize_playlist_files'
|
||||||
RANDOMIZE_PLAYLIST_FILES=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v7//p" $CURRENTLY_ACTIVE_CONFIG_NAME))
|
RANDOMIZE_PLAYLIST_FILES=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v7//p" $STREAMABLE_CONFIG_FILE_PATH))
|
||||||
v8='hardware_audio_frame_size'
|
v8='hardware_audio_frame_size'
|
||||||
HARDWARE_AUDIO_FRAME_SIZE=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v8//p" $CURRENTLY_ACTIVE_CONFIG_NAME))
|
HARDWARE_AUDIO_FRAME_SIZE=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v8//p" $STREAMABLE_CONFIG_FILE_PATH))
|
||||||
|
|
||||||
# Parse JSON config file for each metadata streaming variable
|
# Parse JSON config file for each metadata streaming variable
|
||||||
v9='testing_metadata_artist'
|
v9='testing_metadata_artist'
|
||||||
TESTING_METADATA_ARTIST=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v9//p" $CURRENTLY_ACTIVE_CONFIG_NAME))
|
TESTING_METADATA_ARTIST=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$v9//p" $STREAMABLE_CONFIG_FILE_PATH))
|
||||||
# TESTING_METADATA_ARTIST="${TESTING_METADATA_ARTIST// /\+}"
|
# TESTING_METADATA_ARTIST="${TESTING_METADATA_ARTIST// /\+}"
|
||||||
vA='testing_metadata_title'
|
vA='testing_metadata_title'
|
||||||
TESTING_METADATA_TITLE=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$vA//p" $CURRENTLY_ACTIVE_CONFIG_NAME))
|
TESTING_METADATA_TITLE=$(sed -e s/'[ \t]*\"\"\:\"'// -e s/'".*'// <<< $(sed -n "s/$vA//p" $STREAMABLE_CONFIG_FILE_PATH))
|
||||||
# TESTING_METADATA_TITLE="${TESTING_METADATA_TITLE// /\+}"
|
# TESTING_METADATA_TITLE="${TESTING_METADATA_TITLE// /\+}"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue