[mythtv] Re: Sort by programid bug

John Patrick Poet john at BlueSkyTours.com
Wed Feb 9 05:39:43 UTC 2005


Bruce Markey wrote:

>> mythtv/programs/mythfrontend/playbackbox.cpp
>> 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;
>    oldsTitle.remove(prefixes);
>    titleIndex = titleList.count() - 1;
>    for (int i = titleIndex; i >= 0; i--)
>    {
>
>        sTitle = titleList[i];
>        sTitle.remove(prefixes);
>
>        if (oldsTitle > sTitle)
>            break;
>
>        titleIndex = i;
>
>        if (oldsTitle == sTitle)
>            break;
>    }
>
> 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.
>
> --  bjm
>

I just submitted a patch which fixes the problem that I am seeing.  
However, after reading your description I am not sure it is the same 
problem you are seeing.  If this patch does not fix it for you, can you 
give me some more details?

Thanks,

John



More information about the mythtv-dev mailing list