Jump to content


Photo

New option to EPG Import plugin


  • Please log in to reply
38 replies to this topic

Re: New option to EPG Import plugin #21 antony23

  • Senior Member
  • 47 posts

+1
Neutral

Posted 27 December 2016 - 15:52

Off course the import takes some time. 

But you can use the ready made epg.dat files in the import.  Deselect the the XMLTV sources and scroll down in the list.

The import of the epg.dat files is very fast.  However the import counter does not work, and during the import the receiver is unresponsive.  But this is only for a minute or so (depnding on the amount of sources you import).

 

Willy

 

Why epg.dat import sources are considered "experimental"? What the problem with it?



Re: New option to EPG Import plugin #22 doglover

  • Rytec EPG Team
  • 17,466 posts

+666
Excellent

Posted 27 December 2016 - 16:02

When trying these out I experienced some crashes.  Could not pinpoint where the error should have been, or even if it was related to these files.

 

Decided to release them anyway.  And if errors showed up, they should have been reported.  Up to now, not much of an error showed up.

Both the symptoms I mentioned before are inherent to the files and method of import and cannot be changed.

 

The situation has not changed since the introduction of this sort of files, and therefore they are still called "experimental".

Also these epg.dat files are sort of a black box.  They either work or they do not.  Not much support I can give on these.

 

BTW: these files are generated with the rytec XMLTV and the rytec channels files and should contain the same information.  Also if channels are missing you should report them in the same way as for the XMLTV files.  The correction has to take place on that level.

 

Willy

 

PS:  read this:  https://forums.openp...g-epgdat-files/


Edited by doglover, 27 December 2016 - 16:04.

~~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: New option to EPG Import plugin #23 antony23

  • Senior Member
  • 47 posts

+1
Neutral

Posted 29 December 2016 - 01:10

Thanks Willy for the explanation.

 

I tried it, had no crashes.
Anyway i exprimented some times where the file was not saved (not donwloaded?). I'm doing more tests.

 

But i have a question... what happens if option "clear epg before import" is turned off? It merges the old file with the new ones, or it replaces the old file anyway?


Edited by antony23, 29 December 2016 - 01:10.


Re: New option to EPG Import plugin #24 antony23

  • Senior Member
  • 47 posts

+1
Neutral

Posted 29 December 2016 - 01:38

Ok, fast checking code it seems the file in deleted anyway before import. The only difference between turning on or off "clear epg before import" in this case (dat sources) is to flush or not epg in memory.

 

Where i can see the log of EPG Importer plugin to check the reason it is not written sometimes?



Re: New option to EPG Import plugin #25 doglover

  • Rytec EPG Team
  • 17,466 posts

+666
Excellent

Posted 29 December 2016 - 09:13

Try the log:

 

* Where is the epgimport.log

 

Open the XMLTV importer.

Press now the info or epg button on your remote.

Now you see the log.  This log can be saved, and you find the saved fle in /tmp/

 

Clear epg before import does not seem to work properly when using epg.dat files.  Well it clears the epg in memory but does that before it imports any source.  So if you select more than one source it clears the epg and import the first source, it clears the  epg again and import the next source.  So it loses all imports from the first source.

Of course if you import only one source you will be OK.

 

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: New option to EPG Import plugin #26 Pr2

  • PLi® Contributor
  • 6,194 posts

+261
Excellent

Posted 29 December 2016 - 19:30

Hi,

 

There is a problem if you enable clear epg before import and importing .dat files is that in the loop, the content is cleared for every file... and the result is that only the latest epg.dat loaded remains in EPG data.  So for the time being it is better to not enable the clear epg before import when you import severals epg.dat files.

 

I have open up a ticket for this.

 

And when I test import epg.dat files it was also working fine for me (and it was fast).

 

Pr2 


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: New option to EPG Import plugin #27 antony23

  • Senior Member
  • 47 posts

+1
Neutral

Posted 3 January 2017 - 19:32

Ok, i found a bug saving epg.dat file. 

Anyway i'm checking oe-alliance EPG Importer version source, i don't know it openpli use have same sources.

 

The bug happens when using twisted thread for DAT file.

I try to make a working patch, or create a new issue (where? openpli or oe-alliance?)

 

Thanks



Re: New option to EPG Import plugin #28 antony23

  • Senior Member
  • 47 posts

+1
Neutral

Posted 3 January 2017 - 20:07

Opened an issue (and relative patch) on oe-alliance/XMLTV-Import. There the line number to correct is 176.

 

In your sources (OpenPLi/enigma2-plugin-extensions-xmltvimport), the line number is 173.

 

Thanks.



Re: New option to EPG Import plugin #29 Dimitrij

  • PLi® Core member
  • 10,379 posts

+354
Excellent

Posted 3 January 2017 - 20:50

maybe

		if self.source.parser == 'epg.dat':
			if twisted.python.runtime.platform.supportsThreads():
				print>>log, "[EPGImport] Using twisted thread for DAT file"
				threads.deferToThread(self.readEpgDatFile, filename, deleteFile).addCallback(lambda ignore: self.nextImport())
			else:
				self.readEpgDatFile(filename, deleteFile)
				return
		if filename.endswith('.gz'):
			self.fd = gzip.open(filename, 'rb')
		else:
			self.fd = open(filename, 'rb')
-		if deleteFile:
+		if deleteFile and self.source.parser != 'epg.dat':
			try:
				print>>log, "[EPGImport] unlink", filename
				os.unlink(filename)
			except Exception, e:
				print>>log, "[EPGImport] warning: Could not remove '%s' intermediate" % filename, e

GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: New option to EPG Import plugin #30 antony23

  • Senior Member
  • 47 posts

+1
Neutral

Posted 4 January 2017 - 00:02

I simply moved "return" one tab back.

