internal static void Initialize(PodcastPlugin plugin)
        {
            lock (init_sync)
            {
                if (initializing || initialized)
                {
                    return;
                }

                disposed     = false;
                initializing = true;
            }

            DownloadCore.Initialize();
            DownloadCore.MaxDownloads = 2;

            DownloadCore.DownloadCompleted   += OnDownloadCompletedHandler;
            DownloadCore.DownloadTaskStarted += OnDownloadTaskStartedHandler;
            DownloadCore.DownloadTaskStopped += OnDownloadTaskStoppedHandler;

            DownloadCore.DownloadDropped    += OnDownloadDroppedHandler;
            DownloadCore.DownloadRegistered += OnDownloadRegisteredHandler;
            DownloadCore.RegistrationFailed += OnRegistrationFailedHandler;

            downloads = new Hashtable();

            Library     = new PodcastLibrary();
            FeedFetcher = new PodcastFeedFetcher();

            Plugin = plugin;

            PodcastDBManager.InitPodcastDatabase();

            ServicePointManager.CertificatePolicy = new PodcastCertificatePolicy();

            if (Globals.Library.IsLoaded)
            {
                LoadFromDatabase();
            }
            else
            {
                Globals.Library.Reloaded += OnLibraryReloaded;
            }
        }
        internal static void Initialize(PodcastPlugin plugin)
        {
            lock (init_sync)
            {
                if (initializing || initialized)
                {
                    return;
                }

                disposed = false;
                initializing = true;
            }

            DownloadCore.Initialize ();
            DownloadCore.MaxDownloads = 2;

            DownloadCore.DownloadCompleted += OnDownloadCompletedHandler;
            DownloadCore.DownloadTaskStarted += OnDownloadTaskStartedHandler;
            DownloadCore.DownloadTaskStopped += OnDownloadTaskStoppedHandler;

            DownloadCore.DownloadDropped += OnDownloadDroppedHandler;
            DownloadCore.DownloadRegistered += OnDownloadRegisteredHandler;
            DownloadCore.RegistrationFailed += OnRegistrationFailedHandler;

            downloads = new Hashtable ();

            Library = new PodcastLibrary ();
            FeedFetcher = new PodcastFeedFetcher ();

            Plugin = plugin;

            PodcastDBManager.InitPodcastDatabase ();

            ServicePointManager.CertificatePolicy = new PodcastCertificatePolicy ();

            if(Globals.Library.IsLoaded)
            {
                LoadFromDatabase ();
            }
            else
            {
                Globals.Library.Reloaded += OnLibraryReloaded;
            }
        }