Exemple #1
0
 /// <summary>
 /// Get all the Song entries associated with a specified Album.
 /// </summary>
 /// <param name="theArtist"></param>
 public async Task ProvideGroupContentsAsync(Album theAlbum)
 {
     if (theAlbum.Songs == null)
     {
         AlbumsController.GetAlbumContents(theAlbum);
     }
 }
Exemple #2
0
 /// <summary>
 /// Configure all the controllers
 /// </summary>
 private void ConfigureControllers()
 {
     AlbumsController.GetControllerData();
     ArtistsController.GetControllerData();
     PlaylistsController.GetControllerData();
     LibraryNameDisplayController.GetControllerData();
     FilterManagementController.GetControllerData();
     PlaybackSelectionController.GetControllerData();
     AutoplayController.GetControllerData();
     PlaybackModeController.GetControllerData();
     PlaybackManagementController.GetControllerData();
     MediaControllerController.GetControllerData();
     MediaNotificationController.GetControllerData();
     NowPlayingController.GetControllerData();
 }
Exemple #3
0
        /// <summary>
        /// Check if all the selected songs are contained within the selected albums and that all the album's songs are selected
        /// </summary>
        private void CheckForCompleteAlbums()
        {
            // If there are any selected albums then check that all the selected songs belong to those albums (and none left over )
            completeAlbums = false;

            if (selectedObjects.Albums.Count > 0)
            {
                // Form a HashSet from all the selected songs and check if any are not included in the selected albums
                HashSet <int> selectedSongs = selectedObjects.Songs.Select(song => song.Id).ToHashSet();

                foreach (Album album in selectedObjects.Albums)
                {
                    AlbumsController.GetAlbumContents(album);

                    foreach (Song song in album.Songs)
                    {
                        selectedSongs.Remove(song.Id);
                    }
                }

                completeAlbums = (selectedSongs.Count == 0);
            }
        }
Exemple #4
0
 /// <summary>
 /// Called when the sort selector has changes the sort order
 /// No need to wait for this to finish. Albums display will be refreshed when it is complete
 /// </summary>
 public override void SortOrderChanged() => AlbumsController.SortData();