mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Suggested changes after working with new sony driver
This commit is contained in:
parent
07246d842a
commit
e7c666d60f
@ -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
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user