当前位置: 首页>>代码示例>>Python>>正文


Python Tmdb.get_poster方法代码示例

本文整理汇总了Python中core.tmdb.Tmdb.get_poster方法的典型用法代码示例。如果您正苦于以下问题:Python Tmdb.get_poster方法的具体用法?Python Tmdb.get_poster怎么用?Python Tmdb.get_poster使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在core.tmdb.Tmdb的用法示例。


在下文中一共展示了Tmdb.get_poster方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: info

# 需要导入模块: from core.tmdb import Tmdb [as 别名]
# 或者: from core.tmdb.Tmdb import get_poster [as 别名]
def info(title, thumbnail):
    logger.info("streamondemand.eurostreaminginfo info")
    infoLabels={}
    plot={}
    try:
        from core.tmdb import Tmdb
        oTmdb= Tmdb(texto_buscado=title, tipo= "movie")
        count = 0
        if oTmdb.total_results > 0:
            #Mientras el thumbnail no coincida con el del resultado de la búsqueda, pasa al siguiente resultado
            while oTmdb.get_poster(size="w185") != thumbnail:
                count += 1
                oTmdb.load_resultado(index_resultado=count)
                if count == oTmdb.total_results : break
            infoLabels['code'] = oTmdb.get_id()
            infoLabels['plot'] = oTmdb.get_sinopsis()
            infoLabels['title'] = oTmdb.result["title"]
            infoLabels['year']= oTmdb.result["release_date"][:4]
            infoLabels['genre'] = ", ".join(oTmdb.result["genres"])
            infoLabels['rating'] = float(oTmdb.result["vote_average"])
            fanart=oTmdb.get_backdrop()
            poster=oTmdb.get_poster()
            plot['infoLabels']=infoLabels
            return plot, fanart, poster
    except:
        pass	
开发者ID:dentaku65,项目名称:plugin.video.streamondemand,代码行数:28,代码来源:eurostreaminginfo.py

示例2: info

# 需要导入模块: from core.tmdb import Tmdb [as 别名]
# 或者: from core.tmdb.Tmdb import get_poster [as 别名]
def info(title, year=""):
    logger.info("pelisalacarta.cultmoviez info")
    infolabels={}
    plot={}
    try:
        from core.tmdb import Tmdb
        otmdb= Tmdb(texto_buscado=title, tipo= "movie", year=year)
        infolabels['plot'] = otmdb.get_sinopsis()
        infolabels['year']= otmdb.result["release_date"][:4]
        infolabels['genre'] = otmdb.get_generos()
        infolabels['rating'] = float(otmdb.result["vote_average"])
        if otmdb.get_poster() != "": thumbnail = otmdb.get_poster()
        else: thumbnail = ""
        fanart=otmdb.get_backdrop()
        plot['infoLabels']=infolabels
        return plot, fanart, thumbnail
    except:
        pass
开发者ID:Jmlaguna89,项目名称:miNuevoRepo,代码行数:20,代码来源:cultmoviez.py

示例3: info_tv

# 需要导入模块: from core.tmdb import Tmdb [as 别名]
# 或者: from core.tmdb.Tmdb import get_poster [as 别名]
def info_tv(title, thumbnail):
    logger.info("streamondemand.guardaserie info")
    try:
        from core.tmdb import Tmdb
        oTmdb= Tmdb(texto_buscado=title, tipo= "tv", include_adult="true", idioma_busqueda="it")
        count = 0
        if oTmdb.total_results > 0:
            #Mientras el thumbnail no coincida con el del resultado de la búsqueda, pasa al siguiente resultado
            while oTmdb.get_poster(size="w185") != thumbnail:
                count += 1
                oTmdb.load_resultado(index_resultado=count)
                if count == oTmdb.total_results : break
            extrameta = {}
            extrameta["Year"] = oTmdb.result["release_date"][:4]
            extrameta["Genre"] = ", ".join(oTmdb.result["genres"])
            extrameta["Rating"] = float(oTmdb.result["vote_average"])
            fanart=oTmdb.get_backdrop()
            poster=oTmdb.get_poster()
            plot=oTmdb.get_sinopsis()
            return plot, fanart, poster, extrameta
    except:
        pass	
开发者ID:ferithon,项目名称:plugin.video.streamondemand,代码行数:24,代码来源:guardaserie.py

示例4: info_tv

# 需要导入模块: from core.tmdb import Tmdb [as 别名]
# 或者: from core.tmdb.Tmdb import get_poster [as 别名]
def info_tv(title):
    logger.info("streamondemand.cineblog01 info")
    try:
        from core.tmdb import Tmdb
        oTmdb = Tmdb(texto_buscado=title, tipo="tv", include_adult="false", idioma_busqueda="it")
        if oTmdb.total_results > 0:
            extrameta = {"Year": oTmdb.result["release_date"][:4],
                         "Genre": ", ".join(oTmdb.result["genres"]),
                         "Rating": float(oTmdb.result["vote_average"])}
            fanart = oTmdb.get_backdrop()
            poster = oTmdb.get_poster()
            plot = oTmdb.get_sinopsis()
            return plot, fanart, poster, extrameta
    except:
        pass
