Improved Weekly / Daily recording algorithm (1 Viewer)

dvdfreak

Portal Pro
June 13, 2006
979
178
Home Country
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
    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
    Home Country
    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
    Big but again unfortunately: What if guide data isn't available for any reason?
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Home Country
    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
    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
    Home Country
    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
    Home Country
    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

    Top Bottom