public DbAlbum GetAlbum(int index) { AlbumMetadata albumMetadata = _zuneLibrary.GetAlbumMetadata(index); var albumMediaId = GetFieldValue(index, EListType.eAlbumList, ZuneQueryList.AtomNameToAtom("ZuneMediaID"), Guid.Empty); var dateAdded = GetFieldValue(index, EListType.eAlbumList, ZuneQueryList.AtomNameToAtom("DateAdded"), new DateTime()); var album = new DbAlbum { AlbumMediaId = albumMediaId, DateAdded = dateAdded, Title = albumMetadata.AlbumTitle, Artist = albumMetadata.AlbumArtist, ArtworkUrl = albumMetadata.CoverUrl, MediaId = albumMetadata.MediaId, ReleaseYear = albumMetadata.ReleaseYear.ToString(), TrackCount = (int)albumMetadata.TrackCount, Tracks = GetTracksForAlbum(albumMetadata.MediaId).ToList() }; albumMetadata.Dispose(); return(album); }