For those dealing with the Cox Spectrum merger, I ported over my PyATV scripts and M3Us yesterday to use the Spectrum Apple TV app instead of the Cox Contour app. They actually are a lot simpler using deep links, which the contour app did not support.
Thank you @ChannelSam for the scripts , but I put in some minor tweaks to make clearer
bmitune:
#!/bin/bash
# Channels DVR invocation contract: bmitune.sh <channelId> <atvHost>
# $1 = channelId (Gracenote/TMS station ID, from tvc-guide-stationid in M3U)
# $2 = atvHost (IP of the Apple TV assigned as this tuner)
channelId="$1"
atvHost="$2"
/usr/local/bin/atvremote --storage-filename /root/.android/.pyatv.conf \
-s "$atvHost" launch_app="spectrumTV://watch.spectrum.net/livetv/${channelId}"
I had to add force quit logic to the stopbmitune to accommodate multiple tuners and avoid streaming limit errors from spectrum.
stopbmitine:
#!/bin/bash
set -e
# Channels DVR invocation contract: stopbmitune.sh <atvHost> <channelId>
# $1 = atvHost (IP of the Apple TV assigned as this tuner)
# $2 = channelId (Gracenote/TMS station ID, from tvc-guide-stationid in M3U)
# NOTE: argument order is REVERSED from bmitune.sh - this is the Channels DVR
# pre/stop contract, not a bug. Do not "align" this with bmitune.sh's order.
atvHost="$1"
channelId="$2"
pyatvCredentials="/root/.android/.pyatv.conf"
ATV_CMD="/usr/local/bin/atvremote --storage-filename ${pyatvCredentials} -s ${atvHost}"
# Tunable delays - measure per-ATV, don't assume Cox's timing applies here.
FC_SHORT_DELAY=0.6
SWIPE_PASSES=3 # start smaller than Cox's 5; raise only if one pass isn't enough
echo "πΊ Force Quit Spectrum App on ${atvHost} (was tuned to ${channelId})"
echo "π Opening app switcher..."
eval "$ATV_CMD home home" >/dev/null 2>&1 || true
sleep "$FC_SHORT_DELAY"
# NOTE: no "left" press here - Spectrum should already be the frontmost,
# focused card since it's the most-recently-used app on this ATV. If testing
# shows the wrong app gets swiped, that's the signal to add navigation back.
i=1
while [ "$i" -le "$SWIPE_PASSES" ]; do
echo "π§Ή Swiping up to force-quit the app... (Pass $i)"
eval "$ATV_CMD up up" >/dev/null 2>&1 || true
sleep "$FC_SHORT_DELAY"
i=$((i + 1))
done
echo "π‘ Returning to Home Screen..."
eval "$ATV_CMD home" >/dev/null 2>&1 || true
sleep "$FC_SHORT_DELAY"
echo "β
Spectrum app force-quit, ATV in idle state"
Heres a sample M3U:
#EXTM3U
#EXTINF:-1 channel-id="56905" channel-number="3024" tvg-name="DSCHD" tvc-guide-stationid="56905",Discovery
http://{{ .IPADDRESS }}/play/tuner/56905
#EXTINF:-1 channel-id="59337" channel-number="3025" tvg-name="AMCHD" tvc-guide-stationid="59337",AMC
http://{{ .IPADDRESS }}/play/tuner/59337
#EXTINF:-1 channel-id="59186" channel-number="3026" tvg-name="PARHD" tvc-guide-stationid="59186",Paramount
http://{{ .IPADDRESS }}/play/tuner/59186
#EXTINF:-1 channel-id="58623" channel-number="3032" tvg-name="SYFYHD" tvc-guide-stationid="58623",SYFY
http://{{ .IPADDRESS }}/play/tuner/58623
#EXTINF:-1 channel-id="57708" channel-number="3041" tvg-name="HSTRYHD" tvc-guide-stationid="57708",History
http://{{ .IPADDRESS }}/play/tuner/57708
#EXTINF:-1 channel-id="49788" channel-number="3044" tvg-name="HGTVD" tvc-guide-stationid="49788",HGTV
http://{{ .IPADDRESS }}/play/tuner/49788
#EXTINF:-1 channel-id="60179" channel-number="3046" tvg-name="FNCHD" tvc-guide-stationid="60179",Fox_News
http://{{ .IPADDRESS }}/play/tuner/60179
#EXTINF:-1 channel-id="64241" channel-number="3047" tvg-name="MSNBC" tvc-guide-stationid="16300",MSNOW
http://{{ .IPADDRESS }}/play/tuner/64241
#EXTINF:-1 channel-id="58646" channel-number="3049" tvg-name="CNNHD" tvc-guide-stationid="58646",CNN
http://{{ .IPADDRESS }}/play/tuner/58646
#EXTINF:-1 channel-id="58812" channel-number="3051" tvg-name="WEATHHD" tvc-guide-stationid="58812",The_Weather_Channel
http://{{ .IPADDRESS }}/play/tuner/58812
#EXTINF:-1 channel-id="58574" channel-number="3053" tvg-name="FXHD" tvc-guide-stationid="58574",FX
http://{{ .IPADDRESS }}/play/tuner/58574
#EXTINF:-1 channel-id="62420" channel-number="3058" tvg-name="CCHD" tvc-guide-stationid="62420",Comedy_Central
http://{{ .IPADDRESS }}/play/tuner/62420
#EXTINF:-1 channel-id="68344" channel-number="3076" tvg-name="CSPANHD" tvc-guide-stationid="68344",C-SPAN
http://{{ .IPADDRESS }}/play/tuner/68344
#EXTINF:-1 channel-id="49438" channel-number="3083" tvg-name="NGCHD" tvc-guide-stationid="49438",National_Geographic
http://{{ .IPADDRESS }}/play/tuner/49438
#EXTINF:-1 channel-id="66268" channel-number="3090" tvg-name="HALLHD" tvc-guide-stationid="66268",HALLMARK
http://{{ .IPADDRESS }}/play/tuner/66268
#EXTINF:-1 channel-id="46710" channel-number="3091" tvg-name="HMMHD" tvc-guide-stationid="46710",Hallmark_Movies_Mysteries
http://{{ .IPADDRESS }}/play/tuner/46710
#EXTINF:-1 channel-id="57390" channel-number="3100" tvg-name="SCIHD" tvc-guide-stationid="57390",Science
http://{{ .IPADDRESS }}/play/tuner/57390
#EXTINF:-1 channel-id="64492" channel-number="3158" tvg-name="BBCAHD" tvc-guide-stationid="64492",BBC_America
http://{{ .IPADDRESS }}/play/tuner/64492
@bnhf just flagging you in case you want to add these tweaks for these scripts into the latest repo.
Im going to built a completely new container from scratch and test the appletv pairing and script deployment using fastchannels , etc within a day or two, Can we push these latest scripts into the repo? Then Ill test everything with a totally new host directory and keep my old "production" tuner suspended while I test all the new changes.