Recordings are namend "manuel" when EPG importer is running (1 Viewer)

rtv

Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    AW: Re: Recordings are namend "manuel" when EPG importer is running

    Here is the patch on SVN24580.

    Thank you for this! I've just reviewed your changes and think there's only a fairly low risk to add them to SVN.

    There's just one issue which Ghose found in the existing TvMovie implementation as well:
    "Channel sharing" is broken.
    For one MP channel (which you identify by its ID only) there could be several EPG source channels.
    The real world scenario is the following: especially via cable tv there are channels which broadcast two stations - e.g. a children program in the morning and a news program in the afternoon (The corresponding sat channels would just show an "off air" sign outside of this broadcasting time frame).

    So you just imported station 1 and when the data for station 2 on the SAME channel ID is imported then the already present EPG for station 1 will be deleted again.
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    Thanks for pointing this out. It seems I tend to always forget about merged channels.:oops:

    Currently the situation regarding the deletion of old programs is as follows. There are 3 options:
    A. Delete all old programs in the channels being imported
    B. Delete only old programs that would otherwise overlap newly imported programs.
    C. Do nothing. Any newly imported programs overlapping old ones will simply not be imported (i.e. only add new programs, do not update existing ones)

    WebEPG supports options A, B and C.
    XMLTV supports options A and C.
    TvMovie, IIRC, supports only A.

    Option A is problematic with merged channels because the deletion has to be done only once for each channel but insertion of new programs may be necessary to be done in multiple batches (one for each channel part). This makes it impossible to put the deletion and all related insertions in a single transaction. At best it is possible to nest the deletion and the 1st batch of inserts in a transaction while leaving the rest of the insertion batches each to their own transaction.

    This brings me to my question: Is option A really needed? Can't we use option B instead?
    Since old programs that are in the past are always deleted anyway, I see no benefit of A over B. In fact B makes sure that if something goes wrong and we have no new data, old program data is kept until the problem is resolved.
     

    GhoSe

    Portal Pro
    December 17, 2007
    334
    47
    Berlin
    Home Country
    Germany Germany
    The problem with B could be if someone changes the channel mapping, but I'm not sure...

    arion_p, have a look at my post here. Thats a little patch I made for 1.0.2. This should be comparable with your transaction approach. This change makes sure that in one import the program of every channel is only cleared ones.
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    GhoSe:
    I don't speak German, so I don't understand anything in the thread you posted but I took a look at your patch. While your patch solves the issue with merged channels, it does not solve the original problem: the deletion of old program data and all inserts of new program data for a channel should be in a single transaction, otherwise there is a small time window during which EPG for that channel is empty or incomplete.

    Regarding option B, I don't see how this can be a problem. After the mapping changes, if grabbing of new program data does not fail, new program data will practically overwrite existing ones at least from the current time and onwards. There may be leftover program data from the old mapping, but these will be for past programs and cannot affect the scheduler and/or recordings. In the end, after a day or two these will be gone too, as before each grab all programs before a certain number of days (EPG Keep Days) in the past are always removed.
     

    rtv

    Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    AW: Re: Recordings are namend "manuel" when EPG importer is running

    Regarding option B, I don't see how this can be a problem.
    In the end, after a day or two these will be gone too.

    Correct - can't wait to see your approach for "B" :)
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    New patch and binaries attached.
    Also if someone has a slower machine nad can test, it would be helpful to verify that none of the grabbers has increased CPU usage compared to the SVN versions.
     

    Attachments

    • 0002587 - Recordings are named manual if started when EPG importer is running - SVN 24537.patch
      30.9 KB

    GhoSe

    Portal Pro
    December 17, 2007
    334
    47
    Berlin
    Home Country
    Germany Germany
    @GhoSe:
    I don't speak German, so I don't understand anything in the thread you posted but I took a look at your patch. While your patch solves the issue with merged channels, it does not solve the original problem: the deletion of old program data and all inserts of new program data for a channel should be in a single transaction, otherwise there is a small time window during which EPG for that channel is empty or incomplete.

    I know. Just meant that you maybe could integrate this too. Because the transaction should not fix the problem with the merged channels.

    Example:
    Transaction start -> MP Chan X clear -> import from Chan Y -> MP Chan X clear -> import from Chan Z -> Transaction finished

    After the transaction has finished the "MP Chan X" still doesn't contain all data it should.
    You see? Or did I miss something?

    EDIT: OK when using the approach B, this isn't a problem... Sorry.
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    AW: Recordings are namend "manuel" when EPG importer is running

    @arion
    I've still problems. Attached are logfiles from yesterday the recording at 20:00 / 19:55 is again named manual :-( can someone look at the logs?
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    From your logs I don't see any TvMovie EPG update activity. If these recordings are on channels updated through DVB-EPG, they are not affected by this patch. DVB-EPG updating is handled differently.

    PS: I haven't looked at the DVB-EPG update code at all and cannot comment on it.
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    AW: Recordings are namend "manuel" when EPG importer is running

    thanks for looking into my code. Mhm i'm also using DVB-EPG Update cause i can't grab all channels via TVMovie BUT i've only selected try to fill holes i've NOT selected update existing entries. So as i understand this correct - this channel shouldn't be updated through DVB-EPG. Do you have ANY idea why still my recording is named manual? :-( i've no idea...
     

    Users who are viewing this thread

    Top Bottom