Jump to content


Photo

Coming Soon: EPG Exporter Plugin

Development

  • Please log in to reply
10 replies to this topic

#1 buyukbang

  • Senior Member
  • 185 posts

+11
Neutral

Posted 25 June 2011 - 12:06

Hi,

I wrote a plugin named "EPG Exporter" to extend functionality of Rytec XMLTV EPG Importer plugin. Thanks to doglover for his precious helps and directing me the right way while writing exporting routins!

EPG Exporter plugin requires XMLTV EPG Importer plugin and cooperates with it. EPG Exporter copies EPG data from one channel to another channel so that you can transfer EPG data from packages/sattelites with EPG data to the packages/sattelites without EPG data. For our case, we Turkish users willl be able to transfer EPG data of nearly 50 encrypted channels of 7E digiturk package to 42E FTA channels with no EPG data. This plugin does this at the moment! But I wrote this extension for public use, so not only Turkish users but also all enigma2 users can use it. Plugin needs no telnet/ ftp or other user intervention. You just create a bouquet to map source and destination channels then viola! :) It's really easy to use.

I'll release EPG Exporter plugin here and give much detailed user guide in a few days, but at this stage I need an information from XMLTV EPG Importer plugin developers, I would really appreciate if you help me !


1- After my plugin completes exporting EPG from source channels, I want to trigger EPG Importer plugin to import generated XML file automatically. Is there anyway to do this by a simple command cal from shell ? If not, is there any simple modificatin method on EPG Importer plugin codes to achieve this ?

2- In file xmltvconverter.py, line return r.encode('utf-8') causes incorrect display of special internationl characters on non PLi images, though on PLi it works as it should be. When I change this line to return r.encode('iso8859_9') and restart enigma2, it works fine on nonPLi images. Currently I do this in my plugin, by replacing xmltvconverter.py as a simple hack. But I thing it would be better if EPG Importer plugin developers changes this in their next releases. I'm a pure PLi fan and personally I even don't use meoboot/ barry allen, I use only PLi on flash. But I want all enigma2 users benefit from what I did as equal without an headache, and I know this is PLi forum and you only support PLi! But could I kindly as you to fix this by making this line user customizable?

Thanks for your kind responses...

Re: Coming Soon: EPG Exporter Plugin #2 buyukbang

  • Senior Member
  • 185 posts

+11
Neutral

Posted 27 June 2011 - 17:27

Any answer ?

Re: Coming Soon: EPG Exporter Plugin #3 buyukbang

  • Senior Member
  • 185 posts

+11
Neutral

Posted 4 July 2011 - 18:27

