Created
July 4, 2023 14:24
-
-
Save sullrich/f6bbbe98b931c0e7002d3cf4e84b59f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $(echo "$STATION" | grep "youtube__" | wc -l) -gt 0 ]; then | |
content_id=$(echo "$STATION" | awk -F '__' '{print $2}') | |
PROVIDER="YOUTUBE" | |
elif [ $(echo "$STATION" | grep "hulu__" | wc -l) -gt 0 ]; then | |
content_id=$(echo "$STATION" | awk -F '__' '{print $2}') | |
PROVIDER="HULU" | |
elif [ $(echo "$STATION" | grep "www" | wc -l) -gt 0 ]; then | |
content_id=$(echo "$STATION" | awk -F '__' '{print $2}') | |
PROVIDER="WWW" | |
elif [ $(echo "$STATION" | grep "weatherscan" | wc -l) -gt 0 ]; then | |
content_id="http://weatherscan.net" | |
PROVIDER="WEATHERSCAN" | |
elif [ $(echo "$STATION" | grep "tunein" | wc -l) -gt 0 ]; then | |
# Simply tune into device and do not run any apps | |
exit 0 | |
else | |
PROVIDER="HULU" | |
# Read content_id from file | |
if [ -f "$content_file" ]; then | |
content_id=$(grep -w "^$1" "$content_file" | cut -d " " -f 2) | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment