コード例 #1
0
        private void SongManager_SongArtworkAvailable(object sender, NepAppSongMetadataArtworkEventArgs e)
        {
            var updater = NepApp.MediaPlayer.MediaTransportControls.DisplayUpdater;

            updater.Type = MediaPlaybackType.Music;

            //update artwork for song metadata
            RandomAccessStreamReference  uriStream   = null;
            NepAppSongMetadataBackground artworkType = NepAppSongMetadataBackground.Artist;

            if (NepApp.SongManager.ArtworkProcessor.IsSongArtworkAvailable(out artworkType) && artworkType == NepAppSongMetadataBackground.Album)
            {
                uriStream = RandomAccessStreamReference.CreateFromUri(NepApp.SongManager.ArtworkProcessor.GetSongArtworkUri(NepAppSongMetadataBackground.Album));
            }
            else
            {
                uriStream = RandomAccessStreamReference.CreateFromUri(e.CurrentMetadata.StationLogo);
            }
            if (uriStream != null)
            {
                updater.Thumbnail = uriStream;
            }


            updater.Update();
        }
コード例 #2
0
        private void SongManager_NoSongArtworkAvailable(object sender, NepAppSongMetadataArtworkEventArgs e)
        {
            var updater = NepApp.MediaPlayer.MediaTransportControls.DisplayUpdater;

            updater.Type = MediaPlaybackType.Music;

            updater.Thumbnail = RandomAccessStreamReference.CreateFromUri(e.CurrentMetadata.StationLogo);

            updater.Update();
        }