Jump to content


Photo

Only import EPG for channels in Bouquets - change requested


  • Please log in to reply
164 replies to this topic

Re: Only import EPG for channels in Bouquets - change requested #61 doglover

  • Rytec EPG Team
  • 17,396 posts

+658
Excellent

Posted 20 June 2019 - 15:41

plugin.py from #58 compiles now.

And runs.

But I cannot see much of a difference with the previous version.

Box remains responsive.

I cannot say it goes faster or slower.  If there is a difference it would be minimal.

 

Now next version.....

 

Willy


~~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: Only import EPG for channels in Bouquets - change requested #62 littlesat

  • PLi® Core member
  • 57,182 posts

+699
Excellent

Posted 20 June 2019 - 15:42

Version 60 is the same as 58... you can skip it...

59 has a simplified and most likely faster all services grabber... (thanks to Gutemine - When I need to say thanks I say thanks)


Edited by littlesat, 20 June 2019 - 15:44.

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


Re: Only import EPG for channels in Bouquets - change requested #63 doglover

  • Rytec EPG Team
  • 17,396 posts

+658
Excellent

Posted 20 June 2019 - 15:55

Testing version #60 now.

One question.  Can you point me to how I construct an ignore list.  Never used this option.  (was not even aware that is was possible)

Did not test it it so far.

 

But, it looks like I should test #59 as well.

 

Willy


~~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: Only import EPG for channels in Bouquets - change requested #64 littlesat

  • PLi® Core member
  • 57,182 posts

+699
Excellent

Posted 20 June 2019 - 16:02

Please skip 60.. try 59


Edited by littlesat, 20 June 2019 - 16:02.

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


Re: Only import EPG for channels in Bouquets - change requested #65 doglover

  • Rytec EPG Team
  • 17,396 posts

+658
Excellent

Posted 20 June 2019 - 16:08

#59 not good:

 

It says now for 6 minutes : 

Filtering:0 

Please wait

 

The log says this:

/custom.channels.xml Error: global name 'eServiceReference' is not defined
[XMLTVConverter] Enumerating event information
[EPGImport] ### thread is ready ### Events: 0
[EPGImport] nextImport, source= Vlaanderen - Basis
[EPGImport] afterDownload /home/Fritz/epg/rytecBE_VL_Basic.xz
[EPGImport] afterChannelDownload None
[EPGImport] Using twisted thread
[EPGImport] Parsing channels from '/etc/epgimport/custom.channels.xml'
[EPGImport] Parsing channels from '/home/Fritz/epg/rytec.channels.xml.xz'
[EPGImport] failed to parse /etc/epgimport/custom.channels.xml Error: global name 'eServiceReference' is not defined
[XMLTVConverter] Enumerating event information
[EPGImport] ### thread is ready ### Events: 0
[EPGImport] nextImport, source= Vlaanderen/Nederland - Gemeenschappelijk
[EPGImport] afterDownload /home/Fritz/epg/rytecBE_NL_Common.xz
[EPGImport] afterChannelDownload None
[EPGImport] Using twisted thread
[EPGImport] Parsing channels from '/etc/epgimport/custom.channels.xml'
[EPGImport] Parsing channels from '/home/Fritz/epg/rytec.channels.xml.xz'
[EPGImport] failed to parse /etc/epgimport/custom.channels.xml Error: global name 'eServiceReference' is not defined

It seems to have problem with my the custom.channels.xml file

<?xml version="1.0" encoding="utf-8"?>
<channels>
<!-- AFN --><channel id="AFNAtlantic.us">4097:0:1:1:1:1:0:0:0:0:http%3a//example.com</channel><!-- AFN Atlantic -->
<!-- AFN --><channel id="AFNFamily.us">4097:0:1:2:1:1:0:0:0:0:http%3a//example.com</channel><!-- AFN Family -->
<!-- AFN --><channel id="AFNMovie.us">4097:0:1:3:1:1:0:0:0:0:http%3a//example.com</channel><!-- AFN Movie -->
<!-- AFN --><channel id="AFNNews.us">4097:0:1:4:1:1:0:0:0:0:http%3a//example.com</channel><!-- AFN News -->
<!-- AFN --><channel id="AFNPacific.us">4097:0:1:5:1:1:0:0:0:0:http%3a//example.com</channel><!-- AFN Pacific -->
<!-- AFN --><channel id="AFNSpectrum.us">4097:0:1:6:1:1:0:0:0:0:http%3a//example.com</channel><!-- AFN Spectrum -->
<!-- AFN --><channel id="AFNSport.us">4097:0:1:7:1:1:0:0:0:0:http%3a//example.com</channel><!-- AFN Sport -->
<!-- AFN --><channel id="AFNSport2.us">4097:0:1:8:1:1:0:0:0:0:http%3a//example.com</channel><!-- AFN Sport 2 -->

Willy


~~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: Only import EPG for channels in Bouquets - change requested #66 littlesat

  • PLi® Core member
  • 57,182 posts

+699
Excellent

Posted 20 June 2019 - 16:43

:)

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


