если исключения - возвращаем False
parent
4ec38a5c13
commit
f8ac0c159d
12
addon.py
12
addon.py
|
@ -34,6 +34,7 @@ def root(plugin, content_type='video'):
|
||||||
))
|
))
|
||||||
@Route.register
|
@Route.register
|
||||||
def search_history(plugin):
|
def search_history(plugin):
|
||||||
|
try:
|
||||||
@Route.register_delayed
|
@Route.register_delayed
|
||||||
def set_view():
|
def set_view():
|
||||||
xbmc.executebuiltin('Container.SetViewMode("51")')
|
xbmc.executebuiltin('Container.SetViewMode("51")')
|
||||||
|
@ -44,6 +45,8 @@ def search_history(plugin):
|
||||||
yield item
|
yield item
|
||||||
else:
|
else:
|
||||||
yield None
|
yield None
|
||||||
|
except:
|
||||||
|
yield False
|
||||||
@Route.register
|
@Route.register
|
||||||
def new_search(plugin):
|
def new_search(plugin):
|
||||||
q = utils.keyboard('Поиск')
|
q = utils.keyboard('Поиск')
|
||||||
|
@ -52,6 +55,7 @@ def new_search(plugin):
|
||||||
return search(plugin, q)
|
return search(plugin, q)
|
||||||
@Route.register
|
@Route.register
|
||||||
def search(plugin, search_query, thumb=None):
|
def search(plugin, search_query, thumb=None):
|
||||||
|
try:
|
||||||
@Route.register_delayed
|
@Route.register_delayed
|
||||||
def set_view():
|
def set_view():
|
||||||
xbmc.executebuiltin('Container.SetViewMode("51")')
|
xbmc.executebuiltin('Container.SetViewMode("51")')
|
||||||
|
@ -83,8 +87,11 @@ def search(plugin, search_query, thumb=None):
|
||||||
res_items.append(item)
|
res_items.append(item)
|
||||||
progress.close()
|
progress.close()
|
||||||
return res_items
|
return res_items
|
||||||
|
except:
|
||||||
|
return False
|
||||||
@Route.register
|
@Route.register
|
||||||
def open_torrent(plugin, url='--back--', cookies={}, referer='', path=''):
|
def open_torrent(plugin, url='--back--', cookies={}, referer='', path=''):
|
||||||
|
try:
|
||||||
if url == '--back--':
|
if url == '--back--':
|
||||||
xbmc.executebuiltin('ActivateWindow("home")')
|
xbmc.executebuiltin('ActivateWindow("home")')
|
||||||
yield False
|
yield False
|
||||||
|
@ -120,10 +127,15 @@ def open_torrent(plugin, url='--back--', cookies={}, referer='', path=''):
|
||||||
yield item
|
yield item
|
||||||
else:
|
else:
|
||||||
yield None
|
yield None
|
||||||
|
except:
|
||||||
|
yield False
|
||||||
@Route.register
|
@Route.register
|
||||||
def play_file(plugin, t_full_path, f_index):
|
def play_file(plugin, t_full_path, f_index):
|
||||||
|
try:
|
||||||
vl = VideoLoop(t_full_path)
|
vl = VideoLoop(t_full_path)
|
||||||
vl.start(f_index)
|
vl.start(f_index)
|
||||||
return False
|
return False
|
||||||
|
except:
|
||||||
|
return False
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
run()
|
run()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="plugin.video.torrenter3" name="Torrenter3" provider-name="inpos" version="3.0.3">
|
<addon id="plugin.video.torrenter3" name="Torrenter3" provider-name="inpos" version="3.0.4">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.25.0"/>
|
<import addon="xbmc.python" version="2.25.0"/>
|
||||||
<import addon="script.module.pyrrent2http"/>
|
<import addon="script.module.pyrrent2http"/>
|
||||||
|
|
Loading…
Reference in New Issue