Example #1
0
        public IProcessorMutable CreateProcessorAlbumToDirectory()
        {
            AlbumExplorerProcessor explorer = PrefsAlbumRecognition.CreateProcessorExplorer(false);

            explorer.OnFineProcessor = new AlbumTagToDirectoryProcessor(PrefsCommon.DirectoryPattern.Value <string>());

            return(new ID3.Processor.DirectoryProcessor(explorer, true));
        }
Example #2
0
        public IProcessorMutable CreateProcessor(string libraryPath, AlbumExplorerProcessor explorer)
        {
            explorer.OnFineProcessor = new AlbumToLibraryProcessor(
                libraryPath,
                (FileOperationProcessor.FileOperation)MoveOrCopy.Value <int>(),
                (FileOperationProcessor.ConflictSolving)Conflicts.Value <int>());

            return(new DirectoryProcessor(explorer, true));
        }
Example #3
0
        public AlbumExplorerProcessor CreateProcessorExplorer(bool verbose)
        {
            AlbumExplorerProcessor explorer
                = new AlbumExplorerProcessor(verbose);

            explorer.Explorer.ArtistRequired        = ArtistRequired.Value <bool>();
            explorer.Explorer.AlbumRequired         = AlbumRequired.Value <bool>();
            explorer.Explorer.TitleRequired         = TitleRequired.Value <bool>();
            explorer.Explorer.TrackNumberRequired   = TrackNumberRequired.Value <bool>();
            explorer.Explorer.ReleaseYearRequired   = ReleaseYearRequired.Value <bool>();
            explorer.Explorer.MinimumTracksRequired = Int32.Parse(MinimumTracksRequired.ItemT <DocEnum>().ValueStr);

            return(explorer);
        }
Example #4
0
        public IProcessorMutable CreateProcessor(
            TrackNumberGenerator trackNumberGenerator,
            PreferencesCommon prefsCommon,
            PreferencesAlbumRecognition prefsAlbumRecognition)
        {
            ProcessorListMutable toplevel = new ProcessorListMutable();

            {
                ProcessorListMutable plm = new ProcessorListMutable();

                if (DropCodecs.Value <bool>())
                {
                    plm.ProcessorList.Add(new DropCodecsProcessor());
                }

                plm.ProcessorList.Add(new TagVersionProcessor(ID3.Preferences.PreferredVersion));

                if (CreateTrackNumbers.Value <bool>())
                {
                    plm.ProcessorList.Add(new TagProcessorTrackNumber(trackNumberGenerator));
                }
                if (DropUnwantedFrames.Value <bool>())
                {
                    plm.ProcessorList.Add(CreateDropFramesProcessor());
                }

                TextProcessorList textProcessorList = new TextProcessorList();
                if (TextTrim.Value <bool>())
                {
                    textProcessorList.ProcessorList.Add(new TextTrim());
                }
                if (TextBreakCamelCase.Value <bool>())
                {
                    textProcessorList.ProcessorList.Add(new TextBreakCamelCase());
                }
                if (TextBreakUnderscores.Value <bool>())
                {
                    textProcessorList.ProcessorList.Add(new TextBreakUnderscores());
                }
                if (TextFirstCharUpper.Value <bool>())
                {
                    textProcessorList.ProcessorList.Add(new TextFirstCharUpper());
                }
                if (textProcessorList.ProcessorList.Count > 0)
                {
                    plm.ProcessorList.Add(new TagProcessor(new FrameProcessorText(textProcessorList)));
                }
                //return new DirectoryProcessor(new FileProcessor(plm), true);

                toplevel.ProcessorList.Add(new DirectoryProcessor(new FileProcessor(plm), true));
            }

            {
                AlbumExplorerProcessor explorer = prefsAlbumRecognition.CreateProcessorExplorer(false);
                explorer.OnFineProcessor = new AlbumTagToFilenameProcessor(prefsCommon.FileNamePattern.Value <string>());

                toplevel.ProcessorList.Add(new ID3.Processor.DirectoryProcessor(explorer, true));
            }

            {
                AlbumExplorerProcessor explorer = prefsAlbumRecognition.CreateProcessorExplorer(false);
                explorer.OnFineProcessor = new AlbumTagToDirectoryProcessor(prefsCommon.DirectoryPattern.Value <string>());

                toplevel.ProcessorList.Add(new ID3.Processor.DirectoryProcessor(explorer, true));
            }

            return(toplevel);
        }