2010-10-19, 22:35
Montellese Wrote:I did some more digging into the code concerning the fact that the "playing" is always set to "true" when calling Audio-/VideoPlayer.GetTime/.GetTimeMS/.State and found this in the AVPlayerOperations.cpp at multiple occasions:
I then did some searching on the IPlayer.IsPlaying() and found out that it doesn't actually tell you whether a song/video is playing or not but rather that the player itself (DVDPlayer, PAPlayer, ExternalPlayer) is active (although the current song/video might be paused).Code:result["playing"] = g_application.IsPlaying();
result["paused"] = g_application.IsPaused();
Is this the inteded use in JSON RPC? If so I don't understand why because whenever IPlayer.IsPlaying() returns false it also means that the player is not active at all and therefore can't even be accessed through the JSON RPC API because it only allows you to access the currently active player.
Why are there two items "playing" and "paused" anyway? Doesn't the value of one automatically imply the value of the other?
Hmm, I really dislike our interfaces at times. Might be that should be result["playing"] = g_application.IsPlaying() && !g_application.IsPaused();