Пример #1
0
        private void StartProcessing()
        {
            lblStatus.Text = "Connecting to database...";
            lblStatus.Refresh();
            lblProgress.Text = $"Updated: 0 | New: 0";
            lblProgress.Refresh();

            if (string.IsNullOrWhiteSpace(Settings.PlexDatabase))
            {
                string dbPath = @"%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db";
                Settings.PlexDatabase = Environment.ExpandEnvironmentVariables(dbPath);

                if (!File.Exists(Settings.PlexDatabase))
                {
                    Settings.PlexDatabase = string.Empty;
                }
            }

            m_PlexDb = new PlexDatabaseControlller(Settings.PlexDatabase);
            m_Itunes = new ItunesManager();

            progressBar1.Value = 0;
            m_UpdateCount      = 0;
            m_AddCount         = 0;

            bwProcess.RunWorkerAsync();
        }