1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-20 18:02:44 +01:00

Webhook IndexerFlags to string list

This commit is contained in:
Qstick 2022-11-23 19:41:38 -06:00
parent bae374c0c8
commit 874482dbce

View File

@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Qualities;
@ -21,7 +23,7 @@ public WebhookRelease(QualityModel quality, RemoteMovie remoteMovie)
Size = remoteMovie.Release.Size;
CustomFormats = remoteMovie.CustomFormats?.Select(x => x.Name).ToList();
CustomFormatScore = remoteMovie.CustomFormatScore;
IndexerFlags = remoteMovie.Release.IndexerFlags;
IndexerFlags = Enum.GetValues(typeof(IndexerFlags)).Cast<IndexerFlags>().Where(r => (remoteMovie.Release.IndexerFlags & r) == r).Select(r => r.ToString()).ToList();
}
public string Quality { get; set; }
@ -32,6 +34,6 @@ public WebhookRelease(QualityModel quality, RemoteMovie remoteMovie)
public long Size { get; set; }
public int CustomFormatScore { get; set; }
public List<string> CustomFormats { get; set; }
public IndexerFlags IndexerFlags { get; set; }
public List<string> IndexerFlags { get; set; }
}
}