#!/bin/sh
streamList="
-audio: WXXI Classical (Rochester Classical Radio) link:https://22213.live.streamtheworld.com/WXXIFM.mp3
-audio: Fox Sports 1280 link:https://worldradiomap.com/us-ny/play/whtk_live
+WXXI Classical (Rochester Classical Radio) link:https://22213.live.streamtheworld.com/WXXIFM.mp3
+Classical WSMR (Tampa Classical Radio) https://worldradiomap.com/us-fl/play/wsmr_live
"
+
selected=$(echo "$streamList" | grep -P "^$(echo "$streamList" | grep "https:" | sed 's/link:.*//g' | dmenu -i -p "Select a Stream" -l 20 | awk '{print $1}')\s")
-case "$(echo "$selected" | cut -c 1-5 )" in
- video) echo "$selected" | sed 's/.*link://' | xargs -r mpv ;;
- audio) echo "$selected" | sed 's/.*link://' | xargs -r mpv --no-video --terminal=no ;;
-esac
+echo "$selected" | sed 's/.*link://' | xargs -r mpv --no-video --terminal=no