gpt4 book ai didi

json - 如何获取XBMC当前播放的项目?

转载 作者:行者123 更新时间:2023-12-02 01:05:49 26 4
gpt4 key购买 nike

我想使用 json/rpc 来获取 XBMC 中当前正在播放的项目,我对所有播放器类型使用以下命令:

  • 获得活跃玩家:

    {
    "jsonrpc": "2.0",
    “方法”:“Player.GetActivePlayers”,
    “编号”:1
    }

  • 并根据上述结果得到当前正在播放的项目:

    {
    "jsonrpc": "2.0",
    “方法”:“播放列表.GetItems”,
    “参数”:{
    "playlistid": 播放列表.id,
    “属性”:[“标题”,
    “评分”,
    “季节”,
    “插曲”,
    “阴谋”,
    “运行”,
    “节目标题”,
    “缩略图”,
    “年”,
    “类型”]
    },
    “编号”:1
    }

现在,我有三种不同的情况:

1- 如果当前播放的项目是“电影”:每件事都非常有效。

2- 如果当前播放的项目是“歌曲”:结果集不仅包含当前播放的歌曲,还包含包含当前播放歌曲的专辑中的所有歌曲。

3- 如果当前播放的项目是“tvShow episode”:结果集是空的,就像当前没有播放任何内容一样。

最佳答案

应该这样做:

{
"jsonrpc": "2.0",
"method": "Player.GetItem",
"params": {
"properties": [
"title",
"album",
"artist",
"season",
"episode",
"duration",
"showtitle",
"tvshowid",
"thumbnail",
"file",
"fanart",
"streamdetails"
],
"playerid": 1
},
"id": "VideoGetItem"
}

检查 further API examples .

关于json - 如何获取XBMC当前播放的项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22654466/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com