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 #121 Abu Baniaz

  • PLi® Contributor
  • 2,494 posts

+64
Good

Posted 24 June 2019 - 12:13

Willy, you keep saying crossepg does not take namespace into account, where is your evidence? If you haven't got evidence, please stop saying so.

Sent from my Moto G (5S) using Forum Fiend v1.3.3.

Re: Only import EPG for channels in Bouquets - change requested #122 Abu Baniaz

  • PLi® Contributor
  • 2,494 posts

+64
Good

Posted 24 June 2019 - 12:33

It would be nice if other areas of E2 could deal with the subnet issues properly. At the moment, causes issues with Timers. Will help people in areas where they can receive from multiple masts.

IMO, once fixed, subnet should be included by default for Terrestrial.

Sent from my Moto G (5S) using Forum Fiend v1.3.3.

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

  • PLi® Core member
  • 57,066 posts

+698
Excellent

Posted 24 June 2019 - 12:45

Untested...

diff --git a/src/EPGImport/plugin.py b/src/EPGImport/plugin.py
index 068959c..2278360 100644
--- a/src/EPGImport/plugin.py
+++ b/src/EPGImport/plugin.py
@@ -110,6 +110,13 @@ def getAlternatives(service):
        alternativeServices = enigma.eServiceCenter.getInstance().list(service)
        return alternativeServices and alternativeServices.getContent("S", True)
 
+def strippedref(self, ref)
+    ref = ref.split(':')[3:7]
+    try:
+        return int(ref[0], 16) << 48 | int(ref[1], 16) << 32 | int(ref[2], 16) << 16 | int(ref[3], 16) >> 16
+    except:
+        return
+
 def getBouquetChannelList():
        channels = [ ]
        global isFilterRunning, filterCounter
@@ -140,11 +147,11 @@ def getBouquetChannelList():
                                                                                altrernative_list = getAlternatives(service)
                                                                                if altrernative_list:
                                                                                        for channel in altrernative_list:
-                                                                                               refstr = service.toString().upper().split(':')[3:7]
+                                                                                               refstr = strippedref(service.toString())
                                                                                                if refstr not in channels:
                                                                                                        channels.append(refstr)
                                                                        else:
-                                                                               refstr = service.toString().upper().split(':')[3:7]
+                                                                               refstr = strippedref(service.toString())
                                                                                if refstr not in channels:
                                                                                        channels.append(refstr)
        else:
@@ -161,11 +168,11 @@ def getBouquetChannelList():
                                                altrernative_list = getAlternatives(service)
                                                if altrernative_list:
                                                        for channel in altrernative_list:
-                                                               refstr = channel.upper().split(':')[3:7]
+                                                               refstr = strippedref(channel)
                                                                if refstr not in channels:
                                                                        channels.append(refstr)
                                        else:
-                                               refstr = service.toString().upper().split(':')[3:7]
+                                               refstr = strippedref(channel)
                                                if refstr not in channels:
                                                        channels.append(refstr)
        isFilterRunning = 0
@@ -176,7 +183,7 @@ def channelFilter(ref):
        if not ref:
                return False
        sref = enigma.eServiceReference(ref)
-       refstr = sref.toString().upper().split(':')[3:7]
+       refstr = strippedref(sref.toString())
        if config.plugins.epgimport.import_onlybouquet.value:
                global BouquetChannelListList
                if BouquetChannelListList is None:
@@ -186,7 +193,7 @@ def channelFilter(ref):
                        return False
        global serviceIgnoreList
        if serviceIgnoreList is None:
-               serviceIgnoreList = [x.upper().split(':')[3:7] for x in filtersServices.filtersServicesList.servicesList()]
+               serviceIgnoreList = [strippedref(x) for x in filtersServices.filtersServicesList.servicesList()]
        if refstr in serviceIgnoreList:
                print>>log, "Serviceref is in ignore list:", refstr
                return False

Attached Files


Edited by littlesat, 24 June 2019 - 12:52.

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 #124 LraiZer

  • Senior Member
  • 101 posts

+19
Neutral

Posted 24 June 2019 - 13:02

Crossepg does not take into account the Namespace, and so you end up there with the wrong EPG

 

 

Willy, you keep saying crossepg does not take namespace into account, where is your evidence?

 

