def list_tvshow(force_rescan=False): tvdb = TVDB("9ec9de2268745b801af7c5f21d2a16b8") tvshow_model = TVShowsModel(DB_NAME) tvshow_list = TVShowList(TVSHOW_PATH) for tvshow_name in tvshow_list: if tvshow_model.get_tvshow_by_name( tvshow_name) and force_rescan is False: continue tvshow_name_decoded = unidecode.unidecode(tvshow_name) print(tvshow_name_decoded) yield tvshow_name, tvdb.search_tv_shows(tvshow_name_decoded)