From 8ef613b1556bbd5ef26154d0efa5030c20605ed5 Mon Sep 17 00:00:00 2001 From: FrederikBaerentsen Date: Wed, 13 Jul 2022 19:15:35 +0200 Subject: [PATCH] Fixed #5. If the opds title is empty it should show 'Comics', else it will populate with the base url name --- opds/catalog.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/opds/catalog.py b/opds/catalog.py index c2d9636..003683e 100644 --- a/opds/catalog.py +++ b/opds/catalog.py @@ -51,11 +51,19 @@ def fromdir(root_url, url, content_base_path, content_relative_path): path = os.path.join(content_base_path, content_relative_path) - #print(path) - c = Catalog( - title=os.path.basename(os.path.dirname(path)), root_url=root_url, url=url - ) - #print(c.url) + if os.path.basename(content_relative_path) == "": + c = Catalog( + title="Comics", + root_url=root_url, + url=url + ) + else: + c = Catalog( + title=os.path.basename(content_relative_path), + root_url=root_url, + url=url + ) + #title=os.path.basename(os.path.dirname(path)), root_url=root_url, url=url ##########WORKING AREA########### searchArr=[]