From 079112804ea8bab847d1bcb3b7ce2bd47075240c Mon Sep 17 00:00:00 2001 From: buttstuf Date: Thu, 11 Mar 2021 01:06:53 -0800 Subject: [PATCH] testing-stream_live_alsa bug fix --- .../testing/testing-stream_live_alsa | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/streaming/testing/testing-stream_live_alsa b/scripts/streaming/testing/testing-stream_live_alsa index c7e38f2..bbd3ff2 100755 --- a/scripts/streaming/testing/testing-stream_live_alsa +++ b/scripts/streaming/testing/testing-stream_live_alsa @@ -14,35 +14,35 @@ STREAMABLE_CONFIG_FILE_PATH="$CONFIG_DIRECTORY/config-$CURRENTLY_ACTIVE_CONFIG_N # Check if config file exists -if [[ -f "$CURRENTLY_ACTIVE_CONFIG_NAME" ]]; +if [[ -f "$STREAMABLE_CONFIG_FILE_PATH" ]]; # If exists then # Parse JSON config file for each crucial streaming variable 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' - 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' - 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' - 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' - 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' - 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' - 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' - 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 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// /\+}" 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// /\+}"