本文整理匯總了Python中resources.lib.TheMovieDB.get_company_data方法的典型用法代碼示例。如果您正苦於以下問題:Python TheMovieDB.get_company_data方法的具體用法?Python TheMovieDB.get_company_data怎麽用?Python TheMovieDB.get_company_data使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類resources.lib.TheMovieDB
的用法示例。
在下文中一共展示了TheMovieDB.get_company_data方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: start_info_actions
# 需要導入模塊: from resources.lib import TheMovieDB [as 別名]
# 或者: from resources.lib.TheMovieDB import get_company_data [as 別名]
def start_info_actions(info, params):
if "artistname" in params:
params["artistname"] = params.get("artistname", "").split(" feat. ")[0].strip()
if not params.get("artist_mbid"):
params["artist_mbid"] = utils.fetch_musicbrainz_id(params["artistname"])
utils.log(info)
utils.pp(params)
if "prefix" in params and not params["prefix"].endswith('.'):
params["prefix"] = params["prefix"] + '.'
# Audio
if info == 'discography':
discography = AudioDB.get_artist_discography(params["artistname"])
if not discography:
discography = LastFM.get_artist_albums(params.get("artist_mbid"))
return discography
elif info == 'mostlovedtracks':
return AudioDB.get_most_loved_tracks(params["artistname"])
elif info == 'trackdetails':
return AudioDB.get_track_details(params.get("id", ""))
elif info == 'topartists':
return LastFM.get_top_artists()
# The MovieDB
elif info == 'incinemamovies':
return tmdb.get_movies("now_playing")
elif info == 'upcomingmovies':
return tmdb.get_movies("upcoming")
elif info == 'topratedmovies':
return tmdb.get_movies("top_rated")
elif info == 'popularmovies':
return tmdb.get_movies("popular")
elif info == 'ratedmovies':
return tmdb.get_rated_media_items("movies")
elif info == 'starredmovies':
return tmdb.get_fav_items("movies")
elif info == 'accountlists':
return tmdb.handle_lists(tmdb.get_account_lists())
elif info == 'listmovies':
return tmdb.get_movies_from_list(params["id"])
elif info == 'airingtodaytvshows':
return tmdb.get_tvshows("airing_today")
elif info == 'onairtvshows':
return tmdb.get_tvshows("on_the_air")
elif info == 'topratedtvshows':
return tmdb.get_tvshows("top_rated")
elif info == 'populartvshows':
return tmdb.get_tvshows("popular")
elif info == 'ratedtvshows':
return tmdb.get_rated_media_items("tv")
elif info == 'ratedepisodes':
return tmdb.get_rated_media_items("tv/episodes")
elif info == 'starredtvshows':
return tmdb.get_fav_items("tv")
elif info == 'similarmovies':
movie_id = params.get("id")
if not movie_id:
movie_id = tmdb.get_movie_tmdb_id(imdb_id=params.get("imdb_id"),
dbid=params.get("dbid"))
if movie_id:
return tmdb.get_similar_movies(movie_id)
elif info == 'similartvshows':
tvshow_id = None
dbid = params.get("dbid")
name = params.get("name")
tmdb_id = params.get("tmdb_id")
tvdb_id = params.get("tvdb_id")
imdb_id = params.get("imdb_id")
if tmdb_id:
tvshow_id = tmdb_id
elif dbid and int(dbid) > 0:
tvdb_id = local_db.get_imdb_id("tvshow", dbid)
if tvdb_id:
tvshow_id = tmdb.get_show_tmdb_id(tvdb_id)
elif tvdb_id:
tvshow_id = tmdb.get_show_tmdb_id(tvdb_id)
elif imdb_id:
tvshow_id = tmdb.get_show_tmdb_id(imdb_id, "imdb_id")
elif name:
tvshow_id = tmdb.search_media(media_name=name,
year="",
media_type="tv")
if tvshow_id:
return tmdb.get_similar_tvshows(tvshow_id)
elif info == 'studio':
if params.get("id"):
return tmdb.get_company_data(params["id"])
elif params.get("studio"):
company_data = tmdb.search_companies(params["studio"])
if company_data:
return tmdb.get_company_data(company_data[0]["id"])
elif info == 'set':
if params.get("dbid"):
name = local_db.get_set_name(params["dbid"])
if name:
params["setid"] = tmdb.get_set_id(name)
if params.get("setid"):
set_data, _ = tmdb.get_set_movies(params["setid"])
return set_data
elif info == 'movielists':
movie_id = params.get("id")
#.........這裏部分代碼省略.........