View Single Post
Old 04-23-2019, 07:16 PM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,455
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Well you can monkey patch the _view_calibre_books function in iactions['View'] with a wrapper, something like this:

Code:
orig_func = iactions['View']._view_calibre_books

def myviewfunc(self, ids):
   orig_func(ids)
   # code to update database with timestamp

iactions['View']._view_calibre_books = myviewfunc
kovidgoyal is offline   Reply With Quote