Come on guys. Is it so difficult to help :(


BTW I eleminated second question, found a way to make it work in other images as it should be.

Now I just need your support for the first question.

Re: Coming Soon: EPG Exporter Plugin #4 dAF2000

  • PLi® Ex-Leden
  • 14,151 posts

+52
Good

Posted 4 July 2011 - 18:40

Hi Buyukbang,

Of course we are always willing to help. I'm not an Enigma2 developer, so I can't give you an answer either. It may be simply the case we don't have an answer. I assume a (software) interface need to be created in Enigma2 to let the EPG plugin to reload. But of course, I'm not an Enigma2 developer.
Many answers to your question can be found in our wiki: http://openpli.org/wiki

Re: Coming Soon: EPG Exporter Plugin #5 korsan

  • Senior Member
  • 404 posts

+5
Neutral

Posted 4 July 2011 - 19:25

Yes Buyukbang,

I hope that this can be realised [highlight=#ffffff]soon.[/highlight]..

H9.Twin  :::  H9.2H :::  H9.S ::: HD1265 ::: H2H :::::::::: WaveFrontier T90: 1W, 3, 7, 13, 16, 19, 23, 28, 42E ::::::::::


Re: Coming Soon: EPG Exporter Plugin #6 MiLo

  • PLi® Core member
  • 14,042 posts

+298
Excellent

Posted 25 July 2011 - 18:51

1- After my plugin completes exporting EPG from source channels, I want to trigger EPG Importer plugin to import generated XML file automatically. Is there anyway to do this by a simple command cal from shell ? If not, is there any simple modificatin method on EPG Importer plugin codes to achieve this ?


You posted this during my vacation, I never noticed.

You cannot start it from shell, because the shell doesn't have access to Enigma2's internal data.

Starting the import from another enigma2 plugin is very simple, just look at what "doimport()" does in plugin.py. Code would look like this (untested...):

from Plugins.Extensions.EPGImport.plugin import epgimport
from Plugins.Extensions.EPGImport import EPGConfig

# ...

		  if epgimport.isImportRunning():
				self.session.open(MessageBox, _("EPGImport Plugin\nImport of epg data is still in progress. Please wait."), MessageBox.TYPE_ERROR, timeout = 10, close_on_any_key = True)
		  return
	   cfg = EPGConfig.loadUserSettings()
		  sources = [ s for s in EPGConfig.enumSources(CONFIG_PATH, filter = cfg["sources"]) ]
		  if not sources:
			 self.session.open(MessageBox, _("No active EPG sources found, nothing to do"), MessageBox.TYPE_INFO, timeout = 10, close_on_any_key = True)
			 return
		  # make it a stack, first on top.
		  sources.reverse()
		  epgimport.sources = sources

		    try:
			   epgimport.onDone = doneImport
		  epgimport.beginImport(longDescUntil = config.plugins.epgimport.longDescDays.value * 24 * 3600 + time.time())
		    except Exception, e:
			 print>>log, "[EPGImport] Error at start:", e 
			 self.session.open(MessageBox, _("EPGImport Plugin\nFailed to start:\n") + str(e), MessageBox.TYPE_ERROR, timeout = 15, close_on_any_key = True)


Real musicians never die - they just decompose

Re: Coming Soon: EPG Exporter Plugin #7 buyukbang

  • Senior Member
  • 185 posts

+11
Neutral

Posted 25 July 2011 - 20:58

Thanks for the information Milo! This is what I need.

By the way I noticed that there was a tool named OfflineImport.py in xmltv import package. I managed to run it from shell successfully in Pli image, but it just create epg_new.dat which needs an enigma2 restart to load. Is the reason same with you wrote below ?

1- After my plugin completes exporting EPG from source channels, I want to trigger EPG Importer plugin to import generated XML file automatically. Is there anyway to do this by a simple command cal from shell ? If not, is there any simple modificatin method on EPG Importer plugin codes to achieve this ?


You posted this during my vacation, I never noticed.

You cannot start it from shell, because the shell doesn't have access to Enigma2's internal data.

Starting the import from another enigma2 plugin is very simple, just look at what "doimport()" does" in plugin.py. Code would look like this (untested...):

from Plugins.Extensions.EPGImport.plugin import epgimport
from Plugins.Extensions.EPGImport import EPGConfig

# ...

		  if epgimport.isImportRunning():
				self.session.open(MessageBox, _("EPGImport Plugin\nImport of epg data is still in progress. Please wait."), MessageBox.TYPE_ERROR, timeout = 10, close_on_any_key = True)
		  return
	   cfg = EPGConfig.loadUserSettings()
		  sources = [ s for s in EPGConfig.enumSources(CONFIG_PATH, filter = cfg["sources"]) ]
		  if not sources:
			 self.session.open(MessageBox, _("No active EPG sources found, nothing to do"), MessageBox.TYPE_INFO, timeout = 10, close_on_any_key = True)
			 return
		  # make it a stack, first on top.
		  sources.reverse()
		  epgimport.sources = sources

		    try:
			   epgimport.onDone = doneImport
		  epgimport.beginImport(longDescUntil = config.plugins.epgimport.longDescDays.value * 24 * 3600 + time.time())
		    except Exception, e:
			 print>>log, "[EPGImport] Error at start:", e 
			 self.session.open(MessageBox, _("EPGImport Plugin\nFailed to start:\n") + str(e), MessageBox.TYPE_ERROR, timeout = 15, close_on_any_key = True)



Re: Coming Soon: EPG Exporter Plugin #8 MiLo

  • PLi® Core member
  • 14,042 posts

+298
Excellent

Posted 26 July 2011 - 10:56

OfflineImport was initially for testing. Most of the EPGImport plugin was developed, built and tested on a Windows machine.

It's useful as a tool to convert XMLTV files into an enigma2 epg.dat file, and I think Rytec is using it to create the ready=made epg.dat files for images that refuse to support the plugin.

Loading epg.dat files has proven to cause all kinds of trouble, using the plugin to directly inject the events into the EPG cache in RAM is much faster and very reliable.

So use it as a tool for testing and so (it sets up a working EPGImport without actually requiring enigma) but please don't use it for end-user functionality.
Real musicians never die - they just decompose

Re: Coming Soon: EPG Exporter Plugin #9 Taykun345

  • Senior Member
  • 1,296 posts

+41
Good

Posted 16 January 2012 - 07:54

buyukband, when will you release this plugin?
Army MoodBlue HD skin modification by me: https://github.com/T...-MoodBlueHD-mod
Matrix10 MH-HD2 skin modification by me: https://github.com/B...-MX-HD2-OpenPli
MetrixHD skin modification by me: https://github.com/T...xHD-WPstyle-mod
Slovenian translation for OpenPLi E2: https://github.com/T...ion-for-OpenPLi

Re: Coming Soon: EPG Exporter Plugin #10 buyukbang

  • Senior Member
  • 185 posts

+11
Neutral

Posted 24 January 2012 - 12:43

I've in a period with very limited time for this project. But it's still alive and in beta test by Turkish users. I cannot give a specific date for the final release. Sorry for the delay :(

It all started with a BigBang...


http://buyukbang.blogspot.com


Re: Coming Soon: EPG Exporter Plugin #11 buyukbang

  • Senior Member
  • 185 posts

+11
Neutral

Posted 27 February 2012 - 15:21

I just released as a part of my new Panel, see below link:

http://openpli.org/f...nique-features/

It all started with a BigBang...


http://buyukbang.blogspot.com




Also tagged with one or more of these keywords: Development

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users