Re: Only import EPG for channels in Bouquets - change requested #67 littlesat

  • PLi® Core member
  • 57,182 posts

+699
Excellent

Posted 20 June 2019 - 16:45

Sounds for 59 we need to import eServiceReference op top of plugin.py add it to the ‘from enigma2 import ...’ line then 59 should do more...

Edited by littlesat, 20 June 2019 - 16:45.

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


Re: Only import EPG for channels in Bouquets - change requested #68 doglover

  • Rytec EPG Team
  • 17,396 posts

+658
Excellent

Posted 20 June 2019 - 16:47

...?

This I do not understand.

 

Willy

 

PS:  testing done for today.  Will continue tomorrow, if something new appears.


~~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: Only import EPG for channels in Bouquets - change requested #69 littlesat

  • PLi® Core member
  • 57,182 posts

+699
Excellent

Posted 20 June 2019 - 16:49

I cannot change code anymore... just add the eServiceReference at the line somewhere on top of plugin.py at the line that starts from enigma import

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


Re: Only import EPG for channels in Bouquets - change requested #70 littlesat

  • PLi® Core member
  • 57,182 posts

+699
Excellent

Posted 20 June 2019 - 17:09

Fix voor 59 toch ff kunnen doen

Attached Files


Edited by littlesat, 20 June 2019 - 17:09.

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


Re: Only import EPG for channels in Bouquets - change requested #71 doglover

  • Rytec EPG Team
  • 17,396 posts

+658
Excellent

Posted 21 June 2019 - 07:21

#70:

 

[EPGImport] ### thread is ready ### Events: 149587
[EPGImport] imported 149587 events

And the import takes forever.  Very slow.

Also skipped all my IPTV channels with fake Service refs.  Borrowed service refs are OK

 

 

back to #60:

 

[EPGImport] ### thread is ready ### Events: 26205
[EPGImport] imported 26205 events

And EPG for my IPTV channels.  Also with fake service refs.

Import took a fraction of the time it took for version 70 to finish

 

Conclusion: 

Version 70 is not good.

Prefer version #60

 

Willy

 

PS: All the IPTV channels I have are legal ones, which are freely to be found on the net.

Channels like

#SERVICE 5002:0:1:2:0:32:0:0:0:0:http%3a//player-api.new.livestream.com/accounts/27755193/events/8452381/live.secure.m3u8:atv
#DESCRIPTION atv
#SERVICE 5002:0:1:1:0:32:0:0:0:0:http%3a//api.new.livestream.com/accounts/27755193/events/8452383/live.secure.m3u8:TV Limburg
#DESCRIPTION TV Limburg
#SERVICE 5002:0:1:3:0:32:0:0:0:0:http%3a//api.new.livestream.com/accounts/27755193/events/8511193/live.secure.m3u8:TV Oost
#DESCRIPTION TV Oost
#SERVICE 5002:0:1:8:0:32:0:0:0:0:https%3a//hls-origin01-bruzz.cdn02.rambla.be/adliveorigin-bruzz/_definst_/AZwy8w.smil/chunklist_b3000000.m3u8:BRUZZ (Brussel)
#DESCRIPTION BRUZZ (Brussel)
#SERVICE 5002:0:1:9:0:32:0:0:0:0:http%3a//api.new.livestream.com/accounts/27755193/events/8462344/live.secure.m3u8:ROB TV
#DESCRIPTION ROB TV
#SERVICE 5002:0:1:10:0:32:0:0:0:0:https%3a//hls-origin01-focus-wtv.cdn01.rambla.be/adliveorigin-focus-wtv/_definst_/AK4e8O.smil/chunklist_b3000000.m3u8:Focus TV (België)
#DESCRIPTION Focus TV (België)
#SERVICE 5002:0:1:11:0:32:0:0:0:0:https%3a//hls-origin01-focus-wtv.cdn01.rambla.be/adliveorigin-focus-wtv/_definst_/VzXNby.smil/chunklist_b3000000.m3u8:WTV (Ieper, Roeselare, Kortrijk, Tielt - België)
#DESCRIPTION WTV (Ieper, Roeselare, Kortrijk, Tielt - België)

~~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: Only import EPG for channels in Bouquets - change requested #72 littlesat

  • PLi® Core member
  • 57,182 posts

+699
Excellent

Posted 21 June 2019 - 07:55

Lessons learned...

 

Unless the code was less complicated (I like that) it sounds like Gutemine's suggestion was not the solution  :(

 

As far I understand Gutemine's code suggestion listed the services available in lamedb and not the services available in the bouquets. Lamedb does not contain the IPTV streams, which clarifies why we did not get EPG on the legal and free IPTV streams.

 

So we better can go for 60? (or where wanwizard fixed the copy and past stuff).

 

Please give me green light and I'll merge ;)

 

Maybe we need to consider to 'bump' this for 7.0-release?


Edited by littlesat, 21 June 2019 - 08:49.

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


Re: Only import EPG for channels in Bouquets - change requested #73 doglover

  • Rytec EPG Team
  • 17,396 posts

