From 0e541e9a68940902e8aff3df34698597b882140d Mon Sep 17 00:00:00 2001 From: inpos Date: Sun, 20 Mar 2016 14:10:12 +0300 Subject: [PATCH] =?UTF-8?q?=D1=83=D1=81=D0=BA=D0=BE=D1=80=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D1=80=D0=B8=20=D0=BF=D0=BE=D0=B2=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BD=D0=BE=D0=BC=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addon.xml | 2 +- lib/pyrrent2http/pyrrent2http.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index dd3c9d3..5b91e2b 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/lib/pyrrent2http/pyrrent2http.py b/lib/pyrrent2http/pyrrent2http.py index ee50ec1..59f290e 100644 --- a/lib/pyrrent2http/pyrrent2http.py +++ b/lib/pyrrent2http/pyrrent2http.py @@ -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)