Suggested changes after working with new sony driver

This commit is contained in:
Charles Haley 2010-05-20 10:57:31 +01:00
parent 07246d842a
commit e7c666d60f
2 changed files with 13 additions and 9 deletions

View File

@ -325,9 +325,9 @@ class XMLCache(object):
if record is None:
record = self.create_text_record(root, i, book.lpath)
self.update_text_record(record, book, path, i)
bl_pmap = playlist_map[i]
self.update_playlists(i, root, booklist, bl_pmap,
collections_attributes)
bl_pmap = playlist_map[i]
self.update_playlists(i, root, booklist, bl_pmap,
collections_attributes)
self.fix_ids()
@ -339,6 +339,9 @@ class XMLCache(object):
collections_attributes):
collections = booklist.get_collections(collections_attributes)
for category, books in collections.items():
for b in books:
if self.book_by_lpath(b.lpath, root) is None:
print b.lpath
records = [self.book_by_lpath(b.lpath, root) for b in books]
# Remove any books that were not found, although this
# *should* never happen

View File

@ -636,19 +636,20 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
self.download_scheduled_recipe, Qt.QueuedConnection)
self.library_view.verticalHeader().sectionClicked.connect(self.view_specific_book)
if self.library_view.model().rowCount(None) > 1:
self.library_view.resizeRowToContents(0)
height = self.library_view.rowHeight(0)
else:
height = None
for view in ('library', 'memory', 'card_a', 'card_b'):
view = getattr(self, view+'_view')
view.verticalHeader().sectionDoubleClicked.connect(self.view_specific_book)
if height is not None:
view.verticalHeader().setDefaultSectionSize(height)
self.location_view.setCurrentIndex(self.location_view.model().index(0))
self._add_filesystem_book = Dispatcher(self.__add_filesystem_book)
v = self.library_view
if v.model().rowCount(None) > 1:
v.resizeRowToContents(0)
height = v.rowHeight(0)
self.library_view.verticalHeader().setDefaultSectionSize(height)
self.keyboard_interrupt.connect(self.quit, type=Qt.QueuedConnection)
def do_edit_categories(self):