Bug Player.GetProperties, Property "time" returns negative value
#1
Hi,

i think there's a bug in Player.GetProperties in connection with the "time" property. Here's how to reproduce it:

- start Kodi
- start playback of a MP3 album with multiple titles
- now jump to lets say track 4 and let it play for a few seconds
- pause playback
- now press |<< to move to position 0:00
- Kodi will now return a negative value in the "milliseconds" part whereas is should be zero

Log of the JSON request:

Code:
{
    "jsonrpc": "2.0",
    "id": "14146359",
    "method": "Player.GetProperties",
    "params": {
        "playerid": 0,
        "properties": [
            "speed",
            "position",
            "time",
            "playlistid"
        ]
    }
}

Log of the JSON response:

Code:
{
    "id": "14146359",
    "jsonrpc": "2.0",
    "result": {
        "playlistid": 0,
        "position": 3,
        "speed": 0,
        "time": {
            "hours": 0,
            "milliseconds": -627,
            "minutes": 0,
            "seconds": 0
        }
    }
}

I guess that can be fixed pretty easily.

So lonG
Reply
#2
That's probably more a bug in the player implementation. JSON-RPC simply asks the player to provide the current position and returns that value.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
what is the video json statement for this ?
i need playtime of current video playing.

What is the id number you used?? (it works fine but dont know what the id is for)

i changed the id to 1414 and it stil workd normaly
Reply
#4
"id" - is a random value that can be used to link a response to a request
"playerid" - is the ID of the player, e.g. audio, video, PVR, etc. use Player.GetActivePlayers to get a list of active players

http://kodi.wiki/view/JSON-RPC_API/v6#Pl...ivePlayers
Reply

Logout Mark Read Team Forum Stats Members Help
Player.GetProperties, Property "time" returns negative value0