switch to line 71.
modify the "prefix" variable as below.
Code: Select all
self.__m_files = []
if self.__m_metadata["info"].has_key("files"):
prefix = ""
if len(self.__m_metadata["info"]["fil[url][/url]es"]) > 1:
# prefix = self.__m_metadata["info"]["name"].decode(self.encoding).encode("utf8")
prefix = self.__m_metadata["info"]["name"]
for f in self.__m_metadata["info"]["files"]:
self.__m_files.append({
'path': os.path.join(prefix, *f["path"]).decode(self.encoding).encode("utf8"),
'size': f["length"],
'download': True
})
AND, BTW: a few torrent files use the "codepage" instead of the standard "encoding" keyword, you'd better use some hex editor (sucha as GHex) to modify the torrent file, just replace the "codepage" to "encoding" and replace the value of "codepage" from int to string.