Mapping PVR buttons
#1
Hi, I'm running Gotham with a MythTV backend and trying to map a couple of buttons on my remote.

Currently I have XBMC.ActivateWindowAndFocus(MyPVR, 34,0, 14,0) mapped to a recordings button. The problem with this is that it takes me to a screen that lists the following folders: "All Recordings", "Default" and "LiveTV". "Default" is the one that actually contains the recordings so I would much prefer to have the button mapped so that it takes me directly to that folder. I haven't seen any way of doing this.

Secondly, I have a "Live TV" button mapped to XBMC.ActivateWindowAndFocus(MyPVR, 32,0, 11,0) which takes me to the list of available channels with a summary of what is currently showing on each. I would prefer if the button could simply just start live TV playback, just like turning on a TV. It would presumably start whatever channel was last used. Once again, I haven't been able to work this one out.

Thanks
Reply
#2
I'm curious about your first point, I would like the same, but I haven't looked into it.

To play last channel you can use the xbmc built in function PlayPvrTv.
Reply
#3
Excellent! Thanks, I''l give it go.

The extra step to get to the recordings seems to have been introduced for Gotham, but I really don't like it. I much prefer to just jump straight to the recordings.
Reply
#4
You can probably look through the xbmc.log file after opening the recordings windows to see if it gives you the window id that's needed. Your post has jogged my memory and I'll look into this - its caught my missus out a few times ("why hasn't my show recorded...." )
Reply
#5
OK, the PlayPvrTV worked perfectly! Thank you!

So I did as you said and had a look at the log to see if I could would out window id's etc for the 'Default' recordings folder. To me, it seems that it uses the recordings window and just populates it with the contents of a directory. So initially you get the folders listed as above, then selecting the folder, you get the contents. These folders seem to be referred to as pvr://recordings and pvr://recordings/Default so I'm not sure how you would map that to a button? Here is the relevant part of the log file if that helps.

Thanks again.

