Exemple #1
0
        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);
        }
Exemple #2
0
        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");
        }
Exemple #3
0
        public FileInfo[] GetAdditionalFiles()
        {
            var fileList = MusicDirectoryReader.GetPictureFilesFromFolder(_source.FullName);

            return(fileList.ToArray());
        }