def run():
"""Docstring"""
# Gather the request info
params = get_params()
if 'action' in params:
if params['action'] == "search":
# If the action is 'search' use item information kodi provides to search for subtitles
search(get_info(), get_languages(params, 0))
elif params['action'] == "manualsearch":
# If the action is 'manualsearch' use user manually inserted string to search
# for subtitles
manual_search(params['searchstring'], get_languages(params, 0))
elif params['action'] == "download":
# If the action is 'download' use the info provided to download the subtitle and give
# the file path to kodi
download(params)
elif params['action'] == "download-addicted":
# If the action is 'download' use the info provided to download the subtitle and give
# the file path to kodi
download_addicted(params)
xbmcplugin.endOfDirectory(HANDLE)
评论列表
文章目录