mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
Fixed the issue when sending movies to CouchPotato.
This commit is contained in:
parent
5f9987b85d
commit
65087642e1
12 changed files with 350 additions and 5 deletions
|
@ -71,7 +71,7 @@ function buildRequestContext(result, type) {
|
|||
|
||||
var context = {
|
||||
posterPath: result.posterPath,
|
||||
id: result.tmdbid,
|
||||
id: result.providerId,
|
||||
title: result.title,
|
||||
overview: result.overview,
|
||||
year: result.releaseYear,
|
||||
|
|
|
@ -175,7 +175,6 @@ namespace PlexRequests.UI.Modules
|
|||
private Response SaveCouchPotato()
|
||||
{
|
||||
var couchPotatoSettings = this.Bind<CouchPotatoSettings>();
|
||||
|
||||
CpService.SaveSettings(couchPotatoSettings);
|
||||
|
||||
return Context.GetRedirect("~/admin/couchpotato");
|
||||
|
|
|
@ -149,6 +149,11 @@ namespace PlexRequests.UI.Modules
|
|||
}
|
||||
Log.Trace("movie with id {0} doesnt exists", movieId);
|
||||
var settings = CpService.GetSettings();
|
||||
if (settings.ApiKey == null)
|
||||
{
|
||||
Log.Warn("CP apiKey is null");
|
||||
return Response.AsJson(new { Result = false, Message = "CouchPotato is not yet configured, If you are the Admin, please log in." });
|
||||
}
|
||||
Log.Trace("Settings: ");
|
||||
Log.Trace(settings.DumpJson);
|
||||
|
||||
|
@ -173,7 +178,7 @@ namespace PlexRequests.UI.Modules
|
|||
|
||||
var cp = new CouchPotatoApi();
|
||||
Log.Trace("Adding movie to CP");
|
||||
var result = cp.AddMovie(model.ImdbId, settings.ApiKey, model.Title, settings.Ip);
|
||||
var result = cp.AddMovie(model.ImdbId, settings.ApiKey, model.Title, settings.FullUri);
|
||||
Log.Trace("Adding movie to CP result {0}", result);
|
||||
if (result)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue