Exemple #1
0
def tv_tvshow(id):
	flatten = plugin.get_setting('flatten.tvshows', int)
	if flatten == 2:
		plugin.set_content('episodes')
		action = 'all'
	elif flatten == 1:		
		id = int(id)
		show = TVDB[id]
		if len(show.items()) == 1 or (len(show.items()) == 2 and show.items()[1][0] == 1):
			plugin.set_content('episodes')
			action = 'one'
		else:
			plugin.set_content('seasons')
			action = 'none'
	else:
		plugin.set_content('seasons')
		action = 'none'
	return plugin.finish(items=list_seasons_tvdb(id, action), sort_methods=SORT)
Exemple #2
0
def tv_season(id, season_num):
    plugin.set_content('episodes')
    return plugin.finish(items=list_episodes_tvdb(id, season_num),
                         sort_methods=SORT)
Exemple #3
0
def tv_tvshow(id):
    plugin.set_content('seasons')
    return plugin.finish(items=list_seasons_tvdb(id), sort_methods=SORT)