DiMartino добавил выход в программы для просмотра версии
parent
5c8a26b985
commit
2b5a21a120
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue