Best way to insert programs in database (1 Viewer)

Edalex

Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,928
    1,234
    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,577
    8,221
    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,928
    1,234
    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,577
    8,221
    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

    Similar threads
    OP Title 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
    K MediaPortal 2.3.1 live tv freezes when inserting a usb memory stick or when mounting an external drive General 8
    ge2301 MP2 - V2.4 [MP2-867] Dynamic font scaling for EPG programs in relation to number of rows MediaPortal 2 2
    T MP2 - V2.3.2 Recorded TV Program Won't Delete Submit: Bug Reports 3
    G MP2 - V2.3 Is it possible to program buttons like in MP1? General 2
    U [Bug] Unhandled Exception on exiting program and occasional system error on starting program Submit: Bug Reports 17
    C MP2 - V2.3 Nereus: EPG context menu not available anymore at a running program General 8
    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 7
    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 60
    A [solved] XmlTv not importing programs General 8

    Similar threads

    Top Bottom