mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Bug #1099190: Updating metadata on startup can be very slow
The series_index is stored as a string in the Kobo database. Convert this to a float for comparison with the value in calibre. This will reduce the number of updates done to the database and reduce the time taken to sync.
This commit is contained in:
parent
b392089217
commit
39aa2072cb
@ -33,7 +33,7 @@ class KOBO(USBMS):
|
||||
gui_name = 'Kobo Reader'
|
||||
description = _('Communicate with the Kobo Reader')
|
||||
author = 'Timothy Legge and David Forrester'
|
||||
version = (2, 0, 4)
|
||||
version = (2, 0, 5)
|
||||
|
||||
dbversion = 0
|
||||
fwversion = 0
|
||||
@ -2353,7 +2353,14 @@ class KOBOTOUCH(KOBO):
|
||||
debug_print('KoboTouch:set_series book.series="%s"'%book.series)
|
||||
debug_print('KoboTouch:set_series book.series_index=', book.series_index)
|
||||
|
||||
if book.series == book.kobo_series and book.series_index == book.kobo_series_number:
|
||||
if book.series == book.kobo_series:
|
||||
kobo_series_number = None
|
||||
if book.kobo_series_number is not None:
|
||||
try:
|
||||
kobo_series_number = float(book.kobo_series_number)
|
||||
except:
|
||||
kobo_series_number = None
|
||||
if kobo_series_number == book.series_index:
|
||||
if show_debug:
|
||||
debug_print('KoboTouch:set_series - series info the same - not changing')
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user