MediaPortal - DirecTV - SchedulesDirect
#1
I am having an issue with channel ordering in XBMC. I have the latest build, git rev. e7ba398, from Dushmaniac installed.

I have Mediaportal backend installed and working on my machine. I am capturing TV from my DirecTV cable box using PVR-150 and getting my channel listings using SchedulesDirect. I have the SchedulesDirect EPG Client v1.2 and TVServerXBMC v1.1.3.101 plugin installed in Mediaportal.

SchedulesDirect is populating Mediaportal with channels. I had to check "Allow EPG Channel Mapping by Channel Number Only" in SchedulesDirect plugin in order to get the correct channnel order in Mediaportal EPG.

The issue, I believe, is that Mediaportal or SchedulesDirect is setting an "SID", apparently this is used for satellite EPG's. When XBMC is pulling the EPG data from Mediaportal it is reading the "SID" as the channel number. I ran the standalone TVServerXBMC.exe from commandline and got the following ouput.

Code:
3177|0|235 Style|0
3112|0|236 E! Entertainment Television|0
3256|0|237 Bravo HD|0
3082|0|237 Bravo|0
3239|0|238 ReelzChannel|0
3229|0|239 101|0
3094|0|240 Home Shopping Network|0
3120|0|241 SPIKE TV|0
3267|0|241 Spike TV HD|0
3252|0|242 USA Network HD|0
3124|0|242 USA Network|0
3260|0|243 Direct TV DT243|0
3255|0|244 Syfy HD|0
3117|0|244 Syfy|0
3121|0|245 Turner Network TV|0
3311|0|246 truTV HD|0
Here is the XBMC log http://pastebin.com/PsSSSR5E

When compared the XBMC channels are in the exact SID order in Mediaportal. I am not sure if this is a known issue, or if there is a work around. Please let me know if there is anything I can do to correctly pull the channels or if this has to be corrected in the PVR addon code.

Update:
Here is some output from TVServerXBMC.exe when changing channels. This channel is listed in XBMC as "235 Style"
Code:
Socket read: TimeshiftChannel:3177|True|False
Handling command; TimeshiftChannel
Start timeshift for channel 3177 for user 'XBMCpvrclient2
Timeshift started for channel: '235 Style' on device 'Hauppauge WinTV PVR PCI II TvTuner'
TV Server returned 'rtsp://dublin:554/stream3.0' as timeshift URL and J:\Live TV\live3-0.ts.tsbuffer as timeshift file
Remote server='dublin'
StartTimeShifting took 3307 ms
Socket write: rtsp://192.168.15.111/stream3.0|rtsp://dublin/stream3.0|J:\Live TV\live3-0.ts.tsbuffer
Reply
#2
the add-on is probably not setting iChannelNumber in the PVR_CHANNEL struct properly. should be corrected in the add-on code.

there is also another issue that has to be corrected in the add-on: not every channel has a (valid) iUniqueId set.
opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
Reply
#3
I'm afraid that I don't understand your problem yet...
The TVServerXBMC plugin uses the TVServer channel Id and sends it to XBMC. The channel numbers used in XBMC are the first column from the TVServerXBMC output. If I remember correctly, they correspond with the database id field in the TVServer database and should be unique.
The channels are send to XBMC in the same order as returned by the TVServerXBMC output.
Dushmaniac changed the default channel sorting order since the (unofficial) Dharma-pvr releases, but you can still sort them inside XBMC.
As far as I know, I can't tell XBMC to use the same default sorting order as you have selected in the TVServer, because the Channel struct for PVR addons does not (yet) have a "sorting order" field like MePo has.

This first field (channel id) is also used to retrieve the EPG. In your case the 3xxx numbers. Channel numbers as given by the provider are not used at all, only the unique channel id, because in my case with two providers (DVB-C+DVB-T), I have 2 times a channel number 1 (one for each provider).

I've never seen those numbers (e.g. the 235) inside the channel name field. Do these numbers also appear in the channelnames in the TVServer and what to they mean?

@dushmaniac: I'm using the iUnique field already... Will send you a pull request with this change lateron. The version in your repo should also work because the channelnumber and uniqueid field are both the same there...
One question: what do you mean with "not every channel has a valid unique id"?
Developer of the MediaPortal PVR addon and retired developer of the Argus-TV PVR-addon.
http://www.scintilla.utwente.nl/~marcelg/xbmc
Reply
#4
Margro thanks for the explanation.

What I expected is for my channels to be ordered in numerical order according to provider channel number. The TVServer unique field basically randomizes the channel order and makes navigating the EPG annoying. I got the channels to be in order in MediaPortal (MePo?) EPG and hoped that they would be so in XBMC.

Code:
3177|0|235 Style
The "235" is the providers channel number. I think that SchedulesDirect (optionally) puts this in when it populated the channels and yes it does appear in the TVServer. I can upload screenshots of my MePo dialogs if you'd like.

I think there should be some way of ordering the channels in XBMC by channel number. I understand your explanation of having multiples of the same channel number, however that would not likely be an issue in the U.S. (I think).
Reply
#5
Ok, now I understand your problem. I will see whether I can sort the channel list in the addon (based on the sort order in the TV Server configuation) before sending the list to XBMC. In this way, you should at least get the same order as in MediaPortal. Furthermore, the next version of the addon will also request the channel number.
Developer of the MediaPortal PVR addon and retired developer of the Argus-TV PVR-addon.
http://www.scintilla.utwente.nl/~marcelg/xbmc
Reply
#6
iChannelNumber is used to order channels on xbmc's side.
margro Wrote:I'm using the iUnique field already... Will send you a pull request with this change lateron. The version in your repo should also work because the channelnumber and uniqueid field are both the same there...
I don't know if this is possible with mptv, but with tvheadend a channel id (iUniqueId) is not the same as the channel number (iChannelNumber). channel numbers also don't have to be unique. the iUniqueId has to be unique for each channel per iClientId.

Quote:One question: what do you mean with "not every channel has a valid unique id"?
these lines tell me that some channels don't have a (valid) id set:
Code:
08:19:30 T:5128 M:1088299008   ERROR: PVRDB - PVR::CPVRDatabase::Persist - invalid channel uid: 0
08:19:30 T:5128 M:1088299008   ERROR: CPVRChannelGroupInternal - PVR::CPVRChannelGroupInternal::Persist - failed to persist channel ''
I'll change the code a bit tomorrow so those channels will be filtered out. already fixed the empty channel name you're seeing here by setting a default one.
opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
Reply

Logout Mark Read Team Forum Stats Members Help
MediaPortal - DirecTV - SchedulesDirect0