コード例 #1
0
        public OneClickProcessing(OneClickWindow oWindow, String strFileOrFolderName, OneClickSettings oSettings, LogItem oLog)
        {
            this.oOneClickWindow = oWindow;
            this.strInput        = strFileOrFolderName;
            this._log            = oLog;
            this._oSettings      = oSettings;
            this._bAbort         = false;

            if (!getInputDVDorBlurayBased(oSettings))
            {
                if (this._bAbort || !getInputFolderBased(oSettings))
                {
                    if (this._bAbort || !getInputFileBased(oSettings))
                    {
                        this.oOneClickWindow.setOpenFailure(this._bAbort);
                    }
                }
            }
        }
コード例 #2
0
        // batch processing
        public OneClickProcessing(OneClickWindow oWindow, List <OneClickFilesToProcess> arrFilesToProcess, OneClickSettings oSettings, LogItem oLog)
        {
            this.oOneClickWindow = oWindow;
            this._log            = oLog;
            this._bAbort         = false;

            List <OneClickFilesToProcess> arrFilesToProcessNew = new List <OneClickFilesToProcess>();
            MediaInfoFile iFile = null;

            foreach (OneClickFilesToProcess oFileToProcess in arrFilesToProcess)
            {
                if (iFile == null)
                {
                    MediaInfoFile iFileTemp = new MediaInfoFile(oFileToProcess.FilePath, ref _log, oFileToProcess.PGCNumber, oFileToProcess.AngleNumber);
                    if (iFileTemp.recommendIndexer(oSettings.IndexerPriority))
                    {
                        iFile = iFileTemp;
                    }
                    else if (iFileTemp.ContainerFileTypeString.Equals("AVS"))
                    {
                        iFile = iFileTemp;
                        iFile.IndexerToUse = FileIndexerWindow.IndexType.NONE;
                    }
                    else
                    {
                        _log.LogEvent(oFileToProcess.FilePath + " cannot be processed as no indexer can be used. skipping...");
                    }
                }
                else
                {
                    arrFilesToProcessNew.Add(oFileToProcess);
                }
            }
            if (iFile != null)
            {
                oOneClickWindow.setInputData(iFile, arrFilesToProcessNew);
            }
            else
            {
                oOneClickWindow.setInputData(null, new List <OneClickFilesToProcess>()); // not demuxable
            }
        }