2012-11-08, 20:36
I am dabbling with writing a Windows pvr addon for WMC. Things were going quite well until I got to a part that I thought would be easy, having the addon send xbmc info on the previously recorded files (in this case, wtv files). It comes down to strange behavior related to the two fields strStreamURl and strDirectory in the struct PVR_RECORDING.
So here is the setup. The recorded files sit on a network share, in my case its "//MediaServer/Recorded TV/".
The first thing I tried was setting the required strStreamURl to the full path name "//MediaServer/Recorded TV/foo.wtv" and set strDirectory to "//MediaServer/Recorded TV/". This works: the wtv files show up in the "Recordings" window and you can click on them and they play. The problem is when the file plays I get a popup that says "This Channel cannot be played. See log files for details". Weird since I am playing a file not a channel. Also info on the files (other data I passed in PVR_RECORDING) stops being displayed in the recordings screen after I play a file.
So then I tired leaving the strDirectory field blank, since I really didn't now what purpose this serves and supposedly its"optional". With this change I get very different behavior. The recordings screen looks perfect all the metadata is visible and the recordings play with no popups. The problems is it takes a LONG time for xbmc to display the "recordings" screen. It takes like 15 sec to load, showing a "Working..." popup in the corner of the screen. Whatever it is working on, it doesn't seem to cache because every time I re-display the page I get the same long load time.
If anyone can shed light on this behavior that would be great. Or at least give me more info on how these fields are supposed to be used?
thanks.
So here is the setup. The recorded files sit on a network share, in my case its "//MediaServer/Recorded TV/".
The first thing I tried was setting the required strStreamURl to the full path name "//MediaServer/Recorded TV/foo.wtv" and set strDirectory to "//MediaServer/Recorded TV/". This works: the wtv files show up in the "Recordings" window and you can click on them and they play. The problem is when the file plays I get a popup that says "This Channel cannot be played. See log files for details". Weird since I am playing a file not a channel. Also info on the files (other data I passed in PVR_RECORDING) stops being displayed in the recordings screen after I play a file.
So then I tired leaving the strDirectory field blank, since I really didn't now what purpose this serves and supposedly its"optional". With this change I get very different behavior. The recordings screen looks perfect all the metadata is visible and the recordings play with no popups. The problems is it takes a LONG time for xbmc to display the "recordings" screen. It takes like 15 sec to load, showing a "Working..." popup in the corner of the screen. Whatever it is working on, it doesn't seem to cache because every time I re-display the page I get the same long load time.
If anyone can shed light on this behavior that would be great. Or at least give me more info on how these fields are supposed to be used?
thanks.