Compare commits

...

1 Commits

Author SHA1 Message Date
Simon Bruder 3c3c51dbfb
Work with cbz files with subdirectories
continuous-integration/drone/push Build is passing Details
2020-02-10 12:31:16 +00:00
1 changed files with 3 additions and 1 deletions

View File

@ -259,7 +259,9 @@ class CalibreDB(BaseDB):
path = self.get_volume_filepath(volume_id)
with ZipFile(path, 'r') as volume:
try:
zip_info = volume.filelist[page_number - 1]
# filter sub directories
filelist = [file for file in volume.filelist if not file.is_dir()]
zip_info = filelist[page_number - 1]
except IndexError:
raise exceptions.NotFound()
return None