As far as I am aware CrossEPG simply reads the lamedb file and returns the namespace for the 1st MATCH of each {nid,tsid,sid} it checks against. If you have two identical nid,tsid,sid with different namespaces in your lamedb it will always only return the first found namespace off this check and assign that namespace to all {nid,tsid,sid} combinations!



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

  • PLi® Contributor
  • 4,625 posts

+161
Excellent

Posted 24 June 2019 - 13:11

 

Crossepg does not take into account the Namespace, and so you end up there with the wrong EPG

 

 

Willy, you keep saying crossepg does not take namespace into account, where is your evidence?

 

As far as I am aware CrossEPG simply reads the lamedb file and returns the namespace for the 1st MATCH of each {nid,tsid,sid} it checks against. If you have two identical nid,tsid,sid with different namespaces in your lamedb it will always only return the first found namespace off this check and assign that namespace to all {nid,tsid,sid} combinations!

 

LOL, so it could even select the wrong satellite if the sid, tsid and onid are correct?



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

  • Rytec EPG Team
  • 17,363 posts

+657
Excellent

Posted 24 June 2019 - 13:21

In the past, I had much reports of crossepg importing wrong EPG for a few channels.

Inspection of the channels list always revealed in such cases there were 2 entries in the channel list with the same SID:TID:NID but a different Namespace.

 

Therefore my conclusion:  crossepg doe not take into account the Namespace.  Of course the above explanation from LraiZer can cause this too.  And my conclusion was jumping to conclusions.

 

I have to admit, I did not see any reports lately of this kind of error.

 

Willy

 

PS:  Everybody following this forum, would know my feelings about crossepg.  And they are not helped by something like the above.

Crossepg is good for reading EPG from OpenTV on 28.2E and 13E.

Importing XMLTV files is a later add-on, which leaves to be desired.


~~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 #127 doglover

  • Rytec EPG Team
  • 17,363 posts

+657
Excellent

Posted 24 June 2019 - 13:27

About the subnet:

 

I do not know how current these are, and how they are obtained, but all of these have been passed on to me as valid service refs for TF1

Line 660: <!-- Cable --><channel id="TF1.fr">1:0:1:28A1:68:1:FFFF0000:0:0:0:</channel><!-- TF1 -->
Line 661: <!-- Cable --><channel id="TF1.fr">1:0:1:28A1:68:1:FFFF0182:0:0:0:</channel><!-- TF1 -->
Line 662: <!-- Cable --><channel id="TF1.fr">1:0:19:4E88:C9:1:FFFF0000:0:0:0:</channel><!-- TF1 HD -->
Line 663: <!-- Cable --><channel id="TF1.fr">1:0:19:4E88:C9:1:FFFF019A:0:0:0:</channel><!-- TF1 HD -->
Line 1047: <!-- Misc --><channel id="TF1.fr">1:0:1:8:1:1:14AB136:0:0:0:</channel><!-- TF1 HD -->
Line 1162: <!-- Cable --><channel id="TF1.fr">1:0:1:CA:2:1:FFFF01A3:0:0:0:</channel><!-- TF1 FR -->
Line 1163: <!-- Cable --><channel id="TF1.fr">1:0:1:5DE:F:1:FFFF023B:0:0:0:</channel><!-- TF1 HD -->
Line 5321: <!-- Cable --><channel id="TF1.fr">1:0:19:89C:8E8:1:FFFF02EA:0:0:0:</channel><!-- TF1 HD -->
Line 6160: <!-- 5.0W --><channel id="TF1.fr">1:0:19:191:0:0:DDE2B58:0:0:0:</channel><!-- TF 1 -->
Line 6162: <!-- 5.0W --><channel id="TF1.fr">1:0:19:191:4FB0:55F:DDE0000:0:0:0:</channel><!-- TF 1 HD -->
Line 8225: <!-- Cable --><channel id="TF1.fr">1:0:1:132:3:1:FFFF0212:0:0:0:</channel><!-- TF1 -->
Line 8226: <!-- Cable --><channel id="TF1.fr">1:0:1:26D:19:1:FFFF0152:0:0:0:</channel><!-- TF1 HD -->
Line 8227: <!-- Cable --><channel id="TF1.fr">1:0:1:E77:162:0:8A48:0:0:0:</channel><!-- TF1 HD -->
Line 8228: <!-- Cable --><channel id="TF1.fr">1:0:19:26D:19:1:FFFF0152:0:0:0:</channel><!-- TF1 HD -->

