mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Adjust file extension grabbing
This commit is contained in:
@@ -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)))
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user