Code:
18:24:46 T:1983438848   DEBUG: LIRC: Update - NEW at 48531:69 0 KEY_LEFT devinput (KEY_LEFT)
18:24:46 T:1983438848   DEBUG: OnKey: 169 (0xa9) pressed, action is Left
18:24:46 T:1983438848   DEBUG: LIRC: Update - NEW at 48992:69 0 KEY_LEFT_UP devinput (KEY_LEFT_UP)
18:24:47 T:1983438848   DEBUG: LIRC: Update - NEW at 49651:6a 0 KEY_RIGHT devinput (KEY_RIGHT)
18:24:47 T:1983438848   DEBUG: OnKey: 168 (0xa8) pressed, action is Right
18:24:47 T:1718613072   DEBUG: ### [Qlock] - Delaying 3 secs
18:24:47 T:1983438848   DEBUG: LIRC: Update - NEW at 49971:6a 0 KEY_RIGHT_UP devinput (KEY_RIGHT_UP)
18:24:47 T:1983438848    INFO: CheckIdle - Closing session to http://mirrors.superrepo.org (easy=0x49869e8, multi=0x4b852c8)
18:24:48 T:1358951504   DEBUG: Thread JobWorker 1358951504 terminating (autodelete)
18:24:49 T:1983438848   DEBUG: SECTION:UnloadDelayed(DLL: special://xbmcbin/system/ImageLib-arm.so)
18:24:49 T:1983438848   DEBUG: Unloading: ImageLib-arm.so
18:24:49 T:1983438848   DEBUG: LIRC: Update - NEW at 51671:160 0 KEY_OK devinput (KEY_OK)
18:24:49 T:1983438848   DEBUG: OnKey: 11 (0x0b) pressed, action is Select
18:24:49 T:1983438848   DEBUG: Activating window ID: 10601
18:24:49 T:1718613072   DEBUG: ### [Qlock] - Delaying 3 secs
18:24:49 T:1983438848   DEBUG: ------ Window Deinit (Home.xml) ------
18:24:49 T:1983438848   DEBUG: ------ Window Init (MyPVR.xml) ------
18:24:49 T:1983438848    INFO: Loading skin file: MyPVR.xml, load type: LOAD_EVERY_TIME
18:24:50 T:1983438848   DEBUG: CGUIMediaWindow::GetDirectory ()
18:24:50 T:1983438848   DEBUG:   ParentPath = []
18:24:50 T:1983438848   DEBUG: CGUIWindowPVRCommon - OnMessageFocus - focus set to window 'tv'
18:24:50 T:1983438848   DEBUG: CGUIWindowPVRChannels - UpdateData - update window 'tv'. set view to 11
18:24:50 T:1983438848   DEBUG: CGUIMediaWindow::GetDirectory (pvr://channels/tv/All TV channels/)
18:24:50 T:1983438848   DEBUG:   ParentPath = []
18:24:50 T:1385489488   DEBUG: CPVRDirectory::GetDirectory(pvr://channels/tv/All TV channels)
18:24:50 T:1983438848   DEBUG: CGUIWindowPVRCommon - OnMessageFocus - focus set to window 'tv'
18:24:50 T:1983438848   DEBUG: CGUIWindowPVRCommon - OnMessageFocus - focus set to window 'recordings'
18:24:50 T:1983438848   DEBUG: CGUIWindowPVRRecordings - UpdateData - update window 'recordings'. set view to 13
18:24:50 T:1983438848   DEBUG: CGUIMediaWindow::GetDirectory (pvr://recordings/)
18:24:50 T:1983438848   DEBUG:   ParentPath = []
18:24:50 T:1568666704   DEBUG: CPVRDirectory::GetDirectory(pvr://recordings)
18:24:51 T:1983438848   DEBUG: LIRC: Update - NEW at 53494:160 0 KEY_OK_UP devinput (KEY_OK_UP)
18:24:51 T:1568666704   DEBUG: DoWork - took 200 ms to load special://skin/backgrounds/livetv/tv_shows.jpg
18:24:51 T:1718613072   DEBUG: ### [Qlock] - Delaying 3 secs
18:24:52 T:1983438848   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/ImageLib-arm.so)
18:24:52 T:1983438848   DEBUG: Loading: /usr/lib/xbmc/system/ImageLib-arm.so
18:24:52 T:1983438848    INFO: CheckIdle - Closing session to http://feeds.openelec.tv (easy=0x6a26c1b8, multi=0x6a209760)
18:24:53 T:1983438848   DEBUG: LIRC: Update - NEW at 55351:6c 0 KEY_DOWN devinput (KEY_DOWN)
18:24:53 T:1983438848   DEBUG: OnKey: 167 (0xa7) pressed, action is Down
18:24:53 T:1718613072   DEBUG: ### [Qlock] - Delaying 3 secs
18:24:53 T:1983438848   DEBUG: LIRC: Update - NEW at 55811:6c 0 KEY_DOWN_UP devinput (KEY_DOWN_UP)
18:24:53 T:1983438848   DEBUG: LIRC: Update - NEW at 56031:6c 0 KEY_DOWN devinput (KEY_DOWN)
18:24:53 T:1983438848   DEBUG: OnKey: 167 (0xa7) pressed, action is Down
18:24:54 T:1983438848   DEBUG: LIRC: Update - NEW at 56431:6c 0 KEY_DOWN_UP devinput (KEY_DOWN_UP)
18:24:54 T:1983438848    INFO: CheckIdle - Closing session to http://feeds.xbmc.org (easy=0x6a2cfab0, multi=0x6a25bfa8)
18:24:54 T:1983438848   DEBUG: LIRC: Update - NEW at 57171:160 0 KEY_OK devinput (KEY_OK)
18:24:54 T:1983438848   DEBUG: OnKey: 11 (0x0b) pressed, action is Select
18:24:54 T:1983438848   DEBUG: CGUIMediaWindow::GetDirectory (pvr://recordings/Default/)
18:24:54 T:1983438848   DEBUG:   ParentPath = [pvr://recordings/]
18:24:54 T:1385489488   DEBUG: CPVRDirectory::GetDirectory(pvr://recordings/Default)
18:24:55 T:1983438848   DEBUG: LIRC: Update - NEW at 57631:160 0 KEY_OK_UP devinput (KEY_OK_UP)
18:24:55 T:1718613072   DEBUG: ### [Qlock] - Delaying 3 secs
18:24:59 T:1668281424   DEBUG: Previous line repeats 1 times.
18:24:59 T:1668281424   DEBUG: DoWork - took 197 ms to load special://skin/backgrounds/livetv/livetv.jpg
18:24:59 T:1718613072   DEBUG: ### [Qlock] - Delaying 3 secs
18:25:01 T:1718613072   DEBUG: ### [Qlock] - Delaying 240 secs
18:25:07 T:1568666704   DEBUG: DoWork - took 213 ms to load special://skin/backgrounds/livetv/tv_shows.jpg
18:25:14 T:1668281424   DEBUG: DoWork - took 183 ms to load special://skin/backgrounds/livetv/livetv.jpg
18:25:22 T:1983438848   DEBUG: SECTION:UnloadDelayed(DLL: special://xbmcbin/system/ImageLib-arm.so)
18:25:22 T:1983438848   DEBUG: Unloading: ImageLib-arm.so
18:25:22 T:1385489488   DEBUG: DoWork - took 212 ms to load special://skin/backgrounds/livetv/tv_shows.jpg
18:25:30 T:1568666704   DEBUG: DoWork - took 184 ms to load special://skin/backgrounds/livetv/livetv.jpg
18:25:38 T:1668281424   DEBUG: DoWork - took 213 ms to load special://skin/backgrounds/livetv/tv_shows.jpg
18:25:46 T:1385489488   DEBUG: DoWork - took 188 ms to load special://skin/backgrounds/livetv/livetv.jpg
18:25:54 T:1568666704   DEBUG: DoWork - took 210 ms to load special://skin/backgrounds/livetv/tv_shows.jpg
18:26:01 T:1668281424   DEBUG: DoWork - took 182 ms to load special://skin/backgrounds/livetv/livetv.jpg
18:26:09 T:1385489488   DEBUG: DoWork - took 210 ms to load special://skin/backgrounds/livetv/tv_shows.jpg
18:26:17 T:1668281424   DEBUG: DoWork - took 181 ms to load special://skin/backgrounds/livetv/livetv.jpg
18:26:25 T:1385489488   DEBUG: DoWork - took 209 ms to load special://skin/backgrounds/livetv/tv
Reply
#6
I don't think you can go into a specific folder like that. It's the MythTV addon that creates those folders, maybe there's a setting somewhere in the addon that controls this?
Reply
#7
Its possible, kinda - The following command will take you to default recordings only after having opened recordings, other wise it takes you to the PVR screen.

"ActivateWindow(PVR, pvr://recordings/Default)"

The following command works all the time, but displays the recordings in the movie library section, so recordings dont have the blurb of info

"ActivateWindow(Video, pvr://recordings/Default)"

You can string together some commands which works ok

xbmc-send --action="XBMC.ActivateWindowAndFocus(MyPVR, 34,0, 13,0)" && sleep 0.5 && xbmc-send --action="ActivateWindow(Pvr, pvr://recordings/Default)"
Reply
#8
(2014-06-13, 00:23)teeedubb Wrote: Its possible, kinda - The following command will take you to default recordings only after having opened recordings, other wise it takes you to the PVR screen.

"ActivateWindow(PVR, pvr://recordings/Default)"

Not ideal is it. So do we think this is a bug or is it designed that way? Perhaps its worth filing a bug report?

Thanks for the suggested work around, I'll try it out.
Reply
#9
With helix you can use the following to go straight to default recordins, has worked well for a while now:

ActivateWindow(TVRecordings,pvr://recordings/Default)
Reply

Logout Mark Read Team Forum Stats Members Help
Mapping PVR buttons0