mirror of
https://github.com/Radarr/Radarr
synced 2024-12-29 03:15:19 +00:00
Fixed Protocol returned for release/push endpoint
This commit is contained in:
parent
3b57194d47
commit
c38608e3cf
1 changed files with 6 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
||||||
using NzbDrone.Api.Mapping;
|
using NzbDrone.Api.Mapping;
|
||||||
using NzbDrone.Api.Extensions;
|
using NzbDrone.Api.Extensions;
|
||||||
using NLog;
|
using NLog;
|
||||||
|
using NzbDrone.Core.Indexers;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Indexers
|
namespace NzbDrone.Api.Indexers
|
||||||
{
|
{
|
||||||
|
@ -38,11 +39,14 @@ private Response ProcessRelease(ReleaseResource release)
|
||||||
{
|
{
|
||||||
_logger.Info("Release pushed: {0} - {1}", release.Title, release.DownloadUrl);
|
_logger.Info("Release pushed: {0} - {1}", release.Title, release.DownloadUrl);
|
||||||
|
|
||||||
var info = release.InjectTo<ReleaseInfo>();
|
var info = release.Protocol == DownloadProtocol.Usenet ?
|
||||||
|
release.InjectTo<ReleaseInfo>() :
|
||||||
|
release.InjectTo<TorrentInfo>();
|
||||||
|
|
||||||
info.Guid = "PUSH-" + info.DownloadUrl;
|
info.Guid = "PUSH-" + info.DownloadUrl;
|
||||||
|
|
||||||
var decisions = _downloadDecisionMaker.GetRssDecision(new List<ReleaseInfo> { info });
|
var decisions = _downloadDecisionMaker.GetRssDecision(new List<ReleaseInfo> { info });
|
||||||
var processed = _downloadDecisionProcessor.ProcessDecisions(decisions);
|
_downloadDecisionProcessor.ProcessDecisions(decisions);
|
||||||
|
|
||||||
return MapDecisions(decisions).First().AsResponse();
|
return MapDecisions(decisions).First().AsResponse();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue