From 453ed451661f1442624907f1a64c2d41f54825ed Mon Sep 17 00:00:00 2001 From: inpos Date: Fri, 11 Mar 2016 22:32:02 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BE=D0=B6=D0=B8=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B7=D0=B0=D0=B2=D0=B5=D1=80=D1=88=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=B6=D0=B5=D0=BB=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pyrrent2http/engine.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/pyrrent2http/engine.py b/lib/pyrrent2http/engine.py index 1eff75c..e9dd011 100644 --- a/lib/pyrrent2http/engine.py +++ b/lib/pyrrent2http/engine.py @@ -13,7 +13,7 @@ import mimetypes import xbmc from error import Error from . import SessionStatus, FileStatus, PeerInfo, MediaType, Encryption -from util import can_bind, find_free_port, ensure_fs_encoding +from util import can_bind, find_free_port, localize_path import threading LOGGING = True @@ -151,7 +151,7 @@ class Engine: path = path.replace("smb:", "").replace("/", "\\") else: raise Error("Downloading to an unmounted network share is not supported", Error.INVALID_DOWNLOAD_PATH) - if not os.path.isdir(ensure_fs_encoding(path)): + if not os.path.isdir(localize_path(path)): raise Error("Download path doesn't exist (%s)" % path, Error.INVALID_DOWNLOAD_PATH) return path @@ -354,7 +354,7 @@ class Engine: :param wait_timeout: Time in seconds to wait until pyrrent2http client shut down """ - #self.wait_on_close_timeout = wait_timeout + self.wait_on_close_timeout = wait_timeout def close(self): """ @@ -364,7 +364,7 @@ class Engine: if self.is_alive(): self._log("Shutting down pyrrent2http...") self.pyrrent2http.shutdown() - '''finished = False + finished = False if self.wait_on_close_timeout is not None: start = time.time() while (time.time() - start) < self.wait_on_close_timeout: @@ -376,7 +376,7 @@ class Engine: self._log("PANIC: Timeout occurred while shutting down pyrrent2http thread") else: self._log("pyrrent2http successfully shut down.") - self.wait_on_close_timeout = None''' + self.wait_on_close_timeout = None self._log("pyrrent2http successfully shut down.") self.started = False self.logpipe = None