utils.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:context.elementum 作者: elgatito 项目源码 文件源码
def doPlay():
    if not configureTMDB():
        return

    dbid = getDbId()
    imdbnumber = getIMDBNumber()
    mediatype = getMediaType()

    xbmcgui.Dialog().notification(ADDON.getLocalizedString(32009), sys.listitem.getLabel(), xbmcgui.NOTIFICATION_INFO, 3000)

    log.debug("Playing for: DBID=%s, IMDB=%s, MediaType=%s" % (dbid, imdbnumber, mediatype))

    if mediatype == 'movie':
        tmdb_id = getTMDBId('movie', imdbnumber)
        url = "plugin://plugin.video.quasar/library/movie/play/%s" % tmdb_id
    elif mediatype == 'episode':
        (show_id, season_number, episode_number) = getEpisodeDetails()
        tmdb_id = getTMDBId('show', show_id)
        url = "plugin://plugin.video.quasar/library/show/play/%s/%s/%s" % (tmdb_id, season_number, episode_number)

    log.debug("Fetched TMDB: %s" % tmdb_id)
    if tmdb_id is not None:
        log.debug("Starting Quasar with: %s" % url)
        xbmc.Player().play(url)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号