DiMartino добавил выход в программы для просмотра версии

sandbox1
inpos 2016-03-10 17:49:24 +03:00
parent 5c8a26b985
commit 2b5a21a120
2 changed files with 4 additions and 5 deletions

View File

@ -6,6 +6,9 @@
<import addon="script.module.chardet" />
</requires>
<extension point="xbmc.python.module" library="lib"/>
<extension point="xbmc.python.script" library="default.py">
<provides>executable</provides>
</extension>
<extension point="xbmc.addon.metadata">
<platform>all</platform>
<language>en</language>

View File

@ -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)