mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
New: Renamed Blacklist to Blocklist
(cherry picked from commit ead1371846b1f19cd49928052be0128bf7ccd41f)
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NzbDrone.Core.Indexers;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using Readarr.Api.V1.Author;
|
||||
using Readarr.Http.REST;
|
||||
|
||||
namespace Readarr.Api.V1.Blocklist
|
||||
{
|
||||
public class BlocklistResource : RestResource
|
||||
{
|
||||
public int AuthorId { get; set; }
|
||||
public List<int> BookIds { get; set; }
|
||||
public string SourceTitle { get; set; }
|
||||
public QualityModel Quality { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public DownloadProtocol Protocol { get; set; }
|
||||
public string Indexer { get; set; }
|
||||
public string Message { get; set; }
|
||||
|
||||
public AuthorResource Author { get; set; }
|
||||
}
|
||||
|
||||
public static class BlocklistResourceMapper
|
||||
{
|
||||
public static BlocklistResource MapToResource(this NzbDrone.Core.Blocklisting.Blocklist model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new BlocklistResource
|
||||
{
|
||||
Id = model.Id,
|
||||
|
||||
AuthorId = model.AuthorId,
|
||||
BookIds = model.BookIds,
|
||||
SourceTitle = model.SourceTitle,
|
||||
Quality = model.Quality,
|
||||
Date = model.Date,
|
||||
Protocol = model.Protocol,
|
||||
Indexer = model.Indexer,
|
||||
Message = model.Message,
|
||||
|
||||
Author = model.Author.ToResource()
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user