When setting metadata from a download or a format in the edit metadata single dialog, update title sort and author sort as well

This commit is contained in:
Kovid Goyal 2011-05-06 08:56:45 -06:00
parent 8a55b0dc79
commit 6463d0e423

View File

@ -292,13 +292,17 @@ class MetadataSingleDialogBase(ResizableDialog):
show=True)
return
def update_from_mi(self, mi):
def update_from_mi(self, mi, update_sorts=True):
if not mi.is_null('title'):
self.title.current_val = mi.title
if update_sorts:
self.title_sort.auto_generate()
if not mi.is_null('authors'):
self.authors.current_val = mi.authors
if not mi.is_null('author_sort'):
self.author_sort.current_val = mi.author_sort
elif update_sorts:
self.author_sort.auto_generate()
if not mi.is_null('rating'):
try:
self.rating.current_val = mi.rating