2006-07-04, 12:01 PM
sub i found a little bug, or well strange behaviour,
if the playlist is paused.
so pluginHelper.IsPlaylistPaused() returns true,
if the user hits the "play" command, gbpvr will automatically unpause the playlist and STILL pass the play command to the plugin.
i was trying to use this check (as the first check) in the onkeydown method
so then if music was playing back the user "hit" play on an album, it would stop the current one and play the new one.
however since gbpvr automatically resumes playback, that inital check never happens, and pluginHelper.IsPlaylistPaused() returns true. so in my code if you hit play, even if it was paused it would be stopped and new album played.
ie theres no way to only play if the playlist isnt paused.
i can *fix* it by saying if music is playing back, just dont do anything with the play button, but then i cant let the user "shortcut" to "stop current album and play this one".
in chance of changing this so its left up to the plugin to resume the playlist? or would that be a PITA to change?
this bug was bugging me, i wasnt sure where it was failing, i thought it was something in my code that was resuming it and then starting a playlist.
if the playlist is paused.
so pluginHelper.IsPlaylistPaused() returns true,
if the user hits the "play" command, gbpvr will automatically unpause the playlist and STILL pass the play command to the plugin.
i was trying to use this check (as the first check) in the onkeydown method
Code:
if (cmd == Settings.KeyMappings.Main.Play)
{
if (pluginHelper != null && pluginHelper.IsPlaylistPaused())
{
pluginHelper.ResumePlaylistPlayback();
return true; //(ive handled it)
}
}
however since gbpvr automatically resumes playback, that inital check never happens, and pluginHelper.IsPlaylistPaused() returns true. so in my code if you hit play, even if it was paused it would be stopped and new album played.
ie theres no way to only play if the playlist isnt paused.
i can *fix* it by saying if music is playing back, just dont do anything with the play button, but then i cant let the user "shortcut" to "stop current album and play this one".
in chance of changing this so its left up to the plugin to resume the playlist? or would that be a PITA to change?
this bug was bugging me, i wasnt sure where it was failing, i thought it was something in my code that was resuming it and then starting a playlist.