Beispiel #1
0
        /// <summary>
        /// Called when a SongSelectedMessage has been received
        /// Get the selected Song from the Now Playing playlist and report it
        /// </summary>
        private static void SongSelected()
        {
            int currentSongIndex = Playlists.CurrentSongIndex;

            // Only pass this on if a song has been selected. If no song is selected then SongFinished should have been called.
            if (currentSongIndex != -1)
            {
                MediaControllerViewModel.SongPlaying =
                    (( SongPlaylistItem )Playlists.GetNowPlayingPlaylist(ConnectionDetailsModel.LibraryId).PlaylistItems[currentSongIndex]).Song;
                DataReporter?.SongPlayingChanged();
            }
        }
Beispiel #2
0
 /// <summary>
 /// Called when a SongFinishedMessage has been received
 /// Update the model and report the change
 /// </summary>
 /// <param name="_"></param>
 private static void SongFinished(Song _)
 {
     MediaControllerViewModel.SongPlaying = null;
     DataReporter?.SongPlayingChanged();
 }