Fix update title sort in bulk metadata edit not using language information

This commit is contained in:
Kovid Goyal 2011-11-28 08:25:03 +05:30
parent 97ddd245a7
commit 735de1d229

View File

@ -164,7 +164,14 @@ class MyBlockingBusy(QDialog): # {{{
self.db.set_title(id, titlecase(title), notify=False)
if do_title_sort:
title = self.db.title(id, index_is_id=True)
self.db.set_title_sort(id, title_sort(title), notify=False)
if languages:
lang = languages[0]
else:
lang = self.db.languages(id, index_is_id=True)
if lang:
lang = lang.partition(',')[0]
self.db.set_title_sort(id, title_sort(title, lang=lang),
notify=False)
if au:
self.db.set_authors(id, string_to_authors(au), notify=False)
if cover_action == 'remove':