magnetToTorrent was broken because torrentFile.files is not indexable (but is iterable).
The only reason to use files[0] is to generate a "baseName" that is finally used to do self.md5(baseName) for the torrent file.
I can iterate to the first element (to emulate files[0]) and get the name, but I think that is useless.
We can remove this and use the magnet. I think that the best will be use the magnet ID information from the magnet link, not all the magnet, to remove optional arguments, but his is acceptable as a fast fix, and much better that the initial approach that can colisitionate with other files that have the same initial file (imagine a README.txt!!!!)