Why channels with almost the same reference, but with a only difference in subnet.

What is the reason behind this?

 

Willy


Edited by doglover, 24 June 2019 - 13:28.

~~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 #128 Huevos

  • PLi® Contributor
  • 4,625 posts

+161
Excellent

Posted 24 June 2019 - 13:34

@Littlesat,

refstr = strippedref(service.toString())

Why is "toString()" used in some places and not others?



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

  • PLi® Core member
  • 57,066 posts

+698
Excellent

Posted 24 June 2019 - 13:40

I have no idea... I just 'adapted' the code and it seems on that location there was toString() and I kept it... (look at the diff please). later you see channel there was no toString() added... it was only in the first two lines I adapted. 

Line 660: <!-- Cable --><channel id="TF1.fr">1:0:1:28A1:68:1:FFFF0000:0:0:0:</channel><!-- TF1 -->
Line 661: <!-- Cable --><channel id="TF1.fr">1:0:1:28A1:68:1:FFFF0182:0:0:0:</channel><!-- TF1 -->

 

It seems that the the second line is not required... As it is always checked on FFFF0000... actually the 0000 or 0182 is removed in the comparison.


Edited by littlesat, 24 June 2019 - 13: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 #130 Huevos

  • PLi® Contributor
  • 4,625 posts

+161
Excellent

Posted 24 June 2019 - 13:43

About the subnet:

 

I do not know how current these are, and how they are obtained, but all of these have been passed on to me as valid service refs for TF1

Line 660: <!-- Cable --><channel id="TF1.fr">1:0:1:28A1:68:1:FFFF0000:0:0:0:</channel><!-- TF1 -->
Line 661: <!-- Cable --><channel id="TF1.fr">1:0:1:28A1:68:1:FFFF0182:0:0:0:</channel><!-- TF1 -->
Line 662: <!-- Cable --><channel id="TF1.fr">1:0:19:4E88:C9:1:FFFF0000:0:0:0:</channel><!-- TF1 HD -->
Line 663: <!-- Cable --><channel id="TF1.fr">1:0:19:4E88:C9:1:FFFF019A:0:0:0:</channel><!-- TF1 HD -->
Line 1047: <!-- Misc --><channel id="TF1.fr">1:0:1:8:1:1:14AB136:0:0:0:</channel><!-- TF1 HD -->
Line 1162: <!-- Cable --><channel id="TF1.fr">1:0:1:CA:2:1:FFFF01A3:0:0:0:</channel><!-- TF1 FR -->
Line 1163: <!-- Cable --><channel id="TF1.fr">1:0:1:5DE:F:1:FFFF023B:0:0:0:</channel><!-- TF1 HD -->
Line 5321: <!-- Cable --><channel id="TF1.fr">1:0:19:89C:8E8:1:FFFF02EA:0:0:0:</channel><!-- TF1 HD -->
Line 6160: <!-- 5.0W --><channel id="TF1.fr">1:0:19:191:0:0:DDE2B58:0:0:0:</channel><!-- TF 1 -->
Line 6162: <!-- 5.0W --><channel id="TF1.fr">1:0:19:191:4FB0:55F:DDE0000:0:0:0:</channel><!-- TF 1 HD -->
Line 8225: <!-- Cable --><channel id="TF1.fr">1:0:1:132:3:1:FFFF0212:0:0:0:</channel><!-- TF1 -->
Line 8226: <!-- Cable --><channel id="TF1.fr">1:0:1:26D:19:1:FFFF0152:0:0:0:</channel><!-- TF1 HD -->
Line 8227: <!-- Cable --><channel id="TF1.fr">1:0:1:E77:162:0:8A48:0:0:0:</channel><!-- TF1 HD -->
Line 8228: <!-- Cable --><channel id="TF1.fr">1:0:19:26D:19:1:FFFF0152:0:0:0:</channel><!-- TF1 HD -->

Why channels with almost the same reference, but with a only difference in subnet.

What is the reason behind this?

 

Willy

Willy, the new code will ignore the subnet, so all those can use the same

 

