OK, so for those of you using the ah4c project with DirecTV or DTVStream, an app update started rolling out several weeks ago -- though my sticks only got it yesterday. Thanks to @gfhartzell for letting me know of its existence.
I've made some preliminary changes to scripts/firetv/directv/bmitune.sh to support the new app version. I'll push a container update soon, after I've done additional testing.
However, for anyone that wants in on the fun now -- there's only one function tuneChannel()
that appears to need modification, and here it is:
#Tuning is based on channel name values from $m3uName.
tuneChannel() {
channelName=$(awk -F, '/channel-id='"$channelID"'/ {print $2}' m3u/$m3uName)
channelName=$(echo $channelName | sed 's/^/"/;s/$/"/')
numberOfBackspaces=25
clearSearchBackspaces=$(for ((i=0; i<$numberOfBackspaces; i++)); do echo -n " KEYCODE_MEDIA_REWIND"; done)
directvMenu="input keyevent KEYCODE_MENU; sleep 6"
directvSearch="input keyevent KEYCODE_DPAD_LEFT; \
input keyevent KEYCODE_DPAD_UP; \
input keyevent KEYCODE_DPAD_CENTER; sleep 1; \
input keyevent KEYCODE_DPAD_CENTER; sleep 1"
directvClearSearch="input keyevent$clearSearchBackspaces"
directvTune="input keyevent KEYCODE_MEDIA_PLAY_PAUSE; sleep 1; \
input keyevent KEYCODE_DPAD_DOWN; \
input keyevent KEYCODE_DPAD_DOWN; \
input keyevent KEYCODE_DPAD_DOWN; \
input keyevent KEYCODE_DPAD_CENTER"
$adbTarget shell $directvMenu
$adbTarget shell $directvSearch
$adbTarget shell $directvClearSearch
$adbTarget shell input text "$channelName"
$adbTarget shell $directvTune
}
I'm only able to test with my DTV credentials, and we have seen some slight differences for those with DTVStream credentials in the past -- so if you try this out, be sure to give me feedback here, especially if you have DTVStream.
EDIT: Small change to the tuneChannel()
function to make clearing the search field more easily configurable. Hard coded moves replaced with a loop.