You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
494 B
15 lines
494 B
1 year ago
|
using Recyclarr.Common.Extensions;
|
||
|
|
||
1 year ago
|
namespace Recyclarr.ServarrApi.QualityProfile;
|
||
1 year ago
|
|
||
|
public static class QualityProfileApiExtensions
|
||
|
{
|
||
|
public static QualityProfileDto ReverseItems(this QualityProfileDto dto)
|
||
|
{
|
||
|
return dto with {Items = ReverseItemsImpl(dto.Items).AsReadOnly()};
|
||
|
|
||
|
static ICollection<ProfileItemDto> ReverseItemsImpl(IEnumerable<ProfileItemDto> items)
|
||
|
=> items.Reverse().Select(x => x with {Items = ReverseItemsImpl(x.Items)}).ToList();
|
||
|
}
|
||
|
}
|