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

This commit is contained in:
FrederikBaerentsen 2022-07-13 13:52:30 +02:00
parent 2c7895561b
commit 2b19398465

View File

@ -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