protected override Task RemoveSongInternal(int index) { return(TaskEx.Run(() => { PlaylistDatabase.Delete(index); if (index == Index) { PlaylistDatabase.SetIndex(NO_POSITION); } else if (index >= 0 && index < Index && Index > 0) { // A track has been removed from "above" the currently playing track, // so the Index needs to adapt and move one step up, so that it continues // to point at the same track. PlaylistDatabase.SetIndex(Index - 1); } })); }
protected override Task SendSkipCommand(int index) { PlaylistDatabase.SetIndex(index); return(AsyncTasks.Noop()); }