ускорение при повторном использовании

master
inpos 2016-03-20 14:10:12 +03:00
parent 2f4b1c9577
commit 0e541e9a68
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.module.pyrrent2http" name="pyrrent2http" version="0.9.1" provider-name="inpos">
<addon id="script.module.pyrrent2http" name="pyrrent2http" version="0.9.2" provider-name="inpos">
<requires>
<import addon="xbmc.python" version="2.14.0"/>
<import addon="script.module.libtorrent" />

View File

@ -272,6 +272,9 @@ class TorrentFS(object):
for i in range(num_files):
self.setPriority(i, 0)
def file(self, index):
for name in self.files.keys():
if self.files[name].index == index:
return self.files[name]
file_ = self.__file_at_(index)
self.files[file_.name] = file_
#self.handle.set_piece_deadline(self.files[startIndex].startPiece, 50)