diff --git a/src/backend/lib/library.py b/src/backend/lib/library.py index da764ed..6585f6d 100755 --- a/src/backend/lib/library.py +++ b/src/backend/lib/library.py @@ -56,7 +56,7 @@ class Catalogue: :returns self._book_list_expanded: json string containing all book metadata """ - self.scan_folder() + self.scan_folder() # Populate file list regx = re.compile(r"\.epub") try: self.books = list(filter(regx.search, filter(None, self.file_list))) diff --git a/src/interface/views.py b/src/interface/views.py index 5ed23af..7fb51de 100755 --- a/src/interface/views.py +++ b/src/interface/views.py @@ -123,4 +123,5 @@ def hr_name(book): """ Nicer file names """ - return "{0}.{1}".format(slugify(book.title), book.file_name.split(".")[1]) + # return "{0}.{1}".format(slugify(book.title), book.file_name.split(".")[1]) + return "{0}.{1}".format(slugify(book.title), os.path.splitext(book.file_name.split))