/// <summary> /// Creates the list of the tracks that will be scrobbled. /// </summary> /// <returns>List with scrobbles.</returns> protected override IEnumerable <Scrobble> CreateScrobbles() { DateTime timePlayed = Time; List <Scrobble> scrobbles = new List <Scrobble>(); foreach (var vm in LoadedFiles.Where(i => i.ToScrobble).Reverse()) { scrobbles.Add(new Scrobble(vm.LoadedFile.Tag.FirstPerformer, vm.LoadedFile.Tag.Album, vm.LoadedFile.Tag.Title, timePlayed) { AlbumArtist = vm.LoadedFile.Tag.FirstAlbumArtist, Duration = vm.LoadedFile.Properties.Duration }); timePlayed = timePlayed.Subtract(vm.LoadedFile.Properties.Duration); } return(scrobbles); }
/// <summary> /// Removes the selected files. /// </summary> public void RemoveFiles() { LoadedFiles = new ObservableCollection <LoadedFileViewModel>(LoadedFiles.Where(i => !i.ToScrobble).ToList()); NotifyCanProperties(); }