Let me better explain in memory the keyword used is the "channel id", when parsing all the channels.xml for every "channel id" the service references are added in a list.
If you use the rytec source you will find a "channel id" with a service reference, it is possible that in your custom.channels.xml you exactely define the same reference.
So today for the same given "channel id", all the reference is always are added in the list and this can lead to duplicate entries, the patch simply make it unique by turning the list into a dictionnary (a dictionnary is a list where every entries are unique) back into a list.
The full service reference is stored meaning that if you add an IPTV channel the service reference will include the service reference + the URI.
So making it unique is just an improvement to avoid to load several times exactly the same data into memory for the given "channel id":"service reference" couple.
Your exemple is not concerned by this patch because the channel id are different so of course the channel id / reference couple are of course different so they will be both added without any problem into the full "channel id"+"reference" list.
So if here is a theorical exemple to show up what this patch is doing:
If by loading all the *.channels.xml:
<!-- CH ESR --><!-- Cable --><channel id="CBeebies.uk">1:0:1:713:12:1:FFFF0273:0:0:0:</channel>
<!-- CH ESR --><!-- Cable --><channel id="CBeebies.uk">1:0:1:713:12:1:FFFF0273:0:0:0:</channel>
<!-- CH ESR --><!-- Cable --><channel id="CBeebies.uk">1:0:1:713:12:1:FFFF0273:0:0:0:http://mydummy.site/ABCDEFG.mp3</channel>
This will lead to have into memory:
"CBeebies.uk"="1:0:1:713:12:1:FFFF0273:0:0:0","1:0:1:713:12:1:FFFF0273:0:0:0","1:0:1:713:12:1:FFFF0273:0:0:0:http://mydummy.site/ABCDEFG.mp3"
This is a non sense since then it will load twice exactely the same reference.
So this patch turn:
"CBeebies.uk"="1:0:1:713:12:1:FFFF0273:0:0:0","1:0:1:713:12:1:FFFF0273:0:0:0","1:0:1:713:12:1:FFFF0273:0:0:0:http://mydummy.site/ABCDEFG.mp3"
into:
"CBeebies.uk"="1:0:1:713:12:1:FFFF0273:0:0:0","1:0:1:713:12:1:FFFF0273:0:0:0:http://mydummy.site/ABCDEFG.mp3"
So during the data loading process we will load only once the data for the service reference: "1:0:1:713:12:1:FFFF0273:0:0:0" while before it was loaded twice.
The trick is very simple turn a list with multiple entries into dictionnary a dictionnary can only have once the same entry back into a list.
So the end result is a unique list of service references.
Edited by Pr2, 10 April 2021 - 18:12.