mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-03-06 05:04:06 +01:00
Implement #3253 (Save Single format to disk)
This commit is contained in:
parent
65fbf9f343
commit
c7afb6dcd4
1 changed files with 5 additions and 3 deletions
|
|
@ -1046,10 +1046,10 @@ def edit_bulk_metadata(self, checked):
|
|||
|
||||
############################## Save to disk ################################
|
||||
def save_single_format_to_disk(self, checked):
|
||||
self.save_to_disk(checked, True, prefs['output_format'])
|
||||
self.save_to_disk(checked, False, prefs['output_format'])
|
||||
|
||||
def save_specific_format_disk(self, fmt):
|
||||
self.save_to_disk(False, True, fmt)
|
||||
self.save_to_disk(False, False, fmt)
|
||||
|
||||
def save_to_single_dir(self, checked):
|
||||
self.save_to_disk(checked, True)
|
||||
|
|
@ -1071,7 +1071,9 @@ def save_to_disk(self, checked, single_dir=False, single_format=None):
|
|||
if single_format is not None:
|
||||
opts.formats = single_format
|
||||
if single_dir:
|
||||
opts.template = '{title} - {authors}'
|
||||
opts.template = opts.template.split('/')[-1].strip()
|
||||
if not opts.template:
|
||||
opts.template = '{title} - {authors}'
|
||||
self._saver = Saver(self, self.library_view.model().db,
|
||||
Dispatcher(self._books_saved), rows, path, opts,
|
||||
spare_server=self.spare_server)
|
||||
|
|
|
|||
Loading…
Reference in a new issue