[mythtv-commits] mythtv commit: r7895 by bjm

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Wed Nov 16 02:16:39 EST 2005


      Author: bjm
        Date: 2005-11-16 07:16:39 +0000 (Wed, 16 Nov 2005)
New Revision: 7895
   Changeset: http://cvs.mythtv.org/trac/changeset/7895

Modified:

   trunk/mythtv/libs/libmythtv/proglist.cpp

Log:

Closes #620

Improved lists when sorted by title. The New Titles page and
any proglist sorted by title selects one representative row
per title. This should be the earliest showing, however,
MySQL's "GROUP BY" does not assure that the first starttime
will be chosen. "ORDER BY" after the fact will only sort the
possibly incorrect rows chosen by "GROUP BY". Therefore, all
matching rows need to be SELECTed then the best row can be
chosen in memory.

The steps to fill the lists have been restructured. All
matches are found with no GROUP BY. All lists, regardless of
type are loaded into the sortedList. For plNewListings or
titleSort, the list is sorted by title with the "best"
showing first. The list is then pruned to leave just these
"best" time slots. If titleSort is false, the list is sorted
by time. Finally they are loaded back into itemList either
forward or reverse depending on reverseSort. This means the
sort functions don't need a reverse flag as the lists are
forward until the very end.

When comparing two titles that are the same, the "best"
showing is, if the recstatus is the same, the earliest
starttime. Or, the one that is recording, or the one that
will record, or the earliest starttime. The result is that a
recording in progress will be chosen, or else the earliest
rsWillRecord, or else the earliest showing.

So, I record several Reality series. If I go to Search
Lists->Categories, choose Reality and press "2" for Title
sort, all the titles where I have upcoming recordings appear
in green even if it is not the very next showing that will
record. Also, the New Titles lists will now be sure to show
the earliest showing for each title except when a later
showing has been chosen to record.

Thanks to Hal Burch for his input.





More information about the mythtv-commits mailing list