开发者ID:pierolenzo,项目名称:plugin.video.streamondemand,代码行数:17,代码来源:cineblog01.py

示例5: info

# 需要导入模块: from core.tmdb import Tmdb [as 别名]
# 或者: from core.tmdb.Tmdb import get_poster [as 别名]
def info(title):
    logger.info("streamondemand.italianstream info")
    try:
        from core.tmdb import Tmdb
        oTmdb= Tmdb(texto_buscado=title, tipo= "movie", include_adult="true", idioma_busqueda="it")
        count = 0
        if oTmdb.total_results > 0:
           extrameta = {}
           extrameta["Year"] = oTmdb.result["release_date"][:4]
           extrameta["Genre"] = ", ".join(oTmdb.result["genres"])
           extrameta["Rating"] = float(oTmdb.result["vote_average"])
           fanart=oTmdb.get_backdrop()
           poster=oTmdb.get_poster()
           plot=oTmdb.get_sinopsis()
           return plot, fanart, poster, extrameta
    except:
        pass	
开发者ID:simonfly80,项目名称:plugin.video.streamondemand-pureita,代码行数:19,代码来源:italianstream.py

示例6: InfoWindow

# 需要导入模块: from core.tmdb import Tmdb [as 别名]
# 或者: from core.tmdb.Tmdb import get_poster [as 别名]

#.........这里部分代码省略.........
        if "contentSerieName" in item and item.contentSerieName != "":
            self.item_serie = item.contentSerieName

        if "contentSeason" in item and item.contentSeason != "":
            self.item_temporada = item.contentSeason
        if "contentepisodeNumber" in item and item.contentepisodeNumber != "":
            self.item_episodio = item.contentepisodeNumber

        # i no existen contentepisodeNumber o contentSeason intenta sacarlo del titulo
        if not self.item_episodio or not self.item_temporada:
            self.get_episode_from_title(item)

    def get_dict_info(self, dct):
        self.result = dct

    def get_tmdb_movie_data(self, text):
        # Buscamos la pelicula si no lo esta ya
        if not self.otmdb:
            self.otmdb = Tmdb(texto_buscado=text, idioma_busqueda="es", tipo="movie")

        # Si no hay resultados salimos
        if not self.otmdb.get_id():
            return False

        # Informacion de la pelicula
        self.result["type"] = "movie"
        self.result["id_Tmdb"] = self.otmdb.get_id()
        self.result["title"] = self.otmdb.result["title"]
        self.result["original_title"] = self.otmdb.result["original_title"]
        self.result["date"] = self.get_date(self.otmdb.result["release_date"])
        self.result["language"] = self.get_language(self.otmdb.result["original_language"])
        self.result["rating"] = self.otmdb.result["vote_average"] + "/10 (" + self.otmdb.result["vote_count"] + ")"
        self.result["genres"] = ", ".join(self.otmdb.result["genres"])
        self.result["thumbnail"] = self.otmdb.get_poster()
        self.result["fanart"] = self.otmdb.get_backdrop()
        self.result["overview"] = self.otmdb.result["overview"]

        return True

    def get_tmdb_tv_data(self, text, season=0, episode=0):
        # Pasamos la temporada y episodeo a int()
        season = int(season)
        episode = int(episode)

        # Buscamos la serie si no esta cargada
        if not self.otmdb:
            self.otmdb = Tmdb(texto_buscado=text, idioma_busqueda="es", tipo="tv")

        _id = self.otmdb.get_id()

        # Si no hay resultados salimos
        if not _id:
            return False

        # informacion generica de la serie
        self.result["type"] = "tv"
        self.result["id_Tmdb"] = self.otmdb.get_id()
        self.result["title"] = self.otmdb.result.get("name", "N/A")
        self.result["rating"] = self.otmdb.result["vote_average"] + "/10 (" + self.otmdb.result["vote_count"] + ")"
        self.result["genres"] = ", ".join(self.otmdb.result["genres"])
        self.result["language"] = self.get_language(self.otmdb.result["original_language"])
        self.result["thumbnail"] = self.otmdb.get_poster()
        self.result["fanart"] = self.otmdb.get_backdrop()
        self.result["overview"] = self.otmdb.result.get("overview", "N/A")

        # Si tenemos informacion de temporada y episodio
开发者ID:kampanita,项目名称:pelisalacarta,代码行数:70,代码来源:xbmc_info_window.py


注:本文中的core.tmdb.Tmdb.get_poster方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。