From 2b19398465ae66b48ed765b4a03053c9ef7cb60c Mon Sep 17 00:00:00 2001 From: FrederikBaerentsen Date: Wed, 13 Jul 2022 13:52:30 +0200 Subject: [PATCH] Fixed #2. Comics are now sorted by series, then issue. Might needs tested if issue number contains or or other non-integer values. Git issue can be reopened if needed --- opds/catalog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opds/catalog.py b/opds/catalog.py index a4e0ef9..c2d9636 100644 --- a/opds/catalog.py +++ b/opds/catalog.py @@ -101,7 +101,7 @@ def fromdir(root_url, url, content_base_path, content_relative_path): if not "search" in c.url: onlyfiles = [f for f in os.listdir(path) if os.path.isfile(os.path.join(path, f))] - #print(onlyfiles) + onlyfiles.sort() for filename in onlyfiles: link = Link( href=quote(f"/content/{content_relative_path}/{filename}"), @@ -166,7 +166,7 @@ def fromdir(root_url, url, content_base_path, content_relative_path): query = query + j + " like '%" + k + "%' " if first: first = False - query = query + ";" + query = query + " order by series asc, cast(issue as unsigned) asc;" print("----> " + query) sql = query