Universal EPGImporter (2 Viewers)

kuehnch

MP Donator
  • Premium Supporter
  • June 14, 2006
    303
    9
    43
    Cologne (Köln)
    Home Country
    Germany Germany
    As written in https://forum.team-mediaportal.com/do_you_think_universal_epg_importer-t27671.html , i thought, a good thing for the tvserver would be an universal EPGImporter, that devides the import-process in two essential parts:

    TVDatabase <-- EPGImporter <-- DataSourceModule <-- DataSource (like: XMLTV, TVMovie)

    About the two parts:
    ----------------------------------------

    DataSourceModule:
    A datasource-module is a plugin for the EPGImporter, that contains an interface similar to this one:

    Code:
    Guid GetModuleID();
    
    string GetName();
    string GetVersion();
    string GetAuthor();
    string GetDataSourceName();
    
    void Initialize(IDataSourceModuleConfiguration dataSourceModuleConfiguration);
    void RefreshData();
    
    IDataSourceChannel[] GetChannelList();
    IDataSourceGenre[] GetGenreList();
    
    IDataSourceEPGElement[] GetChannelEPG(string channelID, int daysToImport, ...);
    
    bool HasConfiguration();
    void ShowConfigurationForm(ref IDataSourceModuleConfiguration dataSourceModuleConfiguration);

    The task of a datasource-module is, to grab EPG-data from the supported datasource (ex: the microsoft-access-based database, that tvmovie clickfinder uses) and store it to a list of EPGelements.
    An EPGElement contains some essential datafields like "title", "subtitle", "description", "genre", "starttime", "endtime" and a list of dataTags, to add additional information to the epgelement (like "audioformat", "videoformat", "actors", "production-year"...).
    Each datasource-module can have its own configuration-dialog.


    EPGImporter:
    The EPGImporter uses the bounded datasource-modules to receive EPG-data from different sources. It maps the received data to the corresponding datasink-channels (TVServer-channels - based on the mapping, that you have created before), maps datasource-genres (like "sitcom","actionfilm","drama") to consistent datasink-genres (like "series","action" - based on the mapping, that you have created before), modifies the contents of title and description-fields how do you like it (for example: if an epgelement contains the dataTag "actors", the list of actors can be placed in the description-text) and stores all the data to the TVDatabase.

    If someone wants to develop a new importer for an existing dataSource, he do not need to know, how he can import the epg-data to the TVDatabase. All what he have to do is, to create a DataSource-module, that grabs the epg-data from the datasource and packs it to EPGElements.

    About the configuration:
    -------------------------------------

    After the installation of the plugin, setupTV will show up a new plugin wth the following configuration-control:

    epgimporter_setuptv_schedule.jpg


    Schedule:
    You can define a list of dates here, on that the EPGImporter has to run imports. Each schedule contains a list of datasource-modules, that should be used while importing. That means, that you can define, at which time a datasource should be grabbed.

    ChannelMapping:
    You have to map each datasource-channel to a proper TV-channel (datasink-channel) (like: "RTL (TVMovie)" -> "RTL Television"). Furthermore the channelMapping supports a timesharing-based mapping. The mapping works similiar to the mapping of the TVMovie-plugin, that currently exists.

    GenreMapping:
    You are able to map datasource-genres to consistent genres.
    Example: DataSource-module #1 tags each newscast with the genre "news", while DataSource-module #2 tags each newscast with the genre "newsmagazine". Now you are able to map both genres ("news" and "newsmagazine") to one corresponding genre "newscast".
    NOTE: Currently there is a fixed list of some test-genres - has to be optimized....

    Settings:
    Can be devided in two parts.
    First, there are some main-settings like "days to import", "slow import", "use short descriptions"...
    Second, you are able to define string-templates for the fields "title", "subtitle" (not supported yet, because tvserver does not support it) and "description".
    Example: For each program, that is broadcasted live (epgelement contains a dataTag "live" with a true-value), the title of the program, that becomes stored to the TVDatabase, should be in the following format "LIVE: <title>". To accomplish this, only define the following template in die tite-template-field: "$if(live)$LIVE: $endif$$title$".
    There are a lot of possibilities to modify the title,subtitle and description-fields according to your wishes (and not to the wishes of the developer of the importer).

    DataSource-Modules:
    Here, you can add/update/delete/configure DataSource-modules. In addition DataSource-modules can be activated/deactivated.

    Where you can get it:
    ----------------------------------
    http://0xFF.de/files/EPGImporter/Mediaportal/MP_EPGImporter.zip

    SVN (latest): https://netserv.kuehnch.dyndns.org/opensvn/EPGImporter/trunk/ (epgimporter/epgimporter)

    Requirements
    -------------------------------
    - Running TVServer
    - TVMovie Clickfinder 5.20+
    -> at this time, there is only one dataSourceModule for tvmovie


    Installation
    ---------------------------
    Have a look on the ReadMe.txt-file, that is contained within the downloadable package.

    Known issues
    ------------------------------
    - EPGImporter uses its own i18n-mechanism
    - Import of images not working (because tvserver does not support it)
    - The used string-template-engine is BSD-licenced
    - the setuptv-control does not show up the status of an import, if it was
    started by the TVService
     

    Laban

    Portal Pro
    July 1, 2007
    206
    18
    Luleå
    Home Country
    Sweden Sweden
    Interesting. I'm interested in the xmltv part of this so perhaps i'll try and create a DataSource module for xmltv so that i can try it out.
     

    kuehnch

    MP Donator
  • Premium Supporter
  • June 14, 2006
    303
    9
    43
    Cologne (Köln)
    Home Country
    Germany Germany
    First, many thanks for the advice.

    A xmltv-dsmodule would be very nice (to see, if all interface-stuff was developed in a right way). The sourcecode contains the sourcecode of the tvmovie-dsmodule, too. In my mind, this is a good entry to start the development of new dsmodules, because it shows up a lot of details (how to define custom datatags for example).
     

    kuehnch

    MP Donator
  • Premium Supporter
  • June 14, 2006
    303
    9
    43
    Cologne (Köln)
    Home Country
    Germany Germany
    Fixed a bigger error - TimeSharing within the channelmapping-function did not work correctly (if you mapped an already mapped datasource-channel to a tv-channel, and one of this mappings had a sharing-time, the epg was not imported completly for the tv-channel without time-sharing).

    To update (if you already installed the plugin), stop tvserver/setuptv, copy the new files to the tvserver-directory and start the tvserver again (your settings stay intact).
     

    kuehnch

    MP Donator
  • Premium Supporter
  • June 14, 2006
    303
    9
    43
    Cologne (Köln)
    Home Country
    Germany Germany
    + New feature: ability to add/remove datasink-genres by yourself

    This feature needs two changes on the existing database-structure. The easiest way to update to the new version is to run the UPDATE_DATABASE.sql file again (but it will drop all settings/mappings, that you made). Also, you have to replace the files by the new ones...
     

    kuehnch

    MP Donator
  • Premium Supporter
  • June 14, 2006
    303
    9
    43
    Cologne (Köln)
    Home Country
    Germany Germany
    + New feature: automapping of channels
    -> datasource-channels are mapped to datasink-channels, if they have the same name
    -> howto: rightclick on one of the channel-trees within the ChannelMapping-tab and select "Automap"
    # the gui-configuration of the scheduler has been overworked
    # DataSource-modulefiles and logfiles are now placed/written in the common-application-directory
    -> for all, that have EPGImporter installed already: take a look on installation-step 4 (readme.txt)
    you have to re-add the tvmovie-dsmodule (your settings stay intact!)
    # the file-extension of a datasource-modulefile now is: EDM (*.edm)
     

    ph4r4o

    Portal Member
    January 27, 2007
    45
    4
    Home Country
    Germany Germany
    Nice work! Cause the implemented TVMovie Plugin of Tv3 does not realy work on my TVserver I tried your plugin. Now I get the EPG of all mapped channels with no faults. But I have one question, does your plugin only import the TV-Movie Database or does it also update the TV-Movie database? The implemented TV-Movie plugin of Tv3 first updates the TV-Movie database and imports it after that.
     

    kuehnch

    MP Donator
  • Premium Supporter
  • June 14, 2006
    303
    9
    43
    Cologne (Köln)
    Home Country
    Germany Germany
    The TVMovie-database becomes updated with each import (you can reproduce this, if you have a look on the taskmanager - at the beginning of each import, there is a process called "tvuptodate.exe" - that is the update-tool of TVMovie-Clickfinder, which updates the tvm-database via the internet).
     

    Users who are viewing this thread

    Top Bottom