Commit Graph
2 Commits
Author SHA1 Message Date
Palatosino 23da8f77fd Fix magnetToTorrent
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!!!!)
2016-05-08 13:58:59 +02:00
Palatosino 0def096fb1 Use zlib instead of gzip
The reason to make this change is that I had problems with some URL's and I saw that the problem whas the Gunzip.

I saw that the "gzip" http content is the same that we can found in this stackoverflow post: http://stackoverflow.com/a/3947241/1344260

And it fails too, here you  have my test/problem: http://pastebin.com/3rvmCEkU

It do a IOError: CRC check failed 0xac557afc != 0x2338b236L
and torrenter fails.

After that, I read this message and test the solution: http://stackoverflow.com/a/13692010/1344260

And its working. So I changed the code.
2016-03-11 21:36:18 +01:00