Update book.device_collections before add_book is called

This commit is contained in:
Timothy Legge 2010-09-10 22:13:52 -03:00
parent 0fe81939ea
commit fd7f23f7c2

View File

@ -111,9 +111,9 @@ class KOBO(USBMS):
else:
book = self.book_from_path(prefix, lpath, title, authors, mime, date, ContentType, ImageID)
# print 'Update booklist'
book.device_collections = playlist_map.get(book.lpath, [])
if bl.add_book(book, replace_metadata=False):
changed = True
book.device_collections = playlist_map.get(book.lpath, [])
except: # Probably a path encoding error
import traceback
traceback.print_exc()