Best way to insert programs in database (1 Viewer)

Edalex

Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,922
    1,228
    Saratov
    Russian Federation Russian Federation
    Country flag
    Hi there!
    I'm currently developing TVServer plugin for grabbing EPG from one site and I wonder what way is better to insert programs.
    My data is full EPG for one week for all my channels. So it's 10-50 k records. Should I do it once for all programs or maybe better split insertion process by channels?
    Also since my data is full week EPG I have a problem with db updating. Insertion in clean db takes several seconds but the same data could take several hours to insert in full db because of tvserver's deduplication process. So I assume I should clear db before every import with layer.RemoveAllPorgrams(idChannel) but iteration thought all channels deleted all data in db in act but looks like tvserver doesn't know about it/ Shouls I use new tvbusinesslayer for inserting to exclude deduplication or what?
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    I suggest you try to write a WebEPG grabber... and if you can't do that, generate an XMLTV file that can be imported by the XMLTV plugin.
     

    Edalex

    Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,922
    1,228
    Saratov
    Russian Federation Russian Federation
    Country flag
    I suggest you try to write a WebEPG grabber... and if you can't do that, generate an XMLTV file that can be imported by the XMLTV plugin.
    Right, XMLTV...
    I can make XMLTV Export but it will be 2 additional conversions (raw data ->xml in my plugin and xml->raw data in xmltv) in which I don't see any benefits but it will produce some problems with escaping/formatting data for xml compliance. First I thought I could use xmltv scheduler for importing my plugin's files in such case but now I realize I still need a trigger for my plugin execution.
    But since xmltv file is similar to mine (one file for all week for all channels) I'll look into its code for importing.
    WebEPG is not the option since a) it's ugly to use parsing for API b) I need to make some advanced data modofication like splitting episodes which is not possible with WebEPG.
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    I can make XMLTV Export but it will be 2 additional conversions (raw data ->xml in my plugin and xml->raw data in xmltv) in which I don't see any benefits but it will produce some problems with escaping/formatting data for xml compliance.
    If you convert to XMLTV, it enables standard tools to be used for data enriching (adding series + episode info).

    First I thought I could use xmltv scheduler for importing my plugin's files in such case but now I realize I still need a trigger for my plugin execution.
    The PowerScheduler plugin can do the triggering.
    The XMLTV plugin will automatically import when it detects the file change.

    WebEPG is not the option...
    Did you think of improving it?
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    T I cannot get a basic media import-what is the best configuration? General 10
    G How best to get cover art for tracks to show up on the Audio Menu (Latest Added, Unplayed)? General 9
    G Best version of mp so far General 4
    KlausWirn Best Practise Codecs (free) Codecs, External Players 0
    R MP 2.2.3 Search TV program only with the correct begin of show title General 7
    J [solved] Newbie to MediaPortal 2 - Cannot open/run TV programs Newcomers Forum 4
    R Visual status of watched TV programs MediaPortal 1 Talk 2
    A [solved] Cant see all recorded programs General 9
    L [solved] Modifying programmed recording after setting it General 0
    G Switch to new channel at begining of program automatically Feature Requests 0
    johns11 Multiple programs responding to IR commands since upgrade from 1.12 Remotes 3
    K How to start Chrome or other programs MediaPortal 1 Talk 41
    drumrob Time and Genre overlap in program description 1.22 Pre Release 4
    N [Finished] [MP2-806] Playing a recorded radio program does not show screen to allow skipping forward, etc MediaPortal 2 141
    N [Finished] MP2-803 - Delete full series doesn't work when viewing a program in the extended schedule screen MediaPortal 2 12
    N What do the series recording options mean, and why is MP2 recording random programs? General 3
    M Problem With Sending Channel to External Program from TV3 Blaster IR Server Suite (IRSS) 1
    M Forwarding Cmd Line Arg in IRSS Run Program MediaPortal 1 Plugins 0
    A UK - BBC2 EPG suddenly has several programs daily with 'No information' Electronic Program Guide 57
    A [solved] XmlTv not importing programs General 8
    J Option to rename the programs during advance scheduling Feature Requests 0
    H [fixed] Series programming/deleting 2.2 Archive 1
    S Why open source fails and Integration wins for complex programs General 15
    Alberto83 [Evaluate] {Program Title} is starting Reminders MediaPortal 2 5
    T Moving Pictures Icon disappeared...and the program....??? Watch / Listen Media 1
    Similar threads

























    Top Bottom