Exemple #1
0
        public static bool DoImport
            (Importer importer,
            IBaseSystem iBaseSystem,
            IMLSection section,
            IMLImportProgress progress)
        {
            try
            {
                ThisProgress = progress;
                Settings.ImportingStarted   = false;
                Settings.ImportingCompleted = false;


                MediaLocationsRetriever
                .RetrieveMediaLocations
                    (importer);


                if (ImportingEngineHelpers
                    .PerformInitializationTasks(section))
                {
                    return(true);
                }


                var combinedSceneTags =
                    VideoFilenameCleaner
                    .ReadDictionaryReturnAllTags();



                StartMainImportingEngine
                    (importer,
                    iBaseSystem,
                    section,
                    combinedSceneTags);



                ImportingEngineHelpers
                .FinishImport();



                return(true);
            }
            catch (Exception e)
            {
                Debugger.LogMessageToFile
                    ("An unexpected error ocurred " +
                    "in the main import method DoImport(). " +
                    "The error was: " + e);
            }


            return(true);
        }
        protected internal static void ScanDiskForEntertainmentMedia
            (IEnumerable <string> combinedSceneTags,
            string[] videoExtensions,
            string[] audioExtensions,
            string pluginpath,
            string[] filmLocations,
            ArrayList extensionsToIgnore,
            IEnumerable <string> videoExtensionsCommon,
            Importer importer,
            IMLSection section)
        {
            ImportingEngineHelpers
            .BeginUpdatingSections
                (section);


            extensionsToIgnore
                = ScanDiskForMovies
                      (combinedSceneTags,
                      videoExtensions,
                      audioExtensions,
                      filmLocations,
                      extensionsToIgnore,
                      videoExtensionsCommon,
                      importer,
                      section);



            MediaImportingEngineHelpers
            .WriteNonMediaExtensionsToFile
                (extensionsToIgnore, pluginpath);



            ImportingEngineHelpers
            .EndUpdatingSections
                (section);
        }