View Single Post
Old 02-02-2017, 05:56 PM   #46
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
Quote:
Originally Posted by kido.resuri View Post
What trigger could be used? How to (easily) check if the book is added?
Off the top of my head I don't know. What I do know is that when a book is added by the firmware there are multiple inserts into the content, volume_content, Event, AnalyticsEvents and Activity tables. A downloaded book can also get rows in content_keys, volume_tabs, Reviews, Bookmark and ShelfContent (the last two will mean the book has been on a Kobo device or app before).

Potentially, there would need to be a trigger for each of these tables. They would probably be "BEFORE INSERT" and fiddle with the various columns in the table which include the file path. The exact trigger wouldn't be hard to work out.
davidfor is offline   Reply With Quote