From e00b216eef708a51c40a6a0acaefdd29bdec3e37 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 7 Jan 2014 17:29:43 -0800 Subject: [PATCH] fixed URL when adding an indexer --- src/NzbDrone.Api/ProviderModuleBase.cs | 22 +++++++++++----------- src/UI/Settings/Indexers/CollectionView.js | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/NzbDrone.Api/ProviderModuleBase.cs b/src/NzbDrone.Api/ProviderModuleBase.cs index 41e2ebe20..33f567850 100644 --- a/src/NzbDrone.Api/ProviderModuleBase.cs +++ b/src/NzbDrone.Api/ProviderModuleBase.cs @@ -43,27 +43,27 @@ private TProviderResource GetProviderById(int id) private List GetAll() { - var indexerDefinitions = _providerFactory.All(); + var providerDefinitions = _providerFactory.All(); - var result = new List(indexerDefinitions.Count); + var result = new List(providerDefinitions.Count); - foreach (var definition in indexerDefinitions) + foreach (var definition in providerDefinitions) { - var indexerResource = new TProviderResource(); - indexerResource.InjectFrom(definition); - indexerResource.Fields = SchemaBuilder.ToSchema(definition.Settings); + var providerResource = new TProviderResource(); + providerResource.InjectFrom(definition); + providerResource.Fields = SchemaBuilder.ToSchema(definition.Settings); - result.Add(indexerResource); + result.Add(providerResource); } return result; } - private int CreateProvider(TProviderResource indexerResource) + private int CreateProvider(TProviderResource providerResource) { - var indexer = GetDefinition(indexerResource); - indexer = _providerFactory.Create(indexer); - return indexer.Id; + var provider = GetDefinition(providerResource); + provider = _providerFactory.Create(provider); + return provider.Id; } private void UpdateProvider(TProviderResource providerResource) diff --git a/src/UI/Settings/Indexers/CollectionView.js b/src/UI/Settings/Indexers/CollectionView.js index 9ae61a615..0fd21e6b4 100644 --- a/src/UI/Settings/Indexers/CollectionView.js +++ b/src/UI/Settings/Indexers/CollectionView.js @@ -33,7 +33,7 @@ define( schemaCollection.url = StatusModel.get('urlBase') + '/api/indexer/schema'; schemaCollection.fetch({ success: function (collection) { - collection.url = './api/indexer'; + collection.url = StatusModel.get('urlBase') + '/api/indexer'; var model = _.first(collection.models); model.set({