[mythtv] Sort by programid bug
bjm at lvcm.com
Tue Feb 1 22:22:49 UTC 2005
> John Poet's patch to allow sorting of episodes by programid
> instead of recording date.
John, sorry I didn't look at this before it went in but in
playing with it now, I've found a significant bug. After
playing a file then exiting playback, it does not find it's
matching item in the list and the selection highlight seems
to always fall to the last item on the list.
I think what needs to be addressed is in the section starting
around line 1234:
// Try to find our old place in the title list. Scan the new
// titles backwards until we find where we were or go past. This
// is somewhat inefficient, but it works.
QString oldsTitle = oldtitle;
titleIndex = titleList.count() - 1;
for (int i = titleIndex; i >= 0; i--)
sTitle = titleList[i];
if (oldsTitle > sTitle)
titleIndex = i;
if (oldsTitle == sTitle)
This loop is geared to match a list sorted by title but you need
some sort of "if (episodeSort == "Id")" variation that loops
over programid. This means that you'll probably need some sort
of programidList also.
More information about the mythtv-dev