Updated rtorrent-python library
This commit is contained in:
@@ -90,9 +90,10 @@ class TorrentParser():
|
||||
def _calc_info_hash(self):
|
||||
self.info_hash = None
|
||||
if "info" in self._torrent_decoded.keys():
|
||||
info_dict = self._torrent_decoded["info"]
|
||||
self.info_hash = hashlib.sha1(bencode.encode(
|
||||
info_dict)).hexdigest().upper()
|
||||
info_encoded = bencode.encode(self._torrent_decoded["info"])
|
||||
|
||||
if info_encoded:
|
||||
self.info_hash = hashlib.sha1(info_encoded).hexdigest().upper()
|
||||
|
||||
return(self.info_hash)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user