View Single Post
Old 11-26-2013, 04:16 AM   #1
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Running job on library change

For my Kobo Utilities plugin, I am adding an option to run a job when the device is connected. This will fetch the reading status of the books from the device and populate some custom columns. I have this working, but I realised it also needs to be run after changing to a new library.

Looking through the code of other plugins, the only thing I could find was library_changed. At first look, this seemed to be what I wanted. But, it gets called before the ondevice status has been updated for the new library. I am using this to decide which books need to have the reading status retrieved from the device.

Have I missed something? Is there another signal or call a bit later that I can use? Or, can I get the list I need from within the job? The last time I looked at this, I couldn't, but that was before the new database engine.
davidfor is offline   Reply With Quote