add page size patch
This commit is contained in:
13
modules/services/kavita-page-size.diff
Normal file
13
modules/services/kavita-page-size.diff
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/API/Controllers/OPDSController.cs b/API/Controllers/OPDSController.cs
|
||||
index 3466b558..824b6efc 100644
|
||||
--- a/API/Controllers/OPDSController.cs
|
||||
+++ b/API/Controllers/OPDSController.cs
|
||||
@@ -75,7 +75,7 @@ public class OpdsController : BaseApiController
|
||||
|
||||
private readonly FilterV2Dto _filterV2Dto = new FilterV2Dto();
|
||||
private readonly ChapterSortComparerDefaultLast _chapterSortComparerDefaultLast = ChapterSortComparerDefaultLast.Default;
|
||||
- private const int PageSize = 20;
|
||||
+ private const int PageSize = 100;
|
||||
|
||||
public OpdsController(IUnitOfWork unitOfWork, IDownloadService downloadService,
|
||||
IDirectoryService directoryService, ICacheService cacheService,
|
||||
@@ -1,40 +0,0 @@
|
||||
diff --git a/API/Services/SeriesService.cs b/API/Services/SeriesService.cs
|
||||
index 5294ebaf..d2b8f45c 100644
|
||||
--- a/API/Services/SeriesService.cs
|
||||
+++ b/API/Services/SeriesService.cs
|
||||
@@ -465,7 +465,7 @@ public class SeriesService : ISeriesService
|
||||
c.VolumeTitle = v.Name;
|
||||
return c;
|
||||
})
|
||||
- .OrderBy(c => c.SortOrder))
|
||||
+ .OrderBy(c => c.Title.StartsWith("[") ? c.Title : c.SortOrder.ToString()))
|
||||
.ToList();
|
||||
|
||||
foreach (var chapter in chapters)
|
||||
diff --git a/API/Services/ReaderService.cs b/API/Services/ReaderService.cs
|
||||
index 5daf97f6..ae4e328a 100644
|
||||
--- a/API/Services/ReaderService.cs
|
||||
+++ b/API/Services/ReaderService.cs
|
||||
@@ -1,4 +1,4 @@
|
||||
-using System;
|
||||
+using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
@@ -572,7 +572,7 @@ public class ReaderService : IReaderService
|
||||
// We only have a loose leaf or Special left
|
||||
|
||||
var chapters = volumes.First(v => v.IsLooseLeaf() || v.IsSpecial()).Chapters
|
||||
- .OrderBy(c => c.SortOrder)
|
||||
+ .OrderBy(c => c.Title.StartsWith("[") ? c.Title : c.SortOrder.ToString())
|
||||
.ToList();
|
||||
|
||||
// If there are specials, then return the first Non-special
|
||||
@@ -606,7 +606,7 @@ public class ReaderService : IReaderService
|
||||
|
||||
// Order with volume 0 last so we prefer the natural order
|
||||
return FindNextReadingChapter(volumes.OrderBy(v => v.MinNumber, _chapterSortComparerDefaultLast)
|
||||
- .SelectMany(v => v.Chapters.OrderBy(c => c.SortOrder))
|
||||
+ .SelectMany(v => v.Chapters.OrderBy(c => c.Title.StartsWith("[") ? c.Title : c.SortOrder.ToString()))
|
||||
.ToList());
|
||||
}
|
||||
@@ -50,7 +50,7 @@ in {
|
||||
user = "kavita";
|
||||
package = let
|
||||
backend = pkgs.unstable.kavita.backend.overrideAttrs
|
||||
(old: { patches = old.patches ++ [ ./kavita-patches-chapter-parsing.diff]; });
|
||||
(old: { patches = old.patches ++ [ ./kavita-patches-chapter-parsing.diff ./kavita-page-size.diff ]; });
|
||||
kavitaPatched = pkgs.unstable.kavita.overrideAttrs (old: { backend = backend; });
|
||||
in kavitaPatched;
|
||||
settings = {
|
||||
|
||||
Reference in New Issue
Block a user