Running an operation before and after import

I’m developing an addon that used to execute code before and after import. In the past, this was achieved by
wrap(aqt.importing.importFile, beforeImport, “around”)
and
wrap(AnkiPackageImporter.run, afterImport) (this used to be executed on a different thread, I had passed a signal to the gui thread to make this work).

Since a few Anki versions, this is broken and I have trouble fixing it again. I checked the hooks, but also couldn’t find a proper hook for this. Can someone point me in the right direction?

Remark: It’s related to this earlier question I had asked.

Please see Hooks and Filters - Writing Anki Add-ons

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.