mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Implement #3253 (Save Single format to disk)
This commit is contained in:
parent
65fbf9f343
commit
c7afb6dcd4
@ -1046,10 +1046,10 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
|||||||
|
|
||||||
############################## Save to disk ################################
|
############################## Save to disk ################################
|
||||||
def save_single_format_to_disk(self, checked):
|
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):
|
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):
|
def save_to_single_dir(self, checked):
|
||||||
self.save_to_disk(checked, True)
|
self.save_to_disk(checked, True)
|
||||||
@ -1071,6 +1071,8 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
|||||||
if single_format is not None:
|
if single_format is not None:
|
||||||
opts.formats = single_format
|
opts.formats = single_format
|
||||||
if single_dir:
|
if single_dir:
|
||||||
|
opts.template = opts.template.split('/')[-1].strip()
|
||||||
|
if not opts.template:
|
||||||
opts.template = '{title} - {authors}'
|
opts.template = '{title} - {authors}'
|
||||||
self._saver = Saver(self, self.library_view.model().db,
|
self._saver = Saver(self, self.library_view.model().db,
|
||||||
Dispatcher(self._books_saved), rows, path, opts,
|
Dispatcher(self._books_saved), rows, path, opts,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user