예제 #1
0
def tv_add_to_library_parsed(id, player):
	if id.startswith('tt'):
		try:
			id = TVDB.search_by_imdb(id)
		except:
			plugin.ok('TV show not found', 'no show information found for %s in TheTVDB' % id)
	library_folder = lib_tvshows.setup_library(plugin.get_setting('tv_library_folder', unicode))
	show = TVDB[int(id)]
	imdb = show['imdb_id']
	library_folder = lib_tvshows.setup_library(plugin.get_setting('tv_library_folder', unicode))
	if lib_tvshows.add_tvshow_to_library(library_folder, show, player):
		plugin.setProperty('plugin.video.openmeta.clean_library', 'true')
	tools.scan_library(path=plugin.get_setting('tv_library_folder', unicode))
예제 #2
0
def get_tvdb_id_from_imdb_id(imdb_id):
    tvdb_id = TVDB.search_by_imdb(imdb_id)
    if not tvdb_id:
        plugin.ok('TV show not found',
                  'no show information found for %s in tvdb' % imdb_id)
    return tvdb_id