Apply #932 minor ti_name optimization
This commit is contained in:
parent
2856e948de
commit
d85d8945e7
@ -637,7 +637,7 @@ class Torrent:
|
|||||||
|
|
||||||
def ti_name():
|
def ti_name():
|
||||||
if self.handle.has_metadata():
|
if self.handle.has_metadata():
|
||||||
name = self.torrent_info.file_at(0).path.split("/")[0]
|
name = self.torrent_info.file_at(0).path.split("/", 1)[0]
|
||||||
try:
|
try:
|
||||||
return name.decode("utf8", "ignore")
|
return name.decode("utf8", "ignore")
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user