Commit 7e75b1b5 authored by Ronald van Engelen's avatar Ronald van Engelen

fixed last sound card in json output

parent ab59f6f1
...@@ -295,11 +295,11 @@ function print_json_output() { ...@@ -295,11 +295,11 @@ function print_json_output() {
## called by fetch_alsa_outputinterfaces. ## called by fetch_alsa_outputinterfaces.
json_cards="$1" json_cards="$1"
json='{ json='{
"alsa_outputdevices": [ "alsa_outputdevices": [
%s %s
] ]
}' }'
printf "${json}\n" "${json_cards}" printf "${json}\n" "${json_cards%,*}"
} }
...@@ -647,10 +647,6 @@ ${MSG_ERROR_UNEXPECTED}" ...@@ -647,10 +647,6 @@ ${MSG_ERROR_UNEXPECTED}"
printf -v json_output "%s%s\n" \ printf -v json_output "%s%s\n" \
"${json_output}" \ "${json_output}" \
"$(ret_json_card "${formats_res[@]}" "")" "$(ret_json_card "${formats_res[@]}" "")"
else
printf -v json_output "%s%s\n" \
"${json_output}" \
"$(ret_json_card "${formats_res[@]}" "last")"
fi fi
fi fi
done done
......
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