I have no idea... I just 'adapted' the code and it seems on that location there was toString() and I kept it... (look at the diff please). later you see channel there was no toString() added... it was only in the first two lines I adapted. And as you can see it seems there was another type (in case you don't have userbouquets).

 

Line 660: <!-- Cable --><channel id="TF1.fr">1:0:1:28A1:68:1:FFFF0000:0:0:0:</channel><!-- TF1 -->
Line 661: <!-- Cable --><channel id="TF1.fr">1:0:1:28A1:68:1:FFFF0182:0:0:0:</channel><!-- TF1 -->

 

It seems that the the second line is not required... As it is always checked on FFFF0000... actually the 0000 or 0182 is removed in the comparison.

Yes, this is correct behaviour. :D :D :D

 

And yes, second line not necessary but doesn't cause problems either.


Edited by Huevos, 24 June 2019 - 13:46.


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

  • PLi® Core member
  • 57,066 posts

+698
Excellent

Posted 24 June 2019 - 13:46

mmm in between I found blindly another typo... that is when you cannot test and just hammer code...

diff --git a/src/EPGImport/plugin.py b/src/EPGImport/plugin.py
index 068959c..ef1f0d7 100644
--- a/src/EPGImport/plugin.py
+++ b/src/EPGImport/plugin.py
@@ -110,6 +110,13 @@ def getAlternatives(service):
        alternativeServices = enigma.eServiceCenter.getInstance().list(service)
        return alternativeServices and alternativeServices.getContent("S", True)
 
+def strippedref(self, ref)
+    ref = ref.split(':')[3:7]
+    try:
+        return int(ref[0], 16) << 48 | int(ref[1], 16) << 32 | int(ref[2], 16) << 16 | int(ref[3], 16) >> 16
+    except:
+        return
+
 def getBouquetChannelList():
        channels = [ ]
        global isFilterRunning, filterCounter
@@ -140,11 +147,11 @@ def getBouquetChannelList():
                                                                                altrernative_list = getAlternatives(service)
                                                                                if altrernative_list:
                                                                                        for channel in altrernative_list:
-                                                                                               refstr = service.toString().upper().split(':')[3:7]
+                                                                                               refstr = strippedref(service.toString())
                                                                                                if refstr not in channels:
                                                                                                        channels.append(refstr)
                                                                        else:
-                                                                               refstr = service.toString().upper().split(':')[3:7]
+                                                                               refstr = strippedref(service.toString())
                                                                                if refstr not in channels:
                                                                                        channels.append(refstr)
        else:
@@ -161,11 +168,11 @@ def getBouquetChannelList():
                                                altrernative_list = getAlternatives(service)
                                                if altrernative_list:
                                                        for channel in altrernative_list:
-                                                               refstr = channel.upper().split(':')[3:7]
+                                                               refstr = strippedref(channel)
                                                                if refstr not in channels:
                                                                        channels.append(refstr)
                                        else:
-                                               refstr = service.toString().upper().split(':')[3:7]
+                                               refstr = strippedref(service.toString())
                                                if refstr not in channels:
                                                        channels.append(refstr)
        isFilterRunning = 0
@@ -176,7 +183,7 @@ def channelFilter(ref):
        if not ref:
                return False
        sref = enigma.eServiceReference(ref)
-       refstr = sref.toString().upper().split(':')[3:7]
+       refstr = strippedref(sref.toString())
        if config.plugins.epgimport.import_onlybouquet.value:
                global BouquetChannelListList
                if BouquetChannelListList is None:
@@ -186,7 +193,7 @@ def channelFilter(ref):
                        return False
        global serviceIgnoreList
        if serviceIgnoreList is None:
-               serviceIgnoreList = [x.upper().split(':')[3:7] for x in filtersServices.filtersServicesList.servicesList()]
+               serviceIgnoreList = [strippedref(x) for x in filtersServices.filtersServicesList.servicesList()]
        if refstr in serviceIgnoreList:
                print>>log, "Serviceref is in ignore list:", refstr
                return False

Attached Files


Edited by littlesat, 24 June 2019 - 13:47.

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 #132 doglover

  • Rytec EPG Team
  • 17,363 posts

+657
Excellent

Posted 24 June 2019 - 13:54

#131 plugin.py - does not compile

 

tried in a telnet window:

root@sh1:~# python /usr/lib/enigma2/python/Plugins/Extensions/EPGImport/plugin.py
  File "/usr/lib/enigma2/python/Plugins/Extensions/EPGImport/plugin.py", line 113
    def strippedref(self, ref)
                             ^
SyntaxError: invalid syntax
root@sh1:~#

Edited by doglover, 24 June 2019 - 13:54.

~~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 #133 littlesat

  • PLi® Core member
  • 57,066 posts

+698
Excellent

Posted 24 June 2019 - 13:59

It misses a ':' at the end... happens when you just hammer code without being able to test... new py attached... 

diff --git a/src/EPGImport/plugin.py b/src/EPGImport/plugin.py
index 068959c..fa308e2 100644
--- a/src/EPGImport/plugin.py
+++ b/src/EPGImport/plugin.py
@@ -110,6 +110,13 @@ def getAlternatives(service):
        alternativeServices = enigma.eServiceCenter.getInstance().list(service)
        return alternativeServices and alternativeServices.getContent("S", True)
 
+def strippedref(self, ref):
+    ref = ref.split(':')[3:7]
+    try:
+        return int(ref[0], 16) << 48 | int(ref[1], 16) << 32 | int(ref[2], 16) << 16 | int(ref[3], 16) >> 16
+    except:
+        return
+
 def getBouquetChannelList():
        channels = [ ]
        global isFilterRunning, filterCounter
@@ -140,11 +147,11 @@ def getBouquetChannelList():
                                                                                altrernative_list = getAlternatives(service)
                                                                                if altrernative_list:
                                                                                        for channel in altrernative_list:
-                                                                                               refstr = service.toString().upper().split(':')[3:7]
+                                                                                               refstr = strippedref(service.toString())
                                                                                                if refstr not in channels:
                                                                                                        channels.append(refstr)
                                                                        else:
-                                                                               refstr = service.toString().upper().split(':')[3:7]
+                                                                               refstr = strippedref(service.toString())
                                                                                if refstr not in channels:
                                                                                        channels.append(refstr)
        else:
@@ -161,11 +168,11 @@ def getBouquetChannelList():
                                                altrernative_list = getAlternatives(service)
                                                if altrernative_list:
                                                        for channel in altrernative_list:
-                                                               refstr = channel.upper().split(':')[3:7]
+                                                               refstr = strippedref(channel)
                                                                if refstr not in channels:
                                                                        channels.append(refstr)
                                        else:
-                                               refstr = service.toString().upper().split(':')[3:7]
+                                               refstr = strippedref(service.toString())
                                                if refstr not in channels:
                                                        channels.append(refstr)
        isFilterRunning = 0
@@ -176,7 +183,7 @@ def channelFilter(ref):
        if not ref:
                return False
        sref = enigma.eServiceReference(ref)
-       refstr = sref.toString().upper().split(':')[3:7]
+       refstr = strippedref(sref.toString())
        if config.plugins.epgimport.import_onlybouquet.value:
                global BouquetChannelListList
                if BouquetChannelListList is None:
@@ -186,7 +193,7 @@ def channelFilter(ref):
                        return False
        global serviceIgnoreList
        if serviceIgnoreList is None:
-               serviceIgnoreList = [x.upper().split(':')[3:7] for x in filtersServices.filtersServicesList.servicesList()]
+               serviceIgnoreList = [strippedref(x) for x in filtersServices.filtersServicesList.servicesList()]
        if refstr in serviceIgnoreList:
                print>>log, "Serviceref is in ignore list:", refstr
                return False

Attached Files


Edited by littlesat, 24 June 2019 - 14: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 #134 littlesat

  • PLi® Core member
  • 57,066 posts

+698
Excellent

Posted 24 June 2019 - 14:02

I also thing a selection by userbouquet is not really required as you can also already select the xml which you like...


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 #135 doglover

  • Rytec EPG Team
  • 17,363 posts

+657
Excellent

Posted 24 June 2019 - 14:06

EPGimport now does not import anything.

Zero, zilch...

[EPGImport] ### thread is ready ### Events: 0
[EPGImport] nextImport, source= Deutschland/Osterreich/Switzerland - Sports/Film
[EPGImport] afterDownload /home/Fritz/epg/rytecDE_SportMovies.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: strippedref() takes exactly 2 arguments (1 given)
[XMLTVConverter] Enumerating event information
[EPGImport] ### thread is ready ### Events: 0
[EPGImport] nextImport, source= UK/Ireland - FreeSat (xz)
[EPGImport] afterDownload /home/Fritz/epg/rytecUK_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: strippedref() takes exactly 2 arguments (1 given)
[XMLTVConverter] Enumerating event information
[EPGImport] ### thread is ready ### Events: 0
[EPGImport] imported 0 events
[EPGImport] Save last import date and count event
[EPGImport] Run check deep standby after import
[EPGImport] #### Finished ####

Edited by doglover, 24 June 2019 - 14:07.

~~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 #136 doglover

  • Rytec EPG Team
  • 17,363 posts

+657
Excellent

Posted 24 June 2019 - 14:11

custom.channels.xml disabled, still nothing imported:

[XMLTVConverter] Enumerating event information
[EPGImport] ### thread is ready ### Events: 0
[EPGImport] nextImport, source= UK/Ireland - FreeSat (xz)
[EPGImport] afterDownload /home/Fritz/epg/rytecUK_Basic.xz
[EPGImport] afterChannelDownload None
[EPGImport] Using twisted thread
[XMLTVConverter] Enumerating event information
[EPGImport] ### thread is ready ### Events: 0
[EPGImport] imported 0 events
[EPGImport] Save last import date and count event
[EPGImport] Run check deep standby after import
[EPGImport] #### Finished ####

~~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 #137 littlesat

  • PLi® Core member
  • 57,066 posts

+698
Excellent

Posted 24 June 2019 - 15:04

mmmm

 

Thanks for the log...!!!

 

We can go for another try :)

 

