private void LoadDetailsFromCddbServer() { CdMetadata cdData = _cdMetadataService.GetMetadataForCd(AudioFilePath[0]); int trackIdx = _audioCdService.GetTrackNumberFromCdaFilename(AudioFilePath); Artist = cdData.Artist; Album = cdData.Album; Title = cdData.Tracks[trackIdx]; }
public static IAudioFileMetadata BuildAudioFileMetaData(CdMetadata cdMetadata, int trackNumber) { var AudioFileMetadata = LibraryPackage.GetInstance <IAudioFileMetadata>() as AudioFileMetadata; AudioFileMetadata.Title = cdMetadata.Tracks[trackNumber]; AudioFileMetadata.Artist = cdMetadata.Artist; AudioFileMetadata.Album = cdMetadata.Album; return(AudioFileMetadata as IAudioFileMetadata); }
public List <IAudioFileMetadata> GetAudioFileMetaDataForCd(char driveLetter) { CdMetadata metadata = GetMetadataForCd(driveLetter); List <IAudioFileMetadata> audioMetadata = new List <IAudioFileMetadata>(); for (int i = 0; i < metadata.Tracks.Count(); i++) { audioMetadata.Add(AudioFileMetadata.BuildAudioFileMetaData(metadata, i)); } return(audioMetadata); }