def set_related_url(mode):
    title = xbmc.getInfoLabel('ListItem.Title')
    title = re.sub(' \(\d{4}\)$', '', title)
    year = xbmc.getInfoLabel('ListItem.Year')
    queries = {'mode': mode, 'video_type': __get_media_type(), 'title': title, 'year': year, 'trakt_id': 0}  # trakt_id set to 0, not used and don't have it
    runstring = 'RunPlugin(plugin://plugin.video.salts%s)' % (kodi.get_plugin_url(queries))
    xbmc.executebuiltin(runstring)
def set_related_url(mode):
    video_type = __get_media_type()
    if video_type == VIDEO_TYPES.SEASON:
        title = xbmc.getInfoLabel('ListItem.TVShowtitle')
    else:
        title = xbmc.getInfoLabel('ListItem.Title')
    title = re.sub(' \(\d{4}\)$', '', title)
    year = xbmc.getInfoLabel('ListItem.Year')
    queries = {'mode': mode, 'video_type': video_type, 'title': title, 'year': year, 'trakt_id': 0}  # trakt_id set to 0, not used and don't have it
    if video_type == VIDEO_TYPES.SEASON:
        queries['season'] = xbmc.getInfoLabel('ListItem.Season')
    runstring = 'RunPlugin(plugin://plugin.video.salts%s)' % (kodi.get_plugin_url(queries))
    xbmc.executebuiltin(runstring)
Beispiel #3
0
def set_related_url(mode):
    title = xbmc.getInfoLabel('ListItem.Title')
    year = xbmc.getInfoLabel('ListItem.Year')
    queries = {
        'mode': mode,
        'video_type': __get_media_type(),
        'title': title,
        'year': year,
        'trakt_id': 0
    }  # trakt_id set to 0, not used and don't have it
    runstring = 'RunPlugin(plugin://plugin.video.salts%s)' % (
        kodi.get_plugin_url(queries))
    xbmc.executebuiltin(runstring)
Beispiel #4
0
def add_to_list():
    show_id = {'show_id': xbmc.getInfoLabel('ListItem.IMDBNumber')}
    if __get_media_type() == VIDEO_TYPES.TVSHOW:
        show_id['id_type'] = 'tvdb'
        section = SECTIONS.TV
    elif __get_media_type() == VIDEO_TYPES.MOVIE:
        show_id['id_type'] = 'tmdb'
        section = SECTIONS.MOVIES

    # override id_type is it looks like an imdb #
    if show_id['show_id'].startswith('tt'):
        show_id['id_type'] = 'imdb'
    
    if 'id_type' in show_id:
        queries = {'mode': MODES.ADD_TO_LIST, 'section': section}
        queries.update(show_id)
        runstring = 'RunPlugin(plugin://plugin.video.salts%s)' % (kodi.get_plugin_url(queries))
        xbmc.executebuiltin(runstring)
Beispiel #5
0
def add_to_list():
    show_id = {'show_id': xbmc.getInfoLabel('ListItem.IMDBNumber')}
    if __get_media_type() == VIDEO_TYPES.TVSHOW:
        show_id['id_type'] = 'tvdb'
        section = SECTIONS.TV
    elif __get_media_type() == VIDEO_TYPES.MOVIE:
        show_id['id_type'] = 'tmdb'
        section = SECTIONS.MOVIES

    # override id_type is it looks like an imdb #
    if show_id['show_id'].startswith('tt'):
        show_id['id_type'] = 'imdb'

    if 'id_type' in show_id:
        queries = {'mode': MODES.ADD_TO_LIST, 'section': section}
        queries.update(show_id)
        runstring = 'RunPlugin(plugin://plugin.video.salts%s)' % (
            kodi.get_plugin_url(queries))
        xbmc.executebuiltin(runstring)
Beispiel #6
0
def search(section):
    queries = {'mode': MODES.SEARCH, 'section': section}
    runstring = 'RunPlugin(plugin://plugin.video.salts%s)' % (kodi.get_plugin_url(queries))
    xbmc.executebuiltin(runstring)
Beispiel #7
0
def scraper_sort_order():
    queries = {'mode': MODES.SCRAPERS}
    runstring = 'RunAddon(plugin.video.salts,%s)' % (kodi.get_plugin_url(queries))
    xbmc.executebuiltin(runstring)
Beispiel #8
0
def search(section):
    queries = {'mode': MODES.SEARCH, 'section': section}
    runstring = 'RunPlugin(plugin://plugin.video.salts%s)' % (
        kodi.get_plugin_url(queries))
    xbmc.executebuiltin(runstring)
Beispiel #9
0
def scraper_sort_order():
    queries = {'mode': MODES.SCRAPERS}
    runstring = 'RunAddon(plugin.video.salts,%s)' % (
        kodi.get_plugin_url(queries))
    xbmc.executebuiltin(runstring)