public void ClearingThePlaylist_Always_StopsPlayback() { _subject.Items.Add(new PlaylistItem()); _subject.Play(); _subject.Clear(); _subject.IsPlaying.Should().BeFalse(); _subject.IsPaused.Should().BeFalse(); }
private async Task AddToPlaylist(IEnumerable <ISubsonicModel> items, bool clearCurrent = false) { if (clearCurrent) { EventAggregator.Publish(new StopMessage()); PlaylistManagementService.Clear(); _playNextItem = true; } foreach (var item in items) { await AddItemToPlaylist(item); } }