Got the search finished up for #32

This commit is contained in:
tidusjar 2016-04-01 23:05:17 +01:00
commit e037ad0f2b
8 changed files with 118 additions and 18 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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; }

View file

@ -45,7 +45,7 @@ namespace PlexRequests.Core.SettingModels
public string NoApprovalUsers { get; set; }
[JsonIgnore]
public List<string> NoApprovalUserList
public List<string> ApprovalWhiteList
{
get
{