You can select app that Firefox uses to open certain file types.

For example .torrent file type. But the problem is if your application has form of a binary file (for example Linux .AppImage), which name is changing as new versions are released.
You can either

A) keep renaming newly downloaded app binary file to have always same name.
B) untested: create an universal symbolic link with a wildcard/asterisk symbol like this:

cd /path/to/app/images/
ln -s $(pwd)/qbittorrent-*_x86_64.AppImage $(pwd)/qbittorrent-appimage.link

and select this qbittorrent-appimage.link file as one Firefox will be using for the .torrent files (in this case): about:preferences -> find "applications" -> select the file type.
.