kannibalox / pyrosimple

An overhauled fork of the pyrocore tools for rTorrent
https://kannibalox.github.io/pyrosimple/
GNU General Public License v3.0
48 stars 5 forks source link

chtor: Fix `--reannounce-all` without `--no-cross-seed` #11

Closed ghost closed 1 year ago

ghost commented 1 year ago

This fixes the following error when running chtor --reannounce-all without specifying --no-cross-seed:

Traceback (most recent call last):                                                   
  File "/home/nyuszika7h/.local/bin/chtor", line 8, in <module>
    sys.exit(run())                                                                  
  File "/home/nyuszika7h/.local/pipx/venvs/pyrosimple/lib/python3.10/site-packages/pyrosimple/scripts/chtor.py", line 400, in run
    MetafileChanger().run()                                                          
  File "/home/nyuszika7h/.local/pipx/venvs/pyrosimple/lib/python3.10/site-packages/pyrosimple/scripts/base.py", line 180, in run
    self.mainloop()                                                                  
  File "/home/nyuszika7h/.local/pipx/venvs/pyrosimple/lib/python3.10/site-packages/pyrosimple/scripts/chtor.py", line 306, in mainloop
    torrent["info"]["x_cross_seed"] = hashlib.md5(       
TypeError: Strings must be encoded before hashing        
kannibalox commented 1 year ago

Thanks!