thumbnailer: Move code from cli to actual DLL