//Removes current playing song then adds to play history.
private Song DequeueToHistory(PlayOperation operationType)
{
if (_playlist.Count > 0)
{
var song = _playlist.Dequeue();
_history.AddSong(song, operationType);
if (_playlist.Count == 1)
{
PlaylistRequest request = new PlaylistRequest(
_status, _history, PlayOperation.PlayingLast,
CurrentChannel, CurrentSong);
var resp = request.GetResponse();
ExtractPlaylist(resp, false);
}
return(song);
}
else
{
return(null);
}
}