Req Different Visualisation Windows for Music and PVR Radio
#1
I'm in the process of mapping a remote and I don't find the use of the same window for both Music and PVR Radio quite logical as keymap is different.

For Music:
"C", "Context Menu" = ActivateWindow(MusicPlaylist)
"Up", "Ch+/PgUp" = IncreaseRating
"Down", "Ch-/PgDown" = DecreaseRating

For PVR Radio:
"C", "Context Menu" = ActivateWindow(PVROSDChannels)
"Up", "Ch+/PgUp" = Channel Up
"Down", "Ch-/PgDown" =Channel Down

[My personal preference is to set for FullscreenLiveTV:
"Up"= Channel Up
"Down" =Channel Down
"Ch+/PgUp", "Ch-/PgDown" = ActivateWindow(PVROSDChannels)
and use a script on PVROSDChannels for sending 2 keys for the Select button: Select and Close]
Reply
#2
No response yet ?

Here's my solution:

keyboard.xml
Code:
<Visualisation>
  <keyboard>
    <c>RunScript(special://userdata/py_ispvr.py,"ActivateWindow(PVROSDChannels)","ActivateWindow(MusicPlaylist)")</c>
    <up_btn>RunScript(special://userdata/py_ispvr.py,"ActivateWindow(PVROSDChannels)","Action(IncreaseRating)")</up_btn>
    <down_btn>RunScript(special://userdata/py_ispvr.py,"ActivateWindow(PVROSDChannels)","Action(DecreaseRating)")</down_btn>
  </keyboard>
</Visualisation>

py_ispvr.py
Code:
import xbmc
import sys

action_livetv = sys.argv[1]
action_video = sys.argv[2]

if xbmc.getCondVisibility("Pvr.IsPlayingTv") or xbmc.getCondVisibility("Pvr.IsPlayingRadio"):
  action = action_livetv
else:
  action = action_video
  
xbmc.executebuiltin(action)
Reply

Logout Mark Read Team Forum Stats Members Help
Different Visualisation Windows for Music and PVR Radio0