public IEnumerable <DbTrack> GetTracksForAlbum(int albumId) { ZuneQueryList zuneQueryList = _zuneLibrary.GetTracksByAlbum(0, albumId, EQuerySortType.eQuerySortOrderAscending, (uint)SchemaMap.kiIndex_AlbumID); for (int i = 0; i < zuneQueryList.Count; i++) { var track = new ZuneQueryItem(zuneQueryList, i); //for (int j = 0; j < 2000; j++) //{ // try // { // var test = track.GetFieldValue(typeof(long), (uint)j); // if (test != null) // { // Trace.WriteLine(ZuneQueryList.AtomToAtomName(j)); // Trace.WriteLine(test); // } // } // catch (Exception ex) // { // Trace.WriteLine("FAILED ON"); // } //} yield return(new DbTrack { FilePath = GetTrackValue <string>(track, "SourceURL"), MediaId = GetTrackValue <Guid>(track, "ZuneMediaID"), Title = GetTrackValue <string>(track, "Title"), TrackNumber = GetTrackValue <long>(track, "WM/TrackNumber").ToString() }); } zuneQueryList.Dispose(); }