After all a nice idea to convert it to a big integer.

 

failed to parse /etc/epgimport/custom.channels.xml Error: strippedref() takes exactly 2 arguments (1 given)

diff --git a/src/EPGImport/plugin.py b/src/EPGImport/plugin.py
index 068959c..87ec35b 100644
--- a/src/EPGImport/plugin.py
+++ b/src/EPGImport/plugin.py
@@ -110,6 +110,13 @@ def getAlternatives(service):
        alternativeServices = enigma.eServiceCenter.getInstance().list(service)
        return alternativeServices and alternativeServices.getContent("S", True)
 
+def strippedref(ref):
+    ref = ref.split(':')[3:7]
+    try:
+        return int(ref[0], 16) << 48 | int(ref[1], 16) << 32 | int(ref[2], 16) << 16 | int(ref[3], 16) >> 16
+    except:
+        return
+
 def getBouquetChannelList():
        channels = [ ]
        global isFilterRunning, filterCounter
@@ -140,11 +147,11 @@ def getBouquetChannelList():
                                                                                altrernative_list = getAlternatives(service)
                                                                                if altrernative_list:
                                                                                        for channel in altrernative_list:
-                                                                                               refstr = service.toString().upper().split(':')[3:7]
+                                                                                               refstr = strippedref(service.toString())
                                                                                                if refstr not in channels:
                                                                                                        channels.append(refstr)
                                                                        else:
