diff --git a/addon.xml b/addon.xml index d905cb8..f129dea 100644 --- a/addon.xml +++ b/addon.xml @@ -6,6 +6,9 @@ + + executable + all en diff --git a/lib/pyrrent2http/pyrrent2http.py b/lib/pyrrent2http/pyrrent2http.py index f131285..e4d2d1e 100644 --- a/lib/pyrrent2http/pyrrent2http.py +++ b/lib/pyrrent2http/pyrrent2http.py @@ -667,13 +667,9 @@ class Pyrrent2http(object): try: absPath = os.path.abspath(urllib.unquote(uriPath)) logging.info('Opening local torrent file: %s' % (absPath,)) - with open(absPath, 'rb') as f: - btorrent_info = f.read() - torrent_info = lt.torrent_info(lt.bdecode(btorrent_info)) + torrent_info = lt.torrent_info(absPath) except Exception as e: strerror = e.args - if btorrent_info == '': - logging.error('Torrent-file is empty: %s' % (absPath,)) logging.error('Build torrent params error is (%s)' % (strerror,)) if STANDALONE: sys.exit(1)