DiMartino добавил выход в программы для просмотра версии
parent
5c8a26b985
commit
2b5a21a120
|
@ -6,6 +6,9 @@
|
||||||
<import addon="script.module.chardet" />
|
<import addon="script.module.chardet" />
|
||||||
</requires>
|
</requires>
|
||||||
<extension point="xbmc.python.module" library="lib"/>
|
<extension point="xbmc.python.module" library="lib"/>
|
||||||
|
<extension point="xbmc.python.script" library="default.py">
|
||||||
|
<provides>executable</provides>
|
||||||
|
</extension>
|
||||||
<extension point="xbmc.addon.metadata">
|
<extension point="xbmc.addon.metadata">
|
||||||
<platform>all</platform>
|
<platform>all</platform>
|
||||||
<language>en</language>
|
<language>en</language>
|
||||||
|
|
|
@ -667,13 +667,9 @@ class Pyrrent2http(object):
|
||||||
try:
|
try:
|
||||||
absPath = os.path.abspath(urllib.unquote(uriPath))
|
absPath = os.path.abspath(urllib.unquote(uriPath))
|
||||||
logging.info('Opening local torrent file: %s' % (absPath,))
|
logging.info('Opening local torrent file: %s' % (absPath,))
|
||||||
with open(absPath, 'rb') as f:
|
torrent_info = lt.torrent_info(absPath)
|
||||||
btorrent_info = f.read()
|
|
||||||
torrent_info = lt.torrent_info(lt.bdecode(btorrent_info))
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
strerror = e.args
|
strerror = e.args
|
||||||
if btorrent_info == '':
|
|
||||||
logging.error('Torrent-file is empty: %s' % (absPath,))
|
|
||||||
logging.error('Build torrent params error is (%s)' % (strerror,))
|
logging.error('Build torrent params error is (%s)' % (strerror,))
|
||||||
if STANDALONE:
|
if STANDALONE:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Loading…
Reference in New Issue