if source is epg.dat, next callback should be ONLY readEpgDatFile (no other code), with or without new thread (not only without new thread as it already is).

 

I tested my patch and all is working good now.

 

Here the fix on oe-alliance git.


Edited by antony23, 4 January 2017 - 00:06.


Re: New option to EPG Import plugin #31 antony23

  • Senior Member
  • 47 posts

+1
Neutral

Posted 5 January 2017 - 00:27

Before i become crazy, could someone help me in understanding if and when epg.dat file is deleted at enigma2 starting?

 

Could happen that /etc/enigma2/epg.dat file is deleted at eEPGCache::load() here for any reason?

 

I disabled epg save, so there is no possibility epg.dat is deleted or overwrited at enigma2 stop.


Edited by antony23, 5 January 2017 - 00:27.


Re: New option to EPG Import plugin #32 WanWizard

  • PLi® Core member
  • 70,851 posts

+1,832
Excellent

Posted 5 January 2017 - 01:07

search for unlink() calls.

 

The answer is no, it is only deleted there if it is for example corrupt. Remember, I told you before it is only a backup file, so there is no need to keep it once it is loaded.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: New option to EPG Import plugin #33 antony23

  • Senior Member
  • 47 posts

+1
Neutral

Posted 5 January 2017 - 01:15

search for unlink() calls.

 

The answer is no, it is only deleted there if it is for example corrupt. Remember, I told you before it is only a backup file, so there is no need to keep it once it is loaded.

 

Thanks, i made a stupid test. Put a corrupted eog.dat inside and started enigma in debug mode. The file was deleted because it was corrupt! In fact unlink call is on cacheCorrupt function.



Re: New option to EPG Import plugin #34 antony23

  • Senior Member
  • 47 posts

+1
Neutral

Posted 5 January 2017 - 01:18

So, if epg.dat downloaded from rytech is corrupted, it is immediately deleted.

 

Other point, maybe @doglover can answer me.

Why epg.dat saved importing xmltv rytech Italy is about 8Mb, and epg.dat downloaded directly from Italy rytech dat file is 15 Mb?



Re: New option to EPG Import plugin #35 doglover

  • Rytec EPG Team
  • 17,466 posts

+666
Excellent

Posted 5 January 2017 - 08:39

So, if epg.dat downloaded from rytech is corrupted, it is immediately deleted.

 

Other point, maybe @doglover can answer me.

Why epg.dat saved importing xmltv rytech Italy is about 8Mb, and epg.dat downloaded directly from Italy rytech dat file is 15 Mb?

 

 

When you import the epg on an enigma2 receiver, only the channels are imported which you have in your lamedb.  So only the epg is imported for the channels the receiver has access to.  All the others are simply ignored.  When you save this data to an epg.dat file, of course only the imported data is saved.

 

Making epg.dat files off-line you do not not know which channels are available, so all channels are included.  Also all the cable channels for instance.  In some instances this triples the amount of channels.

And probably this is the reason if you try to read these epg.dat files during start-up of enigma2 are failing.  They are meant to be imported by the importer or the BlackHole EPG importer.

 

Willy


Edited by doglover, 5 January 2017 - 08:40.

~~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: New option to EPG Import plugin #36 littlesat

  • PLi® Core member
  • 57,436 posts

+708
Excellent

Posted 5 January 2017 - 10:24

I just merged the solution from dimitrij....

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


Re: New option to EPG Import plugin #37 WanWizard

  • PLi® Core member
  • 70,851 posts

+1,832
Excellent

Posted 5 January 2017 - 15:23

That doesn't address the issue Doglover is referring to.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: New option to EPG Import plugin #38 Dimitrij

  • PLi® Core member
  • 10,379 posts

+354
Excellent

Posted 6 January 2017 - 09:02

Try the log:

 

* Where is the epgimport.log

 

Open the XMLTV importer.

Press now the info or epg button on your remote.

Now you see the log.  This log can be saved, and you find the saved fle in /tmp/

 

Clear epg before import does not seem to work properly when using epg.dat files.  Well it clears the epg in memory but does that before it imports any source.  So if you select more than one source it clears the epg and import the first source, it clears the  epg again and import the next source.  So it loses all imports from the first source.

Of course if you import only one source you will be OK.

 

Willy

I do not understand.
Cleaning is done once before importing.


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: New option to EPG Import plugin #39 antony23

  • Senior Member
  • 47 posts

+1
Neutral

Posted 6 January 2017 - 22:54

@Dimitrij

I explain to you. There is no function that merge more than one epg.dat file. Each time epg.dat is uncompressing and saved, it overwrite the precedent one. Check code please (readEpgDatFile function).

 

@doglover

Thanks for epxlanation. Anyway i don't think it is the cause of deleting of epg.dat at startup, because it doesn't happen always. It is hard to catch its deleting. I can't beleave the problem is corruption, because it is the same file downloaded by rytec and already loaded after its download (so file is good) -> i can say this because i disabled saving epg at reboot/restart/shutdown.

 

@littlesat

Is there a reason do you merged solution by Dimitrij and not mine (moreover already committed on oe-core)? I tested mine solution and it works. Someone tested Dimitrij's solution? 
If yuo are not interesting in my fix and bug catch, simply say it. I'm a software developer, not in python, but as you can imagine i can understand what i do.

 

Maybe you and Dimitrij can explain me why calling "self.readEpgDatFile(filename, deleteFile)" should return, and calling "threads.deferToThread(self.readEpgDatFile, filename, deleteFile).addCallback(lambda ignore: self.nextImport())" shoud not return. What is the difference?!

Moreover, not return at that point, could cause problem in any case (even with Dimitrij solution), simply because that part of code is not thread safe....


Edited by antony23, 6 January 2017 - 22:54.



4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users