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 }); }
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, }); }
private MusicItem ToItem(PimpTrack track) { return(AudioConversions.PimpTrackToMusicItem(track, null, null, null, null)); }