BitHelp wrote:Red_F wrote:FTR does not use channel numbers 1, 2, 3, .... but it uses GUIDs to identify the channels 40c72627-cd02-4740-99b3-31fdc1101beb, 8e65855f-b8f4-49f0-966d-3c527a2adf5f, 94530956-a4cd-46ab-b3a3-67705e1734ac, ....
So the Add-on has no idea about numbers at all. What happens is that channels are assigned a number in the order they are received from FTR when it sends the 'All Channels' list.
Code: Select all
40c72627-cd02-4740-99b3-31fdc1101beb ==> 1
8e65855f-b8f4-49f0-966d-3c527a2adf5f ==> 2
94530956-a4cd-46ab-b3a3-67705e1734ac ==> 3
And that is the number that is used by XBMC. You can find a much more detailed explanation in the original development thread, where this was discussed in great detail.
You can use debug logging and view the xbmc.log to see just in what order your FTR sends the channels.
Hi Red_F and thanks for the quick respond. So how does your plugin assigns the GUIDs to numbers? Is it in the same order as they come in the All Channels list of the For The Record system? Also what happens to other list present in the For the Record that are transferred in the xbmc? Are they affected from the All Channel order?
Thanks
The FTR server sends channels that have a GUID. The channels are processed in the order that FTR sends them, and every GUID gets assigned a channel number. So the first channel sent to the add-on (no matter what it's GUID is) is assigned number 1, the next is number 2 and so forth.
That number is known as the unique channel id within XBMC. All the other program groups are using this same number.
So let's say you have an 'all channels' list with 160 channels in it. And you have a list 'my super favourites' with only two channels out of that 160. It may very well be that the channels of your 'my super favourites' list have channel number 23 and channel number 147.
Because of the channel identification mismatch between XBMC (numbers) and FTR (GUIDs) there is really no guarantee.
It gets even worse when you use the FTR 'Channel Administration' features of the FTR management console........
Should you decide to remove channel 56 and channel 89 (or whatever channels for that matter) from your 'all channels' list, or move channels up or down in your list, or add a new channel. Then the next time XBMC starts things will be completely messed up.
Your EPG contents are wrong, the displayed logo may be wrong, displayed timer information may be wrong (do not worry though, everything still is fine on the FTR server) etc. etc. This is all caused by the fact that the channels
after the ones you have deleted or added are assigned different channel numbers than the previous time. And these channel number are persisted in the internal XBMC PVR database.
We should thank the FTR server that it always reports the channels in identical order when no changes are made by us. Otherwise *every* start of XBMC would be a mess.
The way to correct this is to go the settings menu in XBMC, go to the Live-TV tab and select 'Reset PVR Database'. This will clean the internal XBMC database, re-retrieve the info from FTR and everything will be consistent and correct again.
It is ugly. It is messy. And to be honest I was very doubtful in the beginning that I could get channels and channel groups to work at all. So I'm not happy, but I am glad it works (most of the time
).
Cheers,
Fred
Growing old is inevitable. Growing up is optional!