Improved Weekly / Daily recording algorithm (1 Viewer)

dvdfreak

Portal Pro
June 13, 2006
979
178
Belgium Belgium
Hi,

I've taken my hands off it again as my changes were indeed not correct. FYI: I've reverted to the old code in current SVN, but IMHO the determination of whether or not a schedule is due should be a whole lot different for PowerScheduler to ever work with these.

I don't want to duplicate code across several areas either and that's why I started working on it. But the way things are now, that routine is too much based on "is it on now?" which of course can never work with PS. So, unfortunately it looks like I'm gonna have to re-invent the wheel anyway, since PS only cares about correct wakeup times for recordings.

Kind regards,
Michel
Hmmmm... OK, I see.

In the TVDatabase BusinessLayer there's a GetRecordingTimes() method which returns a chronological list of all upcoming recordings. I don't know the first thing about how PowerScheduler works, but can't this be used to provide it with the correct wake-up times?
 

scoop

Retired Team Member
  • Premium Supporter
  • November 14, 2004
    614
    7
    Country flag
    Hi dvdfreak,

    Yes, you are right - this method does provide an easy way to determine the first upcoming schedule. Unfortunately this method only works if you got guide data for all upcoming recordings. Of course there's no guarantee for that.

    So, if that's the case, I think PowerScheduler should fall back to determination of next schedules without using guide data. This is exactly what I was trying to do. If you've got any suggestions they're greatly appreciated :). But from what I've found I will have to write that part another time.

    Kind regards,
    Michel
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Belgium Belgium
    Hi dvdfreak,

    Yes, you are right - this method does provide an easy way to determine the first upcoming schedule. Unfortunately this method only works if you got guide data for all upcoming recordings. Of course there's no guarantee for that.

    So, if that's the case, I think PowerScheduler should fall back to determination of next schedules without using guide data. This is exactly what I was trying to do. If you've got any suggestions they're greatly appreciated :). But from what I've found I will have to write that part another time.

    Kind regards,
    Michel
    Good point! In fact, it sounds like PowerScheduler should wake up a full hour before such an "unclear" recording (if guide is not available) and then check if a "real" time is known by now. I would think it's better to wake up a bit early rather than miss a recording :)

    BTW, does will never really work with "Everytime On This Channel", right?

    Did I dream it that PowerScheduler had an option to wake up and get new guide information? :) Because in that case, right after updating the guide all "real" times would be available, then there'd be no need to wake up an hour early e.g.
     

    The_Stig

    Retired Team Member
  • Premium Supporter
  • April 5, 2005
    2,176
    428
    Country flag
    Big but again unfortunately: What if guide data isn't available for any reason?
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Belgium Belgium
    Big but again unfortunately: What if guide data isn't available for any reason?
    Then you could still fallback (as the recording engine does) on the calculated weekly/daily times. And if the guide *is* available again on the next wakeup, then the times will be re-adjusted again.

    I think that in practice this should work fine, as you typically get/update guide information every day, and for several days in advance. So a dropout in the guide info shouldn't immediately create a problem, you have some sort of buffer there.
     

    scoop

    Retired Team Member
  • Premium Supporter
  • November 14, 2004
    614
    7
    Country flag
    Hi,

    Yes, PowerScheduler for tve3 can wakeup the computer for guide updates. The "every time on this channel" and "every time on every channel" recording types of course are impossible without guide data. I think that both the "fallback to date calculation if no EPG data present" and EPG grabber wakeup options should be able to cover most of the cases. Hopefully I'll have some time this weekend to write the code for wakeup date calculations. EPG guide updates would then still make it possible to find out if the exact date/time for a recording has been adjusted.

    Kind regards,
    Michel
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Belgium Belgium
    Hi,

    Yes, PowerScheduler for tve3 can wakeup the computer for guide updates. The "every time on this channel" and "every time on every channel" recording types of course are impossible without guide data. I think that both the "fallback to date calculation if no EPG data present" and EPG grabber wakeup options should be able to cover most of the cases. Hopefully I'll have some time this weekend to write the code for wakeup date calculations. EPG guide updates would then still make it possible to find out if the exact date/time for a recording has been adjusted.

    Kind regards,
    Michel
    Sounds good!
     

    MrWorf

    Portal Pro
    August 15, 2006
    50
    0
    *bump* any news on this? Am I understanding this correctly that this fix/change only makes MP adjust it's schedule +/- 30min to get the specified show? How about shows that are scheduled "Anytime on this channel" or "Anytime on any channel" ? Will it fix the problems with those aswell?
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Belgium Belgium
    dvdfreak,

    hopefully you're still watching this thread. We have some more issues with the fuzzy stuff. Maybe you could have a look at http://mantis.team-mediaportal.com/view.php?id=1022 and tell us your opinion.

    Regards
    Hmmmm, yes, interesting problem. Two shows with the same name, next to each other.

    So I guess the algorithm needs to be refined to, in case of doubt, pick the show that is closest to the original starting time. This can be trickier than it sounds since as I remember MediaPortal checks internally if a program needs to be recorded or not, without immediate relation to the program before or after it.

    I'll have a look!

    In the mean time: suggestions, remarks,.. are more than welcome.
     

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

    OP Similar threads Forum Replies Date
    ajs [Proposal] Improving the MP1 Small Splash Screen, providing nicer Image :) MediaPortal 1 3
    da3dsoul Improve NAS Discovery MediaPortal 2 11
    horned_reaper [solved] Improved MBID Search for Artist and Album Fanart Handler 106
    ajs [fixed] 5022: Improving the MPE Installer, providing nicer GUI :) MediaPortal 1 42
    doskabouter Small code improvements MediaPortal 1 8
    ajs [fixed] 5015: Improving the MP1 installer, providing nicer GUI :) MediaPortal 1 138
    doskabouter Exceptions found due to improved logging General Support 11
    CyberSimian [fixed] MP1-4990 : Improve horizontal scrolling in the EPG MediaPortal 1 10
    ge2301 Bugs and Improvements Nereus 6
    N [Proposal] How to improve series scheduling MediaPortal 2 72
    ge2301 [Finished] [MP2-776] Improve busy screen appearance MediaPortal 2 14
    B [MP2-772-773] improve busy cursor and settings loading Testing Area 10
    azzuro [Help Me!] Improve duration times of GUI List items MediaPortal 2 37
    Alberto83 [Finished] [MP2-752] Improve recording handling MediaPortal 2 34
    D Display Day of week in TV Guide? Feature Requests 0
    G Q about scheduling weekly series when epg lists duplicate back to back episodes each week General Support 2
    B [fixed] [MP2-767] Disappearing Daily/Weekly Recording Schedules 2.2 Archive 7
    A UK - BBC2 EPG suddenly has several programs daily with 'No information' Electronic Program Guide 57
    Top Bottom