Experimental chromecasting support added. This likely needs more work.

This commit is contained in:
stormdragon2976 2023-02-11 20:35:42 -05:00
parent 9c8c253d03
commit 15539bd163

View File

@ -45,14 +45,25 @@ url="$(dialog --clear \
--extra-button \
--extra-label "Record and Listen" \
--ok-label "Listen" \
--cancel-label "Exit" \
--cancel-label "Cast" \
--help-button \
--help-label "Exit" \
--menu "Select a radio station" -1 -1 -1 "${menuList[@]}" --stdout)"
menuCode=$?
if [[ $menuCode -eq 1 ]]; then
if [[ $menuCode -eq 2 ]]; then
exit 0
fi
export url
if [[ ${menuCode} -eq 3 ]]; then
if [[ ${menuCode} -eq 1 ]]; then
trap - SIGINT SIGTERM EXIT
if ! command -v mkchromecast &> /dev/null ; then
echo "Please install mkchromecast to use this functionality."
fi
mkchromecast --encoder-backend ffmpeg --source-url "$url" --control
sleep 2
exit 0
elif [[ ${menuCode} -eq 3 ]]; then
if ! command -v streamripper &> /dev/null ; then
echo "Please install streamripper."
exit 1