New: Detect and map App Indexers setup outside of Prowlarr

This commit is contained in:
Qstick
2021-03-24 00:25:24 -04:00
parent 66237af562
commit 6e46cd09c1
11 changed files with 120 additions and 9 deletions
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using FluentValidation.Results;
using NLog;
using NzbDrone.Core.Indexers;
@@ -13,6 +14,9 @@ namespace NzbDrone.Core.Applications
protected readonly IAppIndexerMapService _appIndexerMapService;
protected readonly Logger _logger;
protected static readonly Regex AppIndexerRegex = new Regex(@"api\/v\d*\/indexer\/(?<indexer>\d*)",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
public abstract string Name { get; }
public Type ConfigContract => typeof(TSettings);
@@ -54,6 +58,7 @@ namespace NzbDrone.Core.Applications
public abstract void AddIndexer(IndexerDefinition indexer);
public abstract void UpdateIndexer(IndexerDefinition indexer);
public abstract void RemoveIndexer(int indexerId);
public abstract Dictionary<int, int> GetIndexerMappings();
public virtual object RequestAction(string action, IDictionary<string, string> query)
{