mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Add a tweak that controls whether new book tags are applied when copying a book to another library
This commit is contained in:
commit
adcf9e2f16
@ -105,3 +105,8 @@ auto_connect_to_folder = ''
|
|||||||
# case. 'MySearch' and 'mysearch' are the same term.
|
# case. 'MySearch' and 'mysearch' are the same term.
|
||||||
grouped_search_terms = {}
|
grouped_search_terms = {}
|
||||||
|
|
||||||
|
|
||||||
|
# Set this to True (not 'True') to ensure that tags in 'Tags to add when adding
|
||||||
|
# a book' are added when copying books to another library
|
||||||
|
add_new_book_tags_when_importing_books = False
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ from PyQt4.Qt import QMenu, QToolButton
|
|||||||
from calibre.gui2.actions import InterfaceAction
|
from calibre.gui2.actions import InterfaceAction
|
||||||
from calibre.gui2 import error_dialog, Dispatcher
|
from calibre.gui2 import error_dialog, Dispatcher
|
||||||
from calibre.gui2.dialogs.progress import ProgressDialog
|
from calibre.gui2.dialogs.progress import ProgressDialog
|
||||||
from calibre.utils.config import prefs
|
from calibre.utils.config import prefs, tweaks
|
||||||
|
|
||||||
class Worker(Thread):
|
class Worker(Thread):
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ class Worker(Thread):
|
|||||||
self.add_formats(identical_book, paths, newdb, replace=False)
|
self.add_formats(identical_book, paths, newdb, replace=False)
|
||||||
if not added:
|
if not added:
|
||||||
newdb.import_book(mi, paths, notify=False, import_hooks=False,
|
newdb.import_book(mi, paths, notify=False, import_hooks=False,
|
||||||
apply_import_tags=False)
|
apply_import_tags=tweaks['add_new_book_tags_when_importing_books'])
|
||||||
co = self.db.conversion_options(x, 'PIPE')
|
co = self.db.conversion_options(x, 'PIPE')
|
||||||
if co is not None:
|
if co is not None:
|
||||||
newdb.set_conversion_options(x, 'PIPE', co)
|
newdb.set_conversion_options(x, 'PIPE', co)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user