mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-21 15:48:12 +00:00
Fix not using the encoding used in the torrent file to decode some strings
This commit is contained in:
parent
fa9d39c5fb
commit
360790876b
@ -102,7 +102,7 @@ class TorrentInfo(object):
|
|||||||
prefix = self.__m_name
|
prefix = self.__m_name
|
||||||
|
|
||||||
for index, f in enumerate(self.__m_metadata["info"]["files"]):
|
for index, f in enumerate(self.__m_metadata["info"]["files"]):
|
||||||
path = decode_string(os.path.join(prefix, decode_string(os.path.join(*f["path"]))))
|
path = decode_string(os.path.join(prefix, decode_string(os.path.join(*f["path"]), self.encoding)), self.encoding)
|
||||||
f["index"] = index
|
f["index"] = index
|
||||||
paths[path] = f
|
paths[path] = f
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ class TorrentInfo(object):
|
|||||||
|
|
||||||
for f in self.__m_metadata["info"]["files"]:
|
for f in self.__m_metadata["info"]["files"]:
|
||||||
self.__m_files.append({
|
self.__m_files.append({
|
||||||
'path': decode_string(os.path.join(prefix, decode_string(os.path.join(*f["path"])))),
|
'path': decode_string(os.path.join(prefix, decode_string(os.path.join(*f["path"]), self.encoding)), self.encoding),
|
||||||
'size': f["length"],
|
'size': f["length"],
|
||||||
'download': True
|
'download': True
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user