private void ScanLibrary()
 {
     if (analysis_job == null)
     {
         analysis_job           = new AnalyzeLibraryJob();
         analysis_job.Finished += delegate { analysis_job = null; };
     }
 }
        public void Dispose()
        {
            ServiceManager.SourceManager.MusicLibrary.TracksAdded   -= OnLibraryTracksAdded;
            ServiceManager.SourceManager.MusicLibrary.TracksDeleted -= OnLibraryTracksDeleted;

            if (analysis_job != null)
            {
                ServiceManager.JobScheduler.Cancel(analysis_job);
                analysis_job = null;
            }

            DistanceCalculator.Dispose();

            try {
                Analyzer.CancelAnalyze();
            } catch (Exception) {
            }

            action_service.UIManager.RemoveUi(uiManagerId);
            action_service.UIManager.RemoveActionGroup(actions);

            instance = null;
        }
        public void Dispose()
        {
            ServiceManager.SourceManager.MusicLibrary.TracksAdded -= OnLibraryTracksAdded;
            ServiceManager.SourceManager.MusicLibrary.TracksDeleted -= OnLibraryTracksDeleted;

            if (analysis_job != null) {
                ServiceManager.JobScheduler.Cancel (analysis_job);
                analysis_job = null;
            }

            DistanceCalculator.Dispose ();

            try {
                Analyzer.CancelAnalyze ();
            } catch (Exception) {
            }

            action_service.UIManager.RemoveUi (uiManagerId);
            action_service.UIManager.RemoveActionGroup (actions);

            instance = null;
        }
 private void ScanLibrary()
 {
     if (analysis_job == null) {
         analysis_job = new AnalyzeLibraryJob ();
         analysis_job.Finished += delegate { analysis_job = null; };
     }
 }