(2012-10-30, 01:41)jmarshall Wrote: So the problem is it ends up sorting using VIDEO_TS.IFO?
Perhaps an example listing in the order it's sorted by label + file may help explain the problem?
yes
what follows is from my log Movies6 is without the "movies in separate folders option and Movies - in folders is with).
Its a bit confused and dense, but you get the idea
First as it is and then with my change. What you would see in list mode in the first case is AVATAR, DVD2.iso, kill bill, MOMMO, Artifical intelligence and so on for the others
20:58:09 T:140603707533184 DEBUG: CGUIMediaWindow::GetDirectory (/xbmc/xbmc/test/Movies6/)
20:58:09 T:140603707533184 DEBUG: mike
ort item /xbmc/xbmc/test/Movies6/AVATAR/ sort key AVATAR 0
20:58:09 T:140603707533184 DEBUG: mike
ort item /xbmc/xbmc/test/Movies6/DVD2.iso sort key DVD2.iso 0
20:58:09 T:140603707533184 DEBUG: mike
ort item /xbmc/xbmc/test/Movies6/kill bill/ sort key kill bill 0
20:58:09 T:140603707533184 DEBUG: mike
ort item /xbmc/xbmc/test/Movies6/MOMMO/ sort key MOMMO 0
20:58:09 T:140603707533184 DEBUG: mike
ort item /xbmc/xbmc/test/Movies6/Artifical intelligence/VIDEO_TS/VIDEO_TS.IFO sort key VIDEO_TS.IFO 0
20:58:13 T:140603707533184 DEBUG: CGUIMediaWindow::GetDirectory (/xbmc/xbmc/test/Movies - folders/)
20:58:13 T:140603707533184 DEBUG: mike
ort item /xbmc/xbmc/test/Movies - folders/AVATAR/ sort key AVATAR 0
20:58:13 T:140603707533184 DEBUG: mike
ort item /xbmc/xbmc/test/Movies - folders/MOMMO/DVD.iso sort key DVD.iso 0
20:58:13 T:140603707533184 DEBUG: mike
ort item /xbmc/xbmc/test/Movies - folders/DVD2.iso sort key DVD2.iso 0
20:58:13 T:140603707533184 DEBUG: mike
ort item /xbmc/xbmc/test/Movies - folders/kill bill/jaws.mp4 sort key jaws.mp4 0
20:58:13 T:140603707533184 DEBUG: mike
ort item /xbmc/xbmc/test/Movies - folders/Artificial intelligence/VIDEO_TS/VIDEO_TS.IFO sort key VIDEO_TS.IFO 0
and this is with the change
21:00:05 T:140635951171456 DEBUG: CGUIMediaWindow::GetDirectory (/xbmc/xbmc/test/Movies6/)
21:00:05 T:140635951171456 DEBUG: mike
ort item /xbmc/xbmc/test/Movies6/Artifical intelligence/ sort key Artifical intelligence 0
21:00:05 T:140635951171456 DEBUG: mike
ort item /xbmc/xbmc/test/Movies6/AVATAR/ sort key AVATAR 0
21:00:05 T:140635951171456 DEBUG: mike
ort item /xbmc/xbmc/test/Movies6/DVD2.iso sort key DVD2.iso 0
21:00:05 T:140635951171456 DEBUG: mike
ort item /xbmc/xbmc/test/Movies6/kill bill/ sort key kill bill 0
21:00:05 T:140635951171456 DEBUG: mike
ort item /xbmc/xbmc/test/Movies6/MOMMO/ sort key MOMMO 0
21:00:05 T:140635951171456 DEBUG: CGUIMediaWindow::GetDirectory (/xbmc/xbmc/test/Movies - folders6/)
21:00:08 T:140635951171456 DEBUG: mike
ort item /xbmc/xbmc/test/Movies - folders/Artificial intelligence/ sort key Artificial intelligence 0
21:00:08 T:140635951171456 DEBUG: mike
ort item /xbmc/xbmc/test/Movies - folders/AVATAR/ sort key AVATAR 0
21:00:08 T:140635951171456 DEBUG: mike
ort item /xbmc/xbmc/test/Movies - folders/DVD2.iso sort key DVD2.iso 0
21:00:08 T:140635951171456 DEBUG: mike
ort item /xbmc/xbmc/test/Movies - folders/kill bill/ sort key kill bill 0
21:00:08 T:140635951171456 DEBUG: mike
ort item /xbmc/xbmc/test/Movies - folders/MOMMO/ sort key MOMMO 0
after having looked at this some more I am sure (IMHO) that it is a bug. Probably the correct fix is not to let CVideoInfoTag::ToSortable set the sort field FieldPath to basePath, but rather leave it alone as it is already set to the strPath of the item, which if your looking at a directory is what you would expect stuff to be sorted on (BTW this turns out to be of course basePath of the Movie)