+658
Excellent

Posted 21 June 2019 - 09:16

I would say go for #60.  Commit the stuff.

And bump it to all current versions of OpenPli pls. if possible.

I tried it on OpenPLi 7.0 so it works there.

 

Willy


~~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: Only import EPG for channels in Bouquets - change requested #74 littlesat

  • PLi® Core member
  • 57,182 posts

+699
Excellent

Posted 21 June 2019 - 09:32

Sorry I cannot merge there... no rights!!!

 

Someone else need to do that.


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


Re: Only import EPG for channels in Bouquets - change requested #75 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 21 June 2019 - 10:06

You should not borrow code when you don't understand it, I clearly said I posted the All Channels code for inspiration not the all bouquet channels one.

 

The allBouquet Channel code is below but it is not usable in your case 1:1 because EPGLoad is not using this strange idea of Ignore lists, instead you select for which Bouquets you WANT to have EPG loaded and all OTHERS are ignored, even whenv data for them would be in the XMLTV File.

    def getAllBouquetServices(self):  
        services=[]
        sp=[]
        for bouquet in os.listdir("/etc/enigma2"):
            if bouquet.startswith("userbouquet.") and bouquet.endswith(".tv"):
                f=open("/etc/enigma2/%s" % bouquet,"r")
                line=f.readline()
                bouquet_name = line.replace("#NAME ","").rstrip().lstrip()
#                cprint("[EPGLOAD] CHECKS bouquet %s" % bouquet_name)
                found=False
                for x in range(bouquet_length):
#                    print ">>>>>>>", bouquet_name, bouquet, config.plugins.epgload.bouquets[x].file.value, config.plugins.epgload.bouquets[x].importing.value
                    if bouquet==config.plugins.epgload.bouquets[x].file.value and config.plugins.epgload.bouquets[x].importing.value:
                        cprint("[EPGLOAD] FOUND bouquet %s" % bouquet_name)
                        found=True
                if found:
                    while line:
                        line=f.readline()
                        if line.startswith("#SERVICE"):
                            service=line.replace("#SERVICE ","").rstrip('\r\n')
                            if service.find(":0:0:0:0:0:0:0:") is -1:
                                mref=miniServiceReference(service)
                                services.append(mref)
                else:
                    cprint("[EPGLOAD] IGNORES bouquet %s" % bouquet_name)
                f.close()
        return services

Because it answers you question how 'efficiently' you can get the sref from ALL bouqets files (even hidden ones whiich are only for IPTV not even in listed bouqets.tv), I also posted the code getAllBouquetServices above, but keep in mind that my bouqets selection config variables from EPG Load which control from which bouqets the sref/mini sref should be added to the list is useless in you case.

 

BTW the code I posted FIRST would have also worked for individual bouqets (of favorites) when you would have adapted the epg query string correctly ... but this is another story and it just reflects why I walked away from your EPGImport code and created my onw one... but now I'm repeating myself.

 

Ciao

gutemine


Edited by gutemine, 21 June 2019 - 10:08.


Re: Only import EPG for channels in Bouquets - change requested #76 littlesat

  • PLi® Core member
  • 57,182 posts

+699
Excellent

Posted 21 June 2019 - 10:37

The ignore list does not have real added value. But it is not my code idea...

It is indeed better to enable/disable it per userbouquet....

Parsing userbouquet files on /etc/enigma2 is something I do not perfer.

The 'parsing' code we have now in this plugin is also something that can be used as example/inspiration in e.g. ABM plugin for reading the userbouquets and your previous example that misleads me can be used to parse the lamedb.


Edited by littlesat, 21 June 2019 - 10:46.

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


Re: Only import EPG for channels in Bouquets - change requested #77 Huevos

  • PLi® Contributor
  • 4,663 posts

+163
Excellent

Posted 21 June 2019 - 11:34

More ABM bashing. LOL



Re: Only import EPG for channels in Bouquets - change requested #78 littlesat

  • PLi® Core member
  • 57,182 posts

+699
Excellent

Posted 21 June 2019 - 12:12

Sorry Huevos... We both know when there was time everything could be made better... I just noticed it as here we've an example. And as you can see here it does look complicated.


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


Re: Only import EPG for channels in Bouquets - change requested #79 Huevos

  • PLi® Contributor
  • 4,663 posts

+163
Excellent

Posted 21 June 2019 - 13:23

Sorry Huevos... We both know when there was time everything could be made better... I just noticed it as here we've an example. And as you can see here it does look complicated.

LOL, just joking. But anyway ABM doesn't read bouquets, it just writes them, and just its own, never touches any others. But yes, I understand what you mean about editing bouquet files from outside the enigma process,


Edited by Huevos, 21 June 2019 - 13:23.


Re: Only import EPG for channels in Bouquets - change requested #80 doglover

  • Rytec EPG Team
  • 17,396 posts

+658
Excellent

Posted 21 June 2019 - 15:19

Sorry I cannot merge there... no rights!!!

 

Someone else need to do that.

 

Can somebody with rigths update this pls.

 

Willy


~~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*



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users