mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
ff5c6cd143
commit
ca52341ec1
@ -268,7 +268,7 @@ class EditMetadataAction(InterfaceAction):
|
|||||||
db.data.set_marked_ids(failed_ids)
|
db.data.set_marked_ids(failed_ids)
|
||||||
|
|
||||||
self.apply_metadata_changes(
|
self.apply_metadata_changes(
|
||||||
id_map, merge_comments=msprefs['append_comments'],
|
id_map, merge_comments=msprefs['append_comments'], icon='download-metadata.png',
|
||||||
callback=partial(self.downloaded_metadata_applied, tdir, restrict_to_failed))
|
callback=partial(self.downloaded_metadata_applied, tdir, restrict_to_failed))
|
||||||
|
|
||||||
def downloaded_metadata_applied(self, tdir, restrict_to_failed, *args):
|
def downloaded_metadata_applied(self, tdir, restrict_to_failed, *args):
|
||||||
@ -620,7 +620,7 @@ class EditMetadataAction(InterfaceAction):
|
|||||||
|
|
||||||
# Apply bulk metadata changes {{{
|
# Apply bulk metadata changes {{{
|
||||||
def apply_metadata_changes(self, id_map, title=None, msg='', callback=None,
|
def apply_metadata_changes(self, id_map, title=None, msg='', callback=None,
|
||||||
merge_tags=True, merge_comments=False):
|
merge_tags=True, merge_comments=False, icon=None):
|
||||||
'''
|
'''
|
||||||
Apply the metadata changes in id_map to the database synchronously
|
Apply the metadata changes in id_map to the database synchronously
|
||||||
id_map must be a mapping of ids to Metadata objects. Set any fields you
|
id_map must be a mapping of ids to Metadata objects. Set any fields you
|
||||||
@ -649,7 +649,7 @@ class EditMetadataAction(InterfaceAction):
|
|||||||
from calibre.gui2.dialogs.progress import ProgressDialog
|
from calibre.gui2.dialogs.progress import ProgressDialog
|
||||||
self.apply_pd = ProgressDialog(title, msg, min=0,
|
self.apply_pd = ProgressDialog(title, msg, min=0,
|
||||||
max=len(self.apply_id_map)-1, parent=self.gui,
|
max=len(self.apply_id_map)-1, parent=self.gui,
|
||||||
cancelable=False)
|
cancelable=False, icon=icon)
|
||||||
self.apply_pd.setModal(True)
|
self.apply_pd.setModal(True)
|
||||||
self.apply_pd.show()
|
self.apply_pd.show()
|
||||||
self._am_merge_tags = merge_tags
|
self._am_merge_tags = merge_tags
|
||||||
|
Loading…
x
Reference in New Issue
Block a user