manuelm / pvr.dvbviewer

Kodi's DVBViewer client addon
GNU General Public License v2.0
5 stars 3 forks source link

The missing channels from favourits.xml #7

Closed ricoris closed 9 years ago

ricoris commented 9 years ago

I found the pluing, is missing som channels from the favourits. I have traced the problem to all the missing channels have a long ID, and the "broadcast.iUniqueBroadcastId = entry.id; is only Uint". Look at the channel ID from my favourits.xml from dvbviewer. Channels found is "BBC World news" and "Dr3 HD", but not" Dr1 hd" and "DR2" - <?xml version="1.0" encoding="UTF-8"?>

1286413160|BBC World News
3316901333019792075|DR1 HD
3316901247107007066|DR2
1292767937|DR3 HD
.. Is it a bug?
ricoris commented 9 years ago

When I delete the "missing" channel from my favourits.xml and re-add it works, but the ID number is new. But I dont know why.

manuelm commented 9 years ago

You're mixing the channel ids used by Kodi with the channel ids of DVBViewer.

The fields are explained in https://github.com/manuelm/pvr.dvbviewer/blob/master/src/DvbData.h#L42: unsigned int id is the unique channel id passed to Kodi. It's a simple counter, value gets increased by each channel parsed from the full channel list. std::list<uint64_t> backendIds is the list of unique ids used by DVBViewer. Each channel can have multiple backend ids. usually one for each language.

re. your issue: The channel ids used by DVBViewer are generated using parameters of the channel itself. For example Service-ID, Audio-PID and orbital position (and a lot more) are parameters of the formula. If one of these parameters change, the channel id will change too. Since you've create your favourites list before the id change, the old channel id is still referenced and my PVR is unable to find a match. That's why removing and re-adding the same channel fixed the issue.

This is also explained with a single sentence in my FAQ: http://forum.kodi.tv/showthread.php?tid=221531:

Some channels are still missing and I'm using favourites only Most probably the channel id has been updated but the favourites are still referencing the old one. Remove the channel from your favourites and re-add it again.