2012-02-27, 01:29
I am trying to get the length or "duration" of a movie but the results do not return. I am displaying currently playing items and when a song is selected it displays the duration but not when a movie is played. Is there a different property i should be requesting?
{"jsonrpc":"2.0","id":10,"method":"Player.GetItem","params":{"playerid":'+inttostr(GetActivePlayer)+',"properties":["thumbnail","artist","duration","album"]}}
results if movie:
{"id":10,"jsonrpc":"2.0","result":{"item":{"album":"","artist":"","id":133,"label":"Abduction","thumbnail":"special://masterprofile/Thumbnails/Video/3/3ce2f0b8.tbn","type":"movie"}}}
results if song:
{"id":10,"jsonrpc":"2.0","result":{"item":{"album":"The Black Parade","artist":"My Chemical Romance","duration":299,"id":1028,"label":"Famous Last Words","thumbnail":"special://masterprofile/Thumbnails/Music/8/8546d948.tbn","type":"song"}}}
{"jsonrpc":"2.0","id":10,"method":"Player.GetItem","params":{"playerid":'+inttostr(GetActivePlayer)+',"properties":["thumbnail","artist","duration","album"]}}
results if movie:
{"id":10,"jsonrpc":"2.0","result":{"item":{"album":"","artist":"","id":133,"label":"Abduction","thumbnail":"special://masterprofile/Thumbnails/Video/3/3ce2f0b8.tbn","type":"movie"}}}
results if song:
{"id":10,"jsonrpc":"2.0","result":{"item":{"album":"The Black Parade","artist":"My Chemical Romance","duration":299,"id":1028,"label":"Famous Last Words","thumbnail":"special://masterprofile/Thumbnails/Music/8/8546d948.tbn","type":"song"}}}