def lists_add_episode_to_list(src, id, season, episode): selected = get_list_selection() if selected is not None: user = selected['user'] slug = selected['slug'] if src == "tvdb" or src == "trakt": #trakt seems to want integers season = int(season) episode = int(episode) id = int(id) data = { "shows": [ { "seasons": [ { "number": season, "episodes": [ { "number": episode } ] } ], "ids": { src: id } } ] } trakt.add_to_list(user, slug, data)
def lists_add_show_to_list(src, id): selected = get_list_selection() if selected is not None: user = selected['user'] slug = selected['slug'] if src == "tvdb" or src == "trakt": # trakt seems to want integers id = int(id) data = {"shows": [{"ids": {src: id}}]} trakt.add_to_list(user, slug, data)
def lists_add_movie_to_list(src, id): selected = get_list_selection() if selected is not None: user = selected['user'] slug = selected['slug'] if (src == "tmdb" or src == "trakt"): #trakt seems to want integers unless imdb id = int(id) data = {"movies": [{"ids": {src: id}}]} trakt.add_to_list(user, slug, data)
def lists_add_show_to_list(src, id): selected = get_list_selection() if selected is not None: user = selected['user'] slug = selected['slug'] if src == "tvdb" or src == "trakt": # trakt seems to want integers id = int(id) data = { "shows": [ { "ids": { src: id } } ] } trakt.add_to_list(user, slug, data)
def lists_add_movie_to_list(src, id): selected = get_list_selection() if selected is not None: user = selected['user'] slug = selected['slug'] if (src == "tmdb" or src == "trakt"): #trakt seems to want integers unless imdb id = int(id) data = { "movies": [ { "ids": { src: id } } ] } trakt.add_to_list(user, slug, data)