Пример #1
0
        public static MusicItem PimpTrackToMusicItem(PimpTrack track, Uri source, string username, string password, string cloudServer)
        {
            string path    = null;
            var    maybeId = track.id;

            if (maybeId != null)
            {
                path = Decode(maybeId);
            }
            return(new MusicItem()
            {
                Id = maybeId,
                Name = track.title,
                Artist = track.artist,
                Album = track.album,
                Path = path,
                Duration = TimeSpan.FromSeconds(track.duration),
                IsDir = false,
                Size = track.size,
                Source = source,
                Username = username,
                Password = password,
                CloudServer = cloudServer
            });
        }
Пример #2
0
 public static MusicItem PimpTrackToMusicItem(PimpTrack track)
 {
     return(new MusicItem()
     {
         Id = track.id,
         Name = track.title,
         Artist = track.artist,
         Album = track.album,
         Path = track.path,
         Duration = TimeSpan.FromSeconds(track.duration),
         IsDir = false,
         Size = track.size,
         Source = track.url,
     });
 }
Пример #3
0
 private MusicItem ToItem(PimpTrack track)
 {
     return(AudioConversions.PimpTrackToMusicItem(track, null, null, null, null));
 }