Parse cbr files
This commit is contained in:
@@ -56,13 +56,9 @@ class ParseCBZ:
|
||||
|
||||
def get_contents(self):
|
||||
# TODO
|
||||
# Image resizing, formatting
|
||||
# Include this as a collection of absolute paths only
|
||||
# Post processing can be carried out by the program
|
||||
# CBZ files containing multiple directories for multiple chapters
|
||||
|
||||
file_settings = {
|
||||
'temp_dir': self.temp_dir,
|
||||
'images_only': True}
|
||||
|
||||
extract_path = os.path.join(self.temp_dir, self.file_md5)
|
||||
@@ -90,10 +86,9 @@ class ParseCBZ:
|
||||
found_images.sort()
|
||||
|
||||
for count, i in enumerate(found_images):
|
||||
page_name = 'Page ' + str(count)
|
||||
page_name = 'Page ' + str(count + 1)
|
||||
image_path = os.path.join(extract_path, image_dir, i)
|
||||
|
||||
contents[page_name] = image_path
|
||||
# contents[page_name] = "<img src='%s' align='middle'/>" % image_path
|
||||
|
||||
return contents, file_settings
|
||||
|
Reference in New Issue
Block a user