Exemple #1
0
 void mScanDelayTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
 {
     mScanDelayTimer.Stop();
     this.StopMonitor();
     if (mUI != null)
     {
         mUI.Invoke(mUI.AFMScan);
         mUI.Invoke(mUI.AFMDoAll);
         mDoc.ExportMissingXML(); // Export Missing episodes to XML
     }
     this.StartMonitor();
 }
Exemple #2
0
        void mScanDelayTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            mScanDelayTimer.Stop();
            this.StopMonitor();

            //We only wish to do a scan now if we are not already undertaking one
            if (!mDoc.CurrentlyBusy)
            {
                logger.Info("*******************************");
                logger.Info("Auto scan fired");
                if (mUI != null)
                {
                    switch (TVSettings.Instance.MonitoredFoldersScanType)
                    {
                    case TVRename.TVSettings.ScanType.Full:
                        mUI.Invoke(mUI.AFMFullScan);
                        break;

                    case TVRename.TVSettings.ScanType.Recent:
                        mUI.Invoke(mUI.AFMRecentScan);
                        break;

                    case TVRename.TVSettings.ScanType.Quick:
                        mUI.Invoke(mUI.AFMQuickScan);
                        break;
                    }

                    mUI.Invoke(mUI.AFMDoAll);

                    if (TVSettings.Instance.MonitoredFoldersScanType == TVSettings.ScanType.Full)
                    {
                        mDoc.ExportMissingXML(); // Export Missing episodes to XML if we scanned all
                    }
                }
            }
            else
            {
                logger.Info("Auto scan cancelled as the system is already busy");
            }
            this.StartMonitor();
        }