[Pending] - Timeslot for DVB EPG Grabbing

Discussion in 'Submit: code patches (MediaPortal/TV-Server/etc.)' started by Kasimir9735, August 18, 2011.

  1. Kasimir9735

    Kasimir9735 Portal Pro

    Joined:
    July 19, 2010
    Messages:
    36
    Likes Received:
    19
    Gender:
    Male
    Location:
    Wetter (Ruhr)
    Ratings:
    +23 / 0
    Home Country:
    Germany Germany
    Sometimes i was wondering why my HTPC doesn't shut down even when i am not watching tv. Standing in the Home-Screen. PowerScheduler setted to 5 minutes. After analyzing the logs i see that the DVB EPG Grabber prevents the system to go into standby. So i looked for a way to tell Mediaportal to grab EPG only at night.

    What is done:

    - New config option in DVB-EPG Grabber page in TVService
    * Use Timeslot for EPG grabbing (as a checkbox)
    * Not before (as a DateTime Picker with Time-Only Option)
    * Not after (as a DateTime Picker with Time-Only Option)



    - Implementation of this functionality

    If the checkbox is set (Use Timeslot) and the current time is NOT between "Not before" and "Not after" then the DVB EPG Grabber won't start grabbing EPG or (if already running) finishes the current grab on the actual transponder and then stops grabbing

    If the checkbox is not set all remains as always


    I saw a code fragment like this in _epgTimer_Elapsed(...) which starts the grabbing of EPG:

    if (_tvController.AllCardsIdle == false)
    return;

    I think this is a error, because i think the grabbing can start when minmum of 1 Card is Idle. This code supresses the grabbing if i have 2 Cards and only 1 Card is idle. What do you think about it?

    Patch is for SVN-Revision 28137
     

    Attached Files:

    Last edited by a moderator: March 15, 2013
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. disaster123
    • Premium Supporter

    disaster123 MP Donator

    Joined:
    May 14, 2008
    Messages:
    3,546
    Likes Received:
    417
    Ratings:
    +431 / 2
    Home Country:
    Germany Germany
    AW: Timeslot for DVB EPG Grabbing

    What happens if you have 4 cards. 3 are recording - one card is idle and starts grabbing EPG and then starts timeshift or another recording?
     
  4. Kasimir9735

    Kasimir9735 Portal Pro

    Joined:
    July 19, 2010
    Messages:
    36
    Likes Received:
    19
    Gender:
    Male
    Location:
    Wetter (Ruhr)
    Ratings:
    +23 / 0
    Home Country:
    Germany Germany
    AW: Timeslot for DVB EPG Grabbing

    As you can see in the code. Same behaviour. It doesn't make a difference how many cards you have.
    The current statement in SVN says: Only do EPG if ALL CARDS ARE IDLE.

    I don't have analysed how mediaportal handles running EPG grabbing when a new recording is started, but thats no the focus of this change. I'm going too look for this in the future and maybe submit another patch if it is nessecary
     
  5. disaster123
    • Premium Supporter

    disaster123 MP Donator

    Joined:
    May 14, 2008
    Messages:
    3,546
    Likes Received:
    417
    Ratings:
    +431 / 2
    Home Country:
    Germany Germany
    AW: Timeslot for DVB EPG Grabbing

    Oh it def. has an influence imagine my example and the old behavior in that case no epg grab would run. So it can't be a problem.
     
  6. Kasimir9735

    Kasimir9735 Portal Pro

    Joined:
    July 19, 2010
    Messages:
    36
    Likes Received:
    19
    Gender:
    Male
    Location:
    Wetter (Ruhr)
    Ratings:
    +23 / 0
    Home Country:
    Germany Germany
    Yes. I agree. But that's not the perfect solution. That would be:
    If one card is idle then start RPG grabbing. When afterwards a recording starts and no cards are idle but one card is grabbing epg then stop grabbing epg and start the recording. What's the problem with this? But once again: That's not the focus of my change. My change doesn't affect the current behaviour (even if i think its buggy). I'll implement the correct behaviour in a seperate patch.
     
  7. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    IF EPG grabbing prevents a recording or timeshift to occur, then the behaviour is wrong IMHO. Recording or timeshifting should ALWAYS have priority over EPG grabbing. If the grabber is active then TV-server should kick it.

    Either way, I like the option to grab EPG at a certain timeslot. Even though I only allow my EPG to be grabbed when no timeshifting/recording is done.
     
  8. doveman

    doveman Portal Pro

    Joined:
    February 12, 2008
    Messages:
    2,326
    Likes Received:
    166
    Ratings:
    +182 / 3
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    This would be great if it can be set to wake and grab the EPG even if the "Grab when idle" option is disabled, as some people have problems with that enabled (or just prefer to turn it off) but would still like their EPG to be kept updated, even if they don't watch TV for a while.
     
  9. Kasimir9735

    Kasimir9735 Portal Pro

    Joined:
    July 19, 2010
    Messages:
    36
    Likes Received:
    19
    Gender:
    Male
    Location:
    Wetter (Ruhr)
    Ratings:
    +23 / 0
    Home Country:
    Germany Germany
    Please read my first post. As I can see pilehave and disaster123 don't understand what the patch is for. The discussion of them is going in a totally wrong way. doveman ist the first one who has discovered the functionality of the patch. So use it. It does exactly that what you want.

    Besides... The patch is in status pending... ??? Long time ago since i posted it. Is this OpenSource or Microsoft Development ???
     
  10. jameson_uk
    • Premium Supporter

    jameson_uk Retired Team Member

    Joined:
    January 27, 2005
    Messages:
    7,258
    Likes Received:
    2,228
    Gender:
    Male
    Occupation:
    Data Warehousing Consultant
    Location:
    Birmingham
    Ratings:
    +2,405 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    The patch is simply limiting when EPG grabbing takes place? On its own I am not sure how useful this is (would have thought many users put their machines to sleep when not in use) but waking the machine for EPG grabbing would mean it would need to actually grab at this time but then you are into the problems mentioned above.

    Does this limit both idle and timeshifting grabbers? (trying to think of a good reason to limit why the timeshifting grabber should be limited)

    Just thinking that user could schedule EPG to only run 06:00 to 06:30 but a recording schedule could kick in and then user could end up never grabbing EPG.

    The real solution to this is to actually fix the EPG grabber stability (which is something we are looking at for 1.3) then limiting when grabbing happens should not really matter
     
  11. doveman

    doveman Portal Pro

    Joined:
    February 12, 2008
    Messages:
    2,326
    Likes Received:
    166
    Ratings:
    +182 / 3
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    But what about the scenario of a user who doesn't use MP to watch TV very often (maybe watches videos/listens to music) but wants to use it to record TV sometimes. Therefore they need the EPG to be kept up-to-date, and if "Grab when idle" is disabled for whatever reason it never will be. So if there was an option to update at e.g. 06:00 (which ignores/overrides the "Grab when idle" option) this would sort that out, without having to allow MP to grab the EPG whenever it feels like.

    As for what happens if the tuner is busy at that time, I'd suggest that a "If busy, perform grab as soon as possible" function would cover that, so if there is a recording being done at 06:00, once that's finished the grab would be done before the system was allowed to go back into standby (according to whatever the Windows/Powerscheduler settings are).

    Perhaps this will all become unnecessary with 1.3, but if this can be done in the meantime it can always be removed once it becomes unnecessary.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!