mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-18 19:00:47 +02:00
Fixed: Mass disable/enable indexers
This commit is contained in:
parent
76bded0c50
commit
7fa4b322eb
2 changed files with 4 additions and 4 deletions
|
|
@ -1,10 +1,10 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Indexers;
|
||||
using NzbDrone.Core.Messaging.Commands;
|
||||
using Prowlarr.Http;
|
||||
using Prowlarr.Http.Extensions;
|
||||
|
||||
namespace Prowlarr.Api.V1.Indexers
|
||||
{
|
||||
|
|
@ -29,9 +29,9 @@ public IActionResult SaveAll(IndexerEditorResource resource)
|
|||
|
||||
foreach (var indexer in indexersToUpdate)
|
||||
{
|
||||
if (resource.Enable.HasValue)
|
||||
if (resource.Enable.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
indexer.Enable = resource.Enable.Value;
|
||||
indexer.Enable = bool.Parse(resource.Enable);
|
||||
}
|
||||
|
||||
if (resource.Tags != null)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ namespace Prowlarr.Api.V1.Indexers
|
|||
public class IndexerEditorResource
|
||||
{
|
||||
public List<int> IndexerIds { get; set; }
|
||||
public bool? Enable { get; set; }
|
||||
public string Enable { get; set; }
|
||||
public List<int> Tags { get; set; }
|
||||
public ApplyTags ApplyTags { get; set; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue