Started switching the TV over to the new provider (TheTVDB). Currently TV search is partially broken. It will search but we are not mapping all of the details

This commit is contained in:
tidusjar 2016-03-02 17:21:11 +00:00
parent ff81e67ab0
commit 9ce08902d7
15 changed files with 173 additions and 54 deletions

View file

@ -65,7 +65,7 @@ namespace RequestPlex.UI.Modules
var dbMovies = Service.GetAll().Where(x => x.Type == RequestType.Movie);
var viewModel = dbMovies.Select(tv => new RequestViewModel
{
Tmdbid = tv.Tmdbid,
Tmdbid = tv.ProviderId,
Type = tv.Type,
Status = tv.Status,
ImdbId = tv.ImdbId,
@ -88,7 +88,7 @@ namespace RequestPlex.UI.Modules
var dbTv = Service.GetAll().Where(x => x.Type == RequestType.TvShow);
var viewModel = dbTv.Select(tv => new RequestViewModel
{
Tmdbid = tv.Tmdbid,
Tmdbid = tv.ProviderId,
Type = tv.Type,
Status = tv.Status,
ImdbId = tv.ImdbId,
@ -106,9 +106,9 @@ namespace RequestPlex.UI.Modules
return Response.AsJson(viewModel);
}
private Response DeleteRequest(int tmdbId, RequestType type)
private Response DeleteRequest(int providerId, RequestType type)
{
var currentEntity = Service.GetAll().FirstOrDefault(x => x.Tmdbid == tmdbId && x.Type == type);
var currentEntity = Service.GetAll().FirstOrDefault(x => x.ProviderId == providerId && x.Type == type);
Service.Delete(currentEntity);
return Response.AsJson(new { Result = true });
}