Exemple #1
0
        public UPnPTrackInfo(MusicTrack track, UPnPMusicSource source) : this(track as Item, source)
        {
            ArtistName = track.Artists.Count > 0 ? track.Artists[0].Name : "";
            AlbumTitle = track.Albums.Count > 0 ? track.Albums[0] : "";

            TrackNumber = track.OriginalTrackNumber.GetValueOrDefault();

            Genre = track.Genres.Count > 0 ? track.Genres[0] : "";
        }
        private void AddMusic(List <MusicTrack> tracks)
        {
            if (music_source == null)
            {
                music_source = new UPnPMusicSource(udn);
                AddChildSource(music_source);
            }

            music_source.AddTracks(tracks);
        }
Exemple #3
0
        public UPnPTrackInfo(MusicTrack track, UPnPMusicSource source)
            : this(track as Item, source)
        {
            ArtistName = track.Artists.Count > 0 ? track.Artists[0].Name : "";
            AlbumTitle = track.Albums.Count > 0 ? track.Albums[0] : "";

            TrackNumber = track.OriginalTrackNumber.GetValueOrDefault ();

            Genre = track.Genres.Count > 0 ? track.Genres[0] : "";
        }