-                                                                               refstr = service.toString().upper().split(':')[3:7]
+                                                                               refstr = strippedref(service.toString())
                                                                                if refstr not in channels:
                                                                                        channels.append(refstr)
        else:
@@ -161,11 +168,11 @@ def getBouquetChannelList():
                                                altrernative_list = getAlternatives(service)
                                                if altrernative_list:
                                                        for channel in altrernative_list:
-                                                               refstr = channel.upper().split(':')[3:7]
+                                                               refstr = strippedref(channel)
                                                                if refstr not in channels:
                                                                        channels.append(refstr)
                                        else:
-                                               refstr = service.toString().upper().split(':')[3:7]
+                                               refstr = strippedref(service.toString())
                                                if refstr not in channels:
                                                        channels.append(refstr)
        isFilterRunning = 0
@@ -176,7 +183,7 @@ def channelFilter(ref):
        if not ref:
                return False
        sref = enigma.eServiceReference(ref)
-       refstr = sref.toString().upper().split(':')[3:7]
+       refstr = strippedref(sref.toString())
        if config.plugins.epgimport.import_onlybouquet.value:
                global BouquetChannelListList
                if BouquetChannelListList is None:
@@ -186,7 +193,7 @@ def channelFilter(ref):
                        return False
        global serviceIgnoreList
        if serviceIgnoreList is None:
-               serviceIgnoreList = [x.upper().split(':')[3:7] for x in filtersServices.filtersServicesList.servicesList()]
+               serviceIgnoreList = [strippedref(x) for x in filtersServices.filtersServicesList.servicesList()]
        if refstr in serviceIgnoreList:
                print>>log, "Serviceref is in ignore list:", refstr
                return False

