Jump to content


Photo

PR for EPGImport: fix possible double entries in channel list to import + add support for long description


  • Please log in to reply
5 replies to this topic

#1 Pr2

  • PLi® Contributor
  • 6,074 posts

+257
Excellent

Posted 10 April 2021 - 15:59

Hi,

 

I have created a new PR to improve EPGImport:

 

https://github.com/O...gimport/pull/50

 

If the same service reference is present several time during import for the same channel id it was added anyway. So we can have useless duplicate entries in the EPGImport that will just slow it down since the same data will be loaded twice.

 

This patch also add support for long description to each EPGImport parameters.

 

Be careful that skinners will need to enable it in there skins in order to display them so for screen name="EPGImportConfig" the widget name="description" should be added.

<screen name="EPGImportConfig" position="fill" title="EPG Import Configuration" flags="wfNoBorder">
...
         <widget name="description" position="30,570" size="720,300" itemHeight="38" font="Regular;30" valign="top"/>
.....
</screen>

Translators will also need to work on the newly generated .po files.

 

Pr2


Edited by Pr2, 10 April 2021 - 16:01.

NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: PR for EPGImport: fix possible double entries in channel list to import + add support for long description #2 Pr2

  • PLi® Contributor
  • 6,074 posts

+257
Excellent

Posted 10 April 2021 - 16:00

There is PR created for the OpenPLi default skins:

 

https://github.com/l...0eaa39ffe086a92


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: PR for EPGImport: fix possible double entries in channel list to import + add support for long description #3 littlesat

  • PLi® Core member
  • 56,272 posts

+691
Excellent

Posted 10 April 2021 - 17:14

Changes in skin merged

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: PR for EPGImport: fix possible double entries in channel list to import + add support for long description #4 Pr2

  • PLi® Contributor
  • 6,074 posts

+257
Excellent

Posted 10 April 2021 - 17:26

thanks for the skin merge.


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: PR for EPGImport: fix possible double entries in channel list to import + add support for long description #5 doglover

  • Rytec EPG Team
  • 17,013 posts

+639
Excellent

Posted 10 April 2021 - 17:44

I do not know what you are trying todo.

Some double entries are really needed:

 

f.i.

<!-- CH ESR --><!-- Cable --><channel id="CBeebies.uk">1:0:1:713:12:1:FFFF0273:0:0:0:</channel><!-- BBC 4 CBeebies -->
<!-- CH ESR --><!-- Cable --><channel id="BBC4.uk">1:0:1:713:12:1:FFFF0273:0:0:0:</channel><!-- BBC 4 CBeebies -->

Yes this a cable channel.

I have to grab the EPG from Cbeebies and BBC4 separately. 

Just import them to the same channel.


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: PR for EPGImport: fix possible double entries in channel list to import + add support for long description #6 Pr2

  • PLi® Contributor
  • 6,074 posts

+257
Excellent

Posted 10 April 2021 - 18:06

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.

NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users