Fixed: (Torrent RSS) Clear old cookies on edit

Fixes #2275
pull/2274/head
Bogdan 6 months ago
parent 8e69415d64
commit 62479737a7

@ -1,4 +1,6 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using FluentValidation.Results;
using NLog;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Messaging.Events;
@ -44,6 +46,13 @@ namespace NzbDrone.Core.Indexers.Definitions.TorrentRss
}
}
protected override Task<ValidationFailure> TestConnection()
{
UpdateCookies(null, null);
return base.TestConnection();
}
private IndexerDefinition GetDefinition(string name, string description, TorrentRssIndexerSettings settings)
{
return new IndexerDefinition

@ -650,7 +650,7 @@ namespace NzbDrone.Core.Indexers
{
foreach (var cookie in Cookies)
{
request.HttpRequest.Cookies.Add(cookie.Key, cookie.Value);
request.HttpRequest.Cookies[cookie.Key] = cookie.Value;
}
}

Loading…
Cancel
Save