From 7be2effa055f6a76486ed9dff32abeb4a47e888d Mon Sep 17 00:00:00 2001 From: ta264 Date: Sun, 28 Nov 2021 19:24:39 +0000 Subject: [PATCH] Fixed: Sort by path in book index view Fixes #1233 --- frontend/src/Store/Actions/bookActions.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/src/Store/Actions/bookActions.js b/frontend/src/Store/Actions/bookActions.js index cf807dd40..b254aa0a0 100644 --- a/frontend/src/Store/Actions/bookActions.js +++ b/frontend/src/Store/Actions/bookActions.js @@ -87,6 +87,12 @@ export const filterPredicates = { return predicate(item.ratings.value * 10, filterValue); }, + path: function(item, filterValue, type) { + const predicate = filterTypePredicates[type]; + + return predicate(item.author.path, filterValue); + }, + bookFileCount: function(item, filterValue, type) { const predicate = filterTypePredicates[type]; const bookCount = item.statistics ? item.statistics.bookFileCount : 0; @@ -111,6 +117,10 @@ export const sortPredicates = { return statistics.sizeOnDisk || 0; }, + path: function(item) { + return item.author.path; + }, + series: function(item) { return item.seriesTitle; },