Update flatpak manifest
Implement automated missing cover downloading
This commit is contained in:
@@ -102,7 +102,7 @@ class UpdateProgress(QtCore.QObject):
|
||||
|
||||
|
||||
class BookSorter:
|
||||
def __init__(self, file_list, mode, database_path, auto_tags=True, temp_dir=None):
|
||||
def __init__(self, file_list, mode, database_path, settings, temp_dir=None):
|
||||
# Have the GUI pass a list of files straight to here
|
||||
# Then, on the basis of what is needed, pass the
|
||||
# filenames to the requisite functions
|
||||
@@ -115,7 +115,8 @@ class BookSorter:
|
||||
self.work_mode = mode[0]
|
||||
self.addition_mode = mode[1]
|
||||
self.database_path = database_path
|
||||
self.auto_tags = auto_tags
|
||||
self.auto_tags = settings['auto_tags']
|
||||
self.auto_cover = settings['auto_cover']
|
||||
self.temp_dir = temp_dir
|
||||
if database_path:
|
||||
self.database_hashes()
|
||||
@@ -245,10 +246,9 @@ class BookSorter:
|
||||
if cover_image_raw:
|
||||
cover_image = resize_image(cover_image_raw)
|
||||
else:
|
||||
# TODO
|
||||
# Needs an option
|
||||
# cover_image = fetch_cover(title, author)
|
||||
cover_image = None
|
||||
if self.auto_cover:
|
||||
cover_image = fetch_cover(title, author)
|
||||
|
||||
this_book[file_md5]['cover_image'] = cover_image
|
||||
this_book[file_md5]['addition_mode'] = self.addition_mode
|
||||
|
Reference in New Issue
Block a user