private DataProviderManager()
{
dbManager = MovingPicturesCore.DatabaseManager;
detailSources = new List<DBSourceInfo>();
coverSources = new List<DBSourceInfo>();
backdropSources = new List<DBSourceInfo>();
allSources = new List<DBSourceInfo>();
sorters = new Dictionary<DataType, DBSourceInfoComparer>();
sorters[DataType.DETAILS] = new DBSourceInfoComparer(DataType.DETAILS);
sorters[DataType.COVERS] = new DBSourceInfoComparer(DataType.COVERS);
sorters[DataType.BACKDROPS] = new DBSourceInfoComparer(DataType.BACKDROPS);
debugMode = MovingPicturesCore.Settings.DataSourceDebugActive;
logger.Info("DataProviderManager Starting");
loadProvidersFromDatabase();
// if we have already done an initial load, set an internal flag to do updates only
// when loading internal scripts. We dont want to load in previously deleted scripts
// during the internal provider loading process.
updateOnly = MovingPicturesCore.Settings.DataProvidersInitialized;
LoadInternalProviders();
updateOnly = false;
MovingPicturesCore.Settings.DataProvidersInitialized = true;
}