mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
Got the search finished up for #32
This commit is contained in:
parent
420e43dfaf
commit
e037ad0f2b
8 changed files with 118 additions and 18 deletions
|
@ -34,6 +34,8 @@ namespace PlexRequests.Core
|
|||
{
|
||||
long AddRequest(RequestedModel model);
|
||||
RequestedModel CheckRequest(int providerId);
|
||||
RequestedModel CheckRequest(string musicId);
|
||||
|
||||
void DeleteRequest(RequestedModel request);
|
||||
bool UpdateRequest(RequestedModel model);
|
||||
RequestedModel Get(int id);
|
||||
|
|
|
@ -65,6 +65,13 @@ namespace PlexRequests.Core
|
|||
return blob != null ? ByteConverterHelper.ReturnObject<RequestedModel>(blob.Content) : null;
|
||||
}
|
||||
|
||||
public RequestedModel CheckRequest(string musicId)
|
||||
{
|
||||
var blobs = Repo.GetAll();
|
||||
var blob = blobs.FirstOrDefault(x => x.MusicId == musicId);
|
||||
return blob != null ? ByteConverterHelper.ReturnObject<RequestedModel>(blob.Content) : null;
|
||||
}
|
||||
|
||||
public void DeleteRequest(RequestedModel request)
|
||||
{
|
||||
var blob = Repo.Get(request.Id);
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace PlexRequests.Core.SettingModels
|
|||
public bool Enabled { get; set; }
|
||||
public string Ip { get; set; }
|
||||
public int Port { get; set; }
|
||||
public int ApiKey { get; set; }
|
||||
public string ApiKey { get; set; }
|
||||
public bool Ssl { get; set; }
|
||||
public string SubDir { get; set; }
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace PlexRequests.Core.SettingModels
|
|||
public string NoApprovalUsers { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<string> NoApprovalUserList
|
||||
public List<string> ApprovalWhiteList
|
||||
{
|
||||
get
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue