mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 13:43:37 +02:00
When reviewing metadata if the newly downloaded metadata has no language but there is an existing language, ensure it is preserved. Fixes #1959981 [book metadata download fails language attribute](https://bugs.launchpad.net/calibre/+bug/1959981)
This commit is contained in:
parent
8ceb229914
commit
b36c5e7624
1 changed files with 7 additions and 0 deletions
|
|
@ -547,6 +547,13 @@ def apply_changes(self):
|
|||
if val != self.initial_vals[field]:
|
||||
widgets.new.to_mi(self.current_mi)
|
||||
changed = True
|
||||
if changed and not self.current_mi.languages:
|
||||
# this is needed because blank language setting
|
||||
# causes current UI language to be set
|
||||
widgets = self.widgets['languages']
|
||||
neww, oldw = widgets[:2]
|
||||
if oldw.current_val:
|
||||
self.current_mi.languages = oldw.current_val
|
||||
return changed
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue