public List <IMp3> GetAlbumTracks() { var fileList = MusicDirectoryReader.GetMusicFilesFromFolder(_source.FullName); var trackList = new List <IMp3>(); foreach (var file in fileList) { var track = Mp3Adapter.GetMp3(file.FullName); trackList.Add(track); } return(trackList); }
public void ScanItemsToCollection() { var sourceFolder = new DirectoryInfo(_filePath); Log.WriteDetailToLog("Reading source folder: {0}", _filePath); foreach (var subFolder in sourceFolder.GetDirectories()) { try { var artist = MusicDirectoryReader.GetArtistsAlbumsFromDirectory(subFolder.FullName); AddArtistToCollection(artist); } catch (Exception ex) { Log.WriteErrorToLog(string.Format("Failed to scan source folder {0}", subFolder.FullName), ex); } } Log.WriteDetailToLog("Finished reading from source folder"); }
public FileInfo[] GetAdditionalFiles() { var fileList = MusicDirectoryReader.GetPictureFilesFromFolder(_source.FullName); return(fileList.ToArray()); }