[mythtv-users] Dynamic priorities?

chris at cpr.homelinux.net chris at cpr.homelinux.net
Thu Sep 21 19:40:43 UTC 2006


A while ago there was a discussion about adding a little more 
intelligence to the priority system for scheduling recordings.  Has 
anyone done any work in that direction?  A somewhat revised recap 
of what I had suggested:

1) Add a per-rule flag to "Use dynamic priorities".
2) If a rule has a "maximum episodes" value and dynamic priorities 
is enabled for that rule, progressively lower the priority of that 
rule according to how many episodes are present.

The rationale is that in cases where two shows are always in 
conflict, Myth's scheduling system will always pick one over the 
other even if they have the same priority.  If I tell Myth to 
record 20 episodes of "The Simpsons" and 20 episodes of "South 
Park" and put them at the same priority then if they are scheduled 
opposite each other I'll end up with 20 of one show before it will 
even consider recording the other.  Even when shows have different 
priorities, that says more about what I want to watch *first*, not 
what I want to watch *all the time*.  That 20th episode of "The 
Simpsons" is worth a lot less to me than the 10th and *much* less 
valuable than the first episode of "South Park" when I have 
absolutely none of the latter.  Having dynamic priority would also 
allow us to give one series a head-start in the schedule but allow 
it to give way to lower-priority shows once a few episodes were on 
disk.

*How* to decrease the priority is still a good topic for 
discussion.  A logarithmic adjustment where the priority reaches 
zero as the maximum episodes count is reached would be ideal, but 
it would probably be easier to code a simple "effectivepriority = 
startingpriority - episodecount" adjustment.  This would mean that 
if "The Simpsons" had a starting priority of 10 and "South Park" 
had a starting priority of 6 then Myth would record 4 episodes of 
"The Simpsons" before starting to trade places with "South Park" in 
the scheduled recordings list.

Yes, this system would cause the "upcoming recordings" list to 
change frequently as each recording and deletion would cause the 
conflicts to be resolved differently.

When I suggested this last time it was in the context of a global 
policy instead of a per-rule setting, and was shot down by people 
who watch series that have linear storylines (like "24").  Of 
course, it could still be implimented as a global rule if the 
priorities of the rules were far enough apart or if it only applied 
to rules that have a maximum episodes value.  Having it as a global 
value would be easier as the recording rules UI wouldn't have to 
change.

I wonder if Isaac has ever considered making the various core 
elements of MythTV call-outs (like the call-out to 
mythfilldatabase)?  It would make prototyping changes to the 
scheduler, auto-expiry, etc. easier as we could write our own 
scripts for mangling the SQL rather than having to recompile the 
backend every time.



More information about the mythtv-users mailing list