mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix broken series sorting
This commit is contained in:
parent
b910e737c6
commit
dfa38c4141
@ -578,12 +578,14 @@ class ResultCache(SearchQueryParser):
|
|||||||
self._map_filtered = list(self._map)
|
self._map_filtered = list(self._map)
|
||||||
|
|
||||||
def seriescmp(self, x, y):
|
def seriescmp(self, x, y):
|
||||||
|
sidx = self.FIELD_MAP['series']
|
||||||
try:
|
try:
|
||||||
ans = cmp(self._data[x][9].lower(), self._data[y][9].lower())
|
ans = cmp(self._data[x][sidx].lower(), self._data[y][sidx].lower())
|
||||||
except AttributeError: # Some entries may be None
|
except AttributeError: # Some entries may be None
|
||||||
ans = cmp(self._data[x][9], self._data[y][9])
|
ans = cmp(self._data[x][sidx], self._data[y][sidx])
|
||||||
if ans != 0: return ans
|
if ans != 0: return ans
|
||||||
return cmp(self._data[x][10], self._data[y][10])
|
sidx = self.FIELD_MAP['series_index']
|
||||||
|
return cmp(self._data[x][sidx], self._data[y][sidx])
|
||||||
|
|
||||||
def cmp(self, loc, x, y, asstr=True, subsort=False):
|
def cmp(self, loc, x, y, asstr=True, subsort=False):
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user