It's summer again (almost), more free time to muck about. I
have been trying to figure out how to get ah4c to have a unified m3u play list with different sources (YouTube tv, sling, Hulu, etc). Booted up my back up server and Managed to come with something but could do with some help to make it better. This is what I have working so far with some pay per view channels from YouTube tv and from the HBO max app combined into one m3u.
I am not using the docker version, to be clear.
Sample of "masterppv_contentid.txt" :
501 hbo a903ca8a-6d5e-559b-a027-f82997397694/452e5d78-1cca-59a9-8508-21b25d813874
502 hbo2 0326bb1d-35a8-5e10-a73e-52f75a74dce2/9aa33f8e-4e7e-53e6-843c-370732e42960
503 hbosig a4c770bb-eeab-5236-bad0-c4e3bdcfb67c/b7622186-b110-58be-922f-a42a2dafe29e
506 hbocom 300dbdc3-db0a-513c-8b25-2341eb00c469/0e95ada4-129a-5759-9d8a-d04ac349223b
509 hbozone 5c541620-277c-53fc-9197-763e16d93e4d/aca066fb-98bb-576b-b86a-3d4afed7fb8e
835 showmhd KAQmQyFLRes?onboard=1
836 shofmhd JZjBftgl8WY?onboard=1
837 sho2hd igHq_WgPO8A?utm?onboard=1
838 shonext WkNYP-Sa8qQ?onboard=1
842 stzhd -Y5vv28gO_I?onboard=1
843 stzedge 0aFRvqZJMw8?onboard=1
844 stzhdw Dpm6GnzDtdI?onboard=1
845 stzblk XT6u3OnJWgs?onboard=1
846 stzkds&fam O7ROqxJ8g5I?onboard=1
847 stzcomdedy qsx6OIn4b8M?onboard=1
848 stzcinema Rjr3Yp9kSWc?onboard=1
852 univkids Atjp6gLhvmo?onboard=1
Sample of "masterppv.m3u" :
#EXTM3U
#EXTINF:-1 channel-id="501" tvc-guide-stationid="" tvg-group="" tvg-logo="",HBO
http://{{ .IPADDRESS }}:7654/play/tuner/501
#EXTINF:-1 channel-id="502" tvc-guide-stationid="" tvg-group="" tvg-logo="",HBO2
http://{{ .IPADDRESS }}:7654/play/tuner/502
#EXTINF:-1 channel-id="503" tvc-guide-stationid="" tvg-group="" tvg-logo="",HBOSIG
http://{{ .IPADDRESS }}:7654/play/tuner/503
#EXTINF:-1 channel-id="506" tvc-guide-stationid="" tvg-group="" tvg-logo="",HBOCOM
http://{{ .IPADDRESS }}:7654/play/tuner/506
#EXTINF:-1 channel-id="509" tvc-guide-stationid="" tvg-group="" tvg-logo="",HBOZONE
http://{{ .IPADDRESS }}:7654/play/tuner/509
#EXTINF:-1 channel-id="206" tvc-guide-stationid="67237" tvg-group="" tvg-logo="",SZENHP
http://{{ .IPADDRESS }}:7654/play/tuner/206
#EXTINF:-1 channel-id="800" tvc-guide-stationid="36225" tvg-group="" tvg-logo="",STZENHD
http://{{ .IPADDRESS }}:7654/play/tuner/800
#EXTINF:-1 channel-id="801" tvc-guide-stationid="83404" tvg-group="" tvg-logo="",SZECLHD
http://{{ .IPADDRESS }}:7654/play/tuner/801
#EXTINF:-1 channel-id="830" tvc-guide-stationid="21868" tvg-group="" tvg-logo="",SHOHD
http://{{ .IPADDRESS }}:7654/play/tuner/830
#EXTINF:-1 channel-id="831" tvc-guide-stationid="22532" tvg-group="" tvg-logo="",SHOHDP
http://{{ .IPADDRESS }}:7654/play/tuner/831
#EXTINF:-1 channel-id="832" tvc-guide-stationid="68340" tvg-group="" tvg-logo="",SHOxBET
http://{{ .IPADDRESS }}:7654/play/tuner/832
#EXTINF:-1 channel-id="833" tvc-guide-stationid="60947" tvg-group="" tvg-logo="",SHOXHD
http://{{ .IPADDRESS }}:7654/play/tuner/833
#EXTINF:-1 channel-id="834" tvc-guide-stationid="61001" tvg-group="" tvg-logo="",SHOCSHD
http://{{ .IPADDRESS }}:7654/play/tuner/834
#EXTINF:-1 channel-id="835" tvc-guide-stationid="68338" tvg-group="" tvg-logo="",SHOWMHD
http://{{ .IPADDRESS }}:7654/play/tuner/835
"bmitune.sh" with edits to make it work with master list as it stands. :
#!/bin/bash
echo "$1" > /tmp/temp.txt
echo "$2" >> /tmp/temp.txt
echo "$3" >> /tmp/temp.txt
STATION="$1"
TUNERIP="$2"
CONTENT_FILE="contentid.txt"
CONTENT_ID=""
URL=""
PROVIDER=""
STATUS="notplaying"
ADBSTATUS=""
PID=""
RESULT=""
EXE=""
ISPKG=""
WHICH_PROVIDER=""
APP_NAME="com.google.android.apps.youtube.tvunplugged.activity.MainActivity"
APP_LAUNCH="com.google.android.youtube.tvunplugged"
content_file="masterppv_contentid.txt"
content_id=""
#Make Sure adb is up and connected
#sh /home/moisebuntu/Scripts/startadb.sh
if (( 500 <= $1 && $1 <= 509 ));then
echo "Yes"
else
echo "No"
fi
#Read content_id from file
if [ -f "$content_file" ]; then
content_id=$(grep -w "^$1" "$content_file" | cut -d " " -f3)
fi
#Check if content_id is empty
if [ -z "$content_id" ]; then
echo "Invalid option or content_id not found in $content_file"
exit 1
fi
if (( 500 <= $1 && $1 <= 509 ));then
adb -s $2 shell "am start -a android.intent.action.VIEW -d https://play.max.com/channel/watch/"$content_id""
adb -s $2 shell "input keyevent 22; input keyevent 66"
else
adb -s $TUNERIP shell "am start -a android.intent.action.VIEW -d https://tv.youtube.com/watch/"$content_id"" -n $APP_LAUNCH/$APP_NAME
fi
So if the channels is in the 500 range and thus HBO according to the guide data I am using then the script triggers the HBO Max app. If it is anything above that then it will trigger YouTube tv.
I was wondering though if it would be better to add a column for provider (youtubetv, sling, Hulu, hbomax etc) in the contentid.txt file and then have the script check the number selected when tuning against that data field and launching the relevant app based on this. A line from the contentid.txt would in that case look like this:
836 shofmhd youtubetv JZjBftgl8WY?onboard=1
And that third block would trigger the relevant app via the appropriate adb command.
Anyway, any help with making this better will be appreciated.