MediaPortal.Plugins.MovingPictures.DataProviders.DataProviderManager.AddSource C# (CSharp) Method

AddSource() public method

public AddSource ( Type providerType ) : AddSourceResult
providerType System.Type
return AddSourceResult
        public AddSourceResult AddSource(Type providerType)
        {
            // internal scripts dont need to be updated, so just quit
            // if we dont need to reload everything
            if (updateOnly) return AddSourceResult.FAILED;

            foreach (DBSourceInfo currSource in allSources)
                if (currSource.ProviderType == providerType)
                    return AddSourceResult.FAILED;

            DBSourceInfo newSource = new DBSourceInfo();
            newSource.ProviderType = providerType;
            newSource.Commit();
            updateListsWith(newSource);
            normalizePriorities();

            return AddSourceResult.SUCCESS;
        }

Same methods

DataProviderManager::AddSource ( Type providerType, string scriptContents ) : AddSourceResult
DataProviderManager::AddSource ( Type providerType, string scriptContents, bool active ) : AddSourceResult