Szabó Győző
Szabó Győző

Reputation: 43

JSONRPC Player.GetItem returns empty details

I start a video with JSON-RPC call:

{"jsonrpc": "2.0",
    "method": "Player.Open",
    "params":
        {"item":
            {"file": "c:\\MyCodes\\samples\\sample-6s.mp4" }},
    "id": 1
}

Video is started. To get the video's details I use Player.GetItem method:

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

It returns:

{
    "id": "VideoGetItem",
    "jsonrpc": "2.0",
    "result": {
        "item": {
            "album": "",
            "artist": [],
            "episode": -1,
            "fanart": "",
            "file": "c:\\MyCodes\\samples\\sample-6s.mp4",
            "label": "sample-6s.mp4",
            "season": -1,
            "showtitle": "",
            "streamdetails": {
                "audio": [],
                "subtitle": [],
                "video": []
            },
            "thumbnail": "",
            "title": "",
            "tvshowid": -1,
            "type": "unknown"
        }
    }
}

But if I start the same video from KODI's GUI I get:

{
    "id": "VideoGetItem",
    "jsonrpc": "2.0",
    "result": {
        "item": {
            "album": "",
            "artist": [],
            "episode": -1,
            "fanart": "",
            "file": "C:\\MyCodes\\samples\\sample-6s.mp4",
            "label": "sample-6s.mp4",
            "season": -1,
            "showtitle": "",
            "streamdetails": {
                "audio": [
                    {
                        "channels": 2,
                        "codec": "mp3",
                        "language": ""
                    }
                ],
                "subtitle": [],
                "video": [
                    {
                        "aspect": 1.3333330154418946,
                        "codec": "mpeg4",
                        "duration": 2701,
                        "hdrtype": "",
                        "height": 384,
                        "language": "",
                        "stereomode": "",
                        "width": 512
                    }
                ]
            },
            "thumbnail": "image://video@C%3a%5cMyCodes%5csamples%5csample-6s.mp4/",
            "title": "",
            "tvshowid": -1,
            "type": "unknown"
        }
    }
}

Should I use a different method to get the currently playing video's details?

Upvotes: 0

Views: 243

Answers (0)

Related Questions