mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
[WIP] Additions to custom formats, such as rescanning old files. (#2949)
This commit is contained in:
@@ -49,4 +49,20 @@ namespace NzbDrone.Core.CustomFormats
|
||||
return (Id != null ? Id.GetHashCode() : 0);
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomFormatExtensions
|
||||
{
|
||||
public static string ToExtendedString(this IEnumerable<CustomFormat> formats)
|
||||
{
|
||||
return string.Join(", ", formats.Select(f => f.ToString()));
|
||||
}
|
||||
|
||||
public static List<CustomFormat> WithNone(this IEnumerable<CustomFormat> formats)
|
||||
{
|
||||
var list = formats.ToList();
|
||||
if (list.Any()) return list;
|
||||
|
||||
return new List<CustomFormat>{CustomFormat.None};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user