[mythtv-users] Recording rankings bug...?

Axium Computer Services axium at axiumcomputerservices.com
Fri Dec 19 00:14:26 EST 2003


Bruce Markey wrote:

> Tony Maro wrote:
>
>> Here's one for you:
>>
>> 12/21 7-9PM Charmed   rank +1
>> 12/21 7-7:30PM Simpsons rank -1
>> 12/21 8-8:30PM Malcom rank -1
>> 12/21 8-10PM Christmas Shoes rank +2 (one time recording)
>
>
> [check out "mythbackend --printsched" or "mythbackend -v schedule"]
>
>> Only the last one gets recorded.
>> All the rest say a program with a higher priority is scheduled.
>>
>> What _should_ happen is that Simpsons gets recorded and the rest are 
>> trumped.
>>
>> Shoes of course would trump Charmed.  This leaves from 7-8 still 
>> open.  Simpsons should record.
>
>
> It should but that would make the game of Tetris that the
> scheduler is playing much more complex. This is a good
> example because it is simply one tuner and a small number
> of overlapping shows. With three more tuners, two or more
> video sources and lots of shows, things get much more complex
> but myth does a pretty good job.
> Currently, it works it's way forward in time. When it finds
> another overlapping show it compares the currently placed one
> with the next item and swaps them if the new item should win.
>
> What happened is that Charmed won over the Simpsons then
> Charmed lost to Christmas Shoes. It would have needed to go
> back an revisit Simpsons again in some sort of recursive
> process. The problems with that are that this might make the
> scheduler significantly slower and this might lead to infinite
> loops unless there was some really slick flagging.
>
> Another approach would be to first compare all the titles in
> the record list (before ever looking at any specific showings)
> and sort them highest to lowest. First, place all the episodes
> for the highest title for the whole period of the listings. Next place 
> all of the episodes for the second title, etc. As
> it got around to a lower ranked show and all cards were assigned
> for the timeslot, that showing wold lose. This would have an
> advantage where the first, second and third preference would go
> the cards 1,2 and 3 respectively (currently only the highest
> show gets the best card and the others are happenstance). The
> exceptions being where cases like yours would allow Tetris to
> slip a lower show onto a higher card if it fits.
>
> In your example, Christmas Shoes would be first and win then
> Charmed would lose then Simpsons would fit and win then Malcolm
> would lose.
>
> However, the scheduler currently does something slick with
> multiple showing of an episode. If an earlier showing is at
> the same time as other things to record but a later showing is
> isolated. it will record the isolated showing even if it is
> the higher ranked show in the earlier timeslot. This reduces
> the crunch at crunch time and may allow recording things that
> you may not otherwise get. I don't know if this could be done
> as easily if it hasn't considered the possibility of lower
> shows before placing.
>
> Also, say cards 1 and 2 have cable inputs and card 1 also has
> a digital cable box on s-video with sourceid 2. If I understand
> the code correctly, the scheduler can determine if a showing
> can be moved to another input or not. If there is a higher
> ranked analog show it gets placed on card 1. If a lower ranked
> digital channel show comes along, the scheduler sees that it
> can move the analog show to card 2 but not the digital show so
> that's what it does. Again, this wouldn't work if the highest
> was strictly placed. Allowing any exceptions for swapping would
> fall right back into possible infinite recursive Tetris.
>
>> Of course I can intervene and set it the way I want, but it would 
>> have been nice if Myth had figured out it didn't need to cancel all 
>> three to get the one it wanted.
>
>
> Assuming you're using 0.13, it is kind of a nasty situation.
> Since you have 3 that lose by ranking you don't get any override
> buttons to either mark Simpsons as "Record it anyway" or to mark
> Charmed as "Don't record it". That sucks. You could lower the
> priority for Charmed or raise the priority for The Simpsons
> temporarily then change it back later (note to David and Chris,
> here is a situation where it would be nice to have an easy way
> to set a Single Overlap to raise the priority on this one showing
> of the Simpsons).
>
> --  bjm
>
>------------------------------------------------------------------------
>
>_______________________________________________
>mythtv-users mailing list
>mythtv-users at mythtv.org
>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>  
>

Disclaimer:  I have not looked at the code or even installed myth yet 
(waiting for hardware), so the conflict resolution may already work the 
way I am about to describe.

Here is a possible solution to improve the quality of conflict resolution.

Lets take the example that Tony posted:
12/21 7-9PM Charmed   rank +1
12/21 7-7:30PM Simpsons rank -1
12/21 8-8:30PM Malcom rank -1
12/21 8-10PM Christmas Shoes rank +2 (one time recording)

Run one pass of the scheduler as it is currently designed to determine 
what should be recorded,  then proceed to create a "table" (database or 
otherwise) containing a list of the times the tuner still has open.

   7-7:30   |   7:30-8   |   8-8:30   |   8:30-9   |   9-9:30   |   
9:30-10   |
     open    |    open    |   used       |   used      |   used      |   
used        |

Then re-evaluate which shows not already set to record will fit in the 
free space:

Will Charmed Fit?    No.
Will Simpons Fit?     Yes.
Will Malcom Fit?      No.

If there were more than one yes in the evalution those would then be 
evaluated on rank.

Rinse, Lather, Repeat untill all unscheduled shows return "No".


So there is my idea.

Also can anyone point me at the code that deals with the scheduler?

Thanks

Steven Potter








More information about the mythtv-users mailing list