Hi,

I'm seeing some problems with the sorting of Videos in Tree (List?) mode

I have my videos arranged on Disk something like this....

<VideoStartupDir>/tv/A Series/Zoo .avi
<VideoStartupDir>/tv/A Series/Blah .avi
<VideoStartupDir>/tv/Another Series/Fred.avi
<VideoStartupDir>/tv/Another Series/John.avi
<VideoStartupDir>/tv/Later Series/Aardvark.avi
<VideoStartupDir>/tv/Later Series/Michael.avi


This works fine in File browse mode, but in Database mode...

if I filter on title this leads to the following structure

tv -
     Later Series
       - Aardvark.avi
       - Michael.avi
     A Series
       - Blah.avi
       - Zoo.avi
   - Another Series
       - Fred.avi
       - John.avi

because the SQL OrderBy Title doesn't take into account that I want to order by title within a directory, or order the containing directories.

At the end of VideoTree::buildVideoList I see this

    video_tree_list->assignTreeData(video_tree_root);
    video_tree_list->sortTreeByString();
    video_tree_list->sortTreeBySelectable();

which suggest that the video_tree_list (a UIManagedTreeListType) should be sorted by The String value as desired.

Poking around the code this delgates to GenericTree::sortByString.

I suspect that UIManagedTreeListType should have an additional method

sortByAttributeThenByString() which delegates to GenericTree::sortByAttributeThenByString

which is then called at in VideoTree.

Does this sound reasonable? I'll knock up a couple of patches to MythTv and MythVideo

Neale Swinnerton




_______________________________________________ mythtv-dev mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to