LUA: export using custom storage

I registered a custom storage and saved all the export setting in a preset.
I select the preset, I export, everything is fine. After restarting DT, the last used custom target storage is not restored (“file on disk” is used instead). The rest of the settings in preset are restored.

This way, I need to select my preset, every time I start DT.

Is there any way to correctly restore the target storage after restart?

Thanks!

If you created a storage in Lua, and registered it (which makes the export module aware of it) as a storage, then simply selecting the storage in the export module should be enough. As long as you don’t change the selection darktable will restart with it selected.

I tested with the collection storage (export2collection in ext_editors.lua).