mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-30 23:45:46 +02:00
Initialze Newznab will delete any with a null/empty name or URL.
This commit is contained in:
@@ -74,6 +74,12 @@ namespace NzbDrone.Core.Providers
|
||||
{
|
||||
var currentIndexers = All();
|
||||
|
||||
Logger.Debug("Deleting broken Newznab indexer");
|
||||
var brokenIndexers = currentIndexers.Where(i => String.IsNullOrEmpty(i.Name) || String.IsNullOrWhiteSpace(i.Url)).ToList();
|
||||
brokenIndexers.ForEach(e => _database.Delete<NewznabDefinition>(e.Id));
|
||||
|
||||
currentIndexers = All();
|
||||
|
||||
foreach(var feedProvider in indexers)
|
||||
{
|
||||
try
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using PetaPoco;
|
||||
|
||||
namespace NzbDrone.Core.Repository
|
||||
@@ -11,8 +12,10 @@ namespace NzbDrone.Core.Repository
|
||||
|
||||
public Boolean Enable { get; set; }
|
||||
|
||||
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
||||
public String Name { get; set; }
|
||||
|
||||
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
||||
public String Url { get; set; }
|
||||
|
||||
public String ApiKey { get; set; }
|
||||
|
Reference in New Issue
Block a user