/// <summary> /// Adds a track to the bottom of the play queue. /// </summary> /// <param name="f">the track file to add</param> public void AddTrackFileToQueue(FolderEntry f) { if (f.IsFolder) { return; } this.PlayQueue.Add(new PlayableItem(f.storage as StorageFile)); }
/// <summary> /// Clears the existing lists of albums and tracks, and then loads a new list of albums for a given artist. /// </summary> /// <param name="f">the folder whose name is the artist name</param> public async void OpenArtistFolder(FolderEntry f) { this.Albums.Clear(); this.Tracks.Clear(); if (string.IsNullOrEmpty(f.DisplayName)) { this.AlbumsFolderLabel = ""; } else { this.AlbumsFolderLabel = "(in " + f.DisplayName + ")"; } this.TracksFolderLabel = ""; await ToccataModel.PopulateFolderItems(this.Albums, f.storage as StorageFolder); }
/// <summary> /// Clears the existing lists of tracks, and then loads a new list of tracks for a given album. /// </summary> /// <param name="f">the folder whose name is the album name</param> public async void OpenAlbumFolder(FolderEntry f) { this.Tracks.Clear(); if (string.IsNullOrEmpty(f.DisplayName)) { this.TracksFolderLabel = ""; } else { this.TracksFolderLabel = "(in " + f.DisplayName + ")"; } await ToccataModel.PopulateFolderItems(this.Tracks, f.storage as StorageFolder); if (this.PlayQueue.Count == 0) // if there are no tracks already queued to play, { this.AddTracks(); // auto-add the ones we just found in this folderto the play queue } }