Attached Files


Edited by littlesat, 24 June 2019 - 15:07.

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 #138 doglover

  • Rytec EPG Team
  • 17,363 posts

+657
Excellent

Posted 24 June 2019 - 15:34

This imports now.  (and the filtering seems to work)

 

Only one side effect.  In the log there are a bunch of:

Serviceref not in bouquets: 1708553142999056432
Serviceref not in bouquets: 388435601010327600
Serviceref not in bouquets: 1083678759125909552
Serviceref not in bouquets: 1241304750378844208
Serviceref not in bouquets: 1995657623538892848
Serviceref not in bouquets: 630504089571426352
Serviceref not in bouquets: 640355713756299312
Serviceref not in bouquets: 895090447420358704
Serviceref not in bouquets: 318066736573579312
Serviceref not in bouquets: 1261007998748590128
Serviceref not in bouquets: 897905197187465264

These are complete useless.  Previous they showed the serviceref.  And they could be usefull.

However these are of no use at all.

So either you make these "human readeable" or just do not list them at all.

 

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 #139 littlesat

  • PLi® Core member
  • 57,066 posts

+698
Excellent

Posted 24 June 2019 - 15:39

There we go again... (LOL) and thanks for testing

diff --git a/src/EPGImport/plugin.py b/src/EPGImport/plugin.py
index 068959c..a2fb947 100644
--- a/src/EPGImport/plugin.py
+++ b/src/EPGImport/plugin.py
@@ -110,6 +110,13 @@ def getAlternatives(service):
        alternativeServices = enigma.eServiceCenter.getInstance().list(service)
        return alternativeServices and alternativeServices.getContent("S", True)
 
+def strippedref(ref):
+    ref = ref.split(':')[3:7]
+    try:
+        return int(ref[0], 16) << 48 | int(ref[1], 16) << 32 | int(ref[2], 16) << 16 | int(ref[3], 16) >> 16
+    except:
+        return
+
 def getBouquetChannelList():
        channels = [ ]
        global isFilterRunning, filterCounter
@@ -140,11 +147,11 @@ def getBouquetChannelList():
                                                                                altrernative_list = getAlternatives(service)
                                                                                if altrernative_list:
                                                                                        for channel in altrernative_list:
-                                                                                               refstr = service.toString().upper().split(':')[3:7]
+                                                                                               refstr = strippedref(service.toString())
                                                                                                if refstr not in channels:
                                                                                                        channels.append(refstr)
                                                                        else:
-                                                                               refstr = service.toString().upper().split(':')[3:7]
+                                                                               refstr = strippedref(service.toString())
                                                                                if refstr not in channels:
                                                                                        channels.append(refstr)
        else:
@@ -161,11 +168,11 @@ def getBouquetChannelList():
                                                altrernative_list = getAlternatives(service)
                                                if altrernative_list:
                                                        for channel in altrernative_list:
-                                                               refstr = channel.upper().split(':')[3:7]
+                                                               refstr = strippedref(channel)
                                                                if refstr not in channels:
                                                                        channels.append(refstr)
                                        else:
-                                               refstr = service.toString().upper().split(':')[3:7]
+                                               refstr = strippedref(service.toString())
                                                if refstr not in channels:
                                                        channels.append(refstr)
        isFilterRunning = 0
@@ -176,19 +183,19 @@ def channelFilter(ref):
        if not ref:
                return False
        sref = enigma.eServiceReference(ref)
-       refstr = sref.toString().upper().split(':')[3:7]
+       refstr = strippedref(sref.toString())
        if config.plugins.epgimport.import_onlybouquet.value:
                global BouquetChannelListList
                if BouquetChannelListList is None:
                        BouquetChannelListList = getBouquetChannelList()
                if refstr not in BouquetChannelListList:
-                       print>>log, "Serviceref not in bouquets:", refstr
+                       print>>log, "Serviceref not in bouquets:", sref.toString()
                        return False
        global serviceIgnoreList
        if serviceIgnoreList is None:
-               serviceIgnoreList = [x.upper().split(':')[3:7] for x in filtersServices.filtersServicesList.servicesList()]
+               serviceIgnoreList = [strippedref(x) for x in filtersServices.filtersServicesList.servicesList()]
        if refstr in serviceIgnoreList:
