View Single Post
Old 08-22-2012, 07:08 AM   #492
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kiwidude View Post
Interesting on the restart calibre required thing. On renaming a device, my plugin will call:
Code:
self.gui.device_manager.set_driveinfo_name(device_info['location_code'], new_device_name)
Other than that, everything should just be doing uuid comparisons when the device is connected, so renaming a device should be irrelevant to that connectivity?
It is very hard to say what is going wrong.

What I can say is that "reading list" did not chat on connect after the rename but before the restart. For example, here is a "normal" startup log.
Spoiler:
SMART_DEV ( 11.75: 10.857) reset
SMART_DEV ( 11.75: 0.000) set_progress_reporter
SMART_DEV ( 11.76: 0.000) open
SMART_DEV ( 11.84: 0.078) _call_client GET_INITIALIZATION_INFO
SMART_DEV ( 13.13: 1.277) open CC version #: 10
SMART_DEV ( 13.13: 0.000) open CC can stream True
SMART_DEV ( 13.16: 0.031) open selected formats [u'epub', u'mobi']
SMART_DEV ( 13.18: 0.000) card_prefix
SMART_DEV ( 13.41: 0.234) set_progress_reporter
Job: 1 Get device information started
SMART_DEV ( 13.41: 0.000) get_device_information
SMART_DEV ( 13.43: 0.000) _call_client GET_DEVICE_INFORMATION
SMART_DEV ( 13.71: 0.265) _call_client SET_CALIBRE_DEVICE_INFO
SMART_DEV ( 14.12: 0.405) card_prefix
SMART_DEV ( 14.12: 0.000) free_space
SMART_DEV ( 14.21: 0.094) _call_client FREE_SPACE
DeviceJob: 1 Get device information done, calling callback
DeviceJob: 1 Get device information callback returned
SMART_DEV ( 15.25: 1.035) set_progress_reporter
Job: 2 Get list of books on device started
SMART_DEV ( 15.26: 0.001) books None
SMART_DEV ( 15.30: 0.030) _call_client GET_BOOK_COUNT
SMART_DEV ( 15.72: 0.398) books carda
SMART_DEV ( 15.73: 0.000) books cardb
DeviceJob: 2 Get list of books on device done, calling callback
SMART_DEV ( 15.81: 0.078) set_plugboards
READING LIST: Metadata available: {u'main': {u'device_store_uuid': u'465af670-ecfc-468b-8c8f-579d8137a284', u'prefix': u'', u'devi
ce_name': u'SmartDevice', u'calibre_version': u'0.8.65', u'location_code': u'main', u'last_library_uuid': u'05584da8-8c69-4938-874
b-3845d2c85c69', u'date_last_connected': u'2012-08-22T10:30:37.774000+00:00'}}
READING LIST: Sync Now - force_sync= False
READING LIST: Device found to sync to: CBH Nexus 465af670-ecfc-468b-8c8f-579d8137a284
READING LIST: Syncing 1 books in 'Default' to: 465af670-ecfc-468b-8c8f-579d8137a284 (location:None)
READING LIST: Checking for automatic list(s) []
DeviceJob: 2 Get list of books on device callback returned
Job: 2 Get list of books on device finished
No details available.
Job: 1 Get device information finished

Here is the one after the rename. You will see that the reading_list lines are missing. Why I cannot say.
Spoiler:
SMART_DEV ( 265.28: 0.000) open
SMART_DEV ( 265.31: 0.031) _call_client GET_INITIALIZATION_INFO
SMART_DEV ( 265.79: 0.484) open CC version #: 10
SMART_DEV ( 265.79: 0.000) open CC can stream True
SMART_DEV ( 266.03: 0.219) open selected formats [u'epub', u'mobi']
SMART_DEV ( 266.03: 0.000) card_prefix
SMART_DEV ( 266.04: 0.000) set_progress_reporter
Job: 9 Get device information started
SMART_DEV ( 266.06: 0.000) get_device_information
SMART_DEV ( 266.12: 0.046) _call_client GET_DEVICE_INFORMATION
SMART_DEV ( 266.43: 0.312) _call_client SET_CALIBRE_DEVICE_INFO
SMART_DEV ( 266.80: 0.355) card_prefix
SMART_DEV ( 266.82: 0.000) free_space
SMART_DEV ( 266.85: 0.031) _call_client FREE_SPACE
DeviceJob: 9 Get device information done, calling callback
DeviceJob: 9 Get device information callback returned
SMART_DEV ( 267.12: 0.267) set_progress_reporter
Job: 10 Get list of books on device started
SMART_DEV ( 267.13: 0.000) books None
SMART_DEV ( 267.17: 0.032) _call_client GET_BOOK_COUNT
Job: 9 Get device information finished
No details available.
SMART_DEV ( 267.59: 0.402) books carda
SMART_DEV ( 267.61: 0.000) books cardb
DeviceJob: 10 Get list of books on device done, calling callback
Ahhh... I might have found it. My driver sent the command to the app to change the device name, but the app currently ignores such commands. That might have confused reading_list. Apparently a UUID mapping is all you need after a restart, so things started working again. Or at least it appears that way.
chaley is offline   Reply With Quote