-               print>>log, "Serviceref is in ignore list:", refstr
+               print>>log, "Serviceref is in ignore list:", sref.toString()
                return False
        if "%3a//" in ref.lower():
                # print>>log, "URL detected in serviceref, not checking fake recording on serviceref:", ref

Attached Files


Edited by littlesat, 24 June 2019 - 15:40.

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 #140 Huevos

  • PLi® Contributor
  • 4,625 posts

+161
Excellent

Posted 24 June 2019 - 16:04

 

There we go again... (LOL) and thanks for testing

diff --git a/src/EPGImport/plugin.py b/src/EPGImport/plugin.py
index 068959c..a2fb947 100644
--- a/src/EPGImport/plugin.py
+++ b/src/EPGImport/plugin.py
@@ -110,6 +110,13 @@ def getAlternatives(service):
        alternativeServices = enigma.eServiceCenter.getInstance().list(service)
        return alternativeServices and alternativeServices.getContent("S", True)
 
+def strippedref(ref):
+    ref = ref.split(':')[3:7]
+    try:
+        return int(ref[0], 16) << 48 | int(ref[1], 16) << 32 | int(ref[2], 16) << 16 | int(ref[3], 16) >> 16
+    except:
+        return
+
 def getBouquetChannelList():
        channels = [ ]
        global isFilterRunning, filterCounter
@@ -140,11 +147,11 @@ def getBouquetChannelList():
                                                                                altrernative_list = getAlternatives(service)
                                                                                if altrernative_list:
                                                                                        for channel in altrernative_list:
-                                                                                               refstr = service.toString().upper().split(':')[3:7]
+                                                                                               refstr = strippedref(service.toString())
                                                                                                if refstr not in channels:
                                                                                                        channels.append(refstr)
                                                                        else:
-                                                                               refstr = service.toString().upper().split(':')[3:7]
+                                                                               refstr = strippedref(service.toString())
                                                                                if refstr not in channels:
                                                                                        channels.append(refstr)
        else:
@@ -161,11 +168,11 @@ def getBouquetChannelList():
                                                altrernative_list = getAlternatives(service)
                                                if altrernative_list:
                                                        for channel in altrernative_list:
-                                                               refstr = channel.upper().split(':')[3:7]
+                                                               refstr = strippedref(channel)
                                                                if refstr not in channels:
                                                                        channels.append(refstr)
                                        else:
-                                               refstr = service.toString().upper().split(':')[3:7]
+                                               refstr = strippedref(service.toString())
                                                if refstr not in channels:
                                                        channels.append(refstr)
        isFilterRunning = 0
@@ -176,19 +183,19 @@ def channelFilter(ref):
        if not ref:
                return False
        sref = enigma.eServiceReference(ref)
-       refstr = sref.toString().upper().split(':')[3:7]
+       refstr = strippedref(sref.toString())
        if config.plugins.epgimport.import_onlybouquet.value:
                global BouquetChannelListList
                if BouquetChannelListList is None:
                        BouquetChannelListList = getBouquetChannelList()
                if refstr not in BouquetChannelListList:
-                       print>>log, "Serviceref not in bouquets:", refstr
+                       print>>log, "Serviceref not in bouquets:", sref.toString()
                        return False
        global serviceIgnoreList
        if serviceIgnoreList is None:
-               serviceIgnoreList = [x.upper().split(':')[3:7] for x in filtersServices.filtersServicesList.servicesList()]
+               serviceIgnoreList = [strippedref(x) for x in filtersServices.filtersServicesList.servicesList()]
        if refstr in serviceIgnoreList:
-               print>>log, "Serviceref is in ignore list:", refstr
+               print>>log, "Serviceref is in ignore list:", sref.toString()
                return False
        if "%3a//" in ref.lower():
                # print>>log, "URL detected in serviceref, not checking fake recording on serviceref:", ref

 

 

This bit is wrong:

                                                                                if altrernative_list:
                                                                                        for channel in altrernative_list:
-                                                                                               refstr = service.toString().upper().split(':')[3:7]
+                                                                                               refstr = strippedref(service.toString())
                                                                                                if refstr not in channels:
                                                                                                        channels.append(refstr)

Should be:

refstr = strippedref(channel.toString())



18 user(s) are reading this topic

0 members, 18 guests, 0 anonymous users