mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-14 09:12:57 -07:00
Fix the exception in #440
This commit is contained in:
parent
f03392691c
commit
85baa67f29
3 changed files with 120 additions and 113 deletions
|
@ -60,6 +60,7 @@ namespace PlexRequests.UI.Helpers
|
||||||
|
|
||||||
public static JsonResponseModel SendSonarrError(List<string> result)
|
public static JsonResponseModel SendSonarrError(List<string> result)
|
||||||
{
|
{
|
||||||
|
|
||||||
var model = new JsonResponseModel {Result = false};
|
var model = new JsonResponseModel {Result = false};
|
||||||
if (!result.Any())
|
if (!result.Any())
|
||||||
{
|
{
|
||||||
|
|
|
@ -637,8 +637,8 @@ namespace PlexRequests.UI.Modules
|
||||||
{
|
{
|
||||||
return await AddRequest(model, settings, $"{fullShowName} {Resources.UI.Search_SuccessfullyAdded}");
|
return await AddRequest(model, settings, $"{fullShowName} {Resources.UI.Search_SuccessfullyAdded}");
|
||||||
}
|
}
|
||||||
|
Log.Debug("Error with sending to sonarr.");
|
||||||
return Response.AsJson(ValidationHelper.SendSonarrError(result?.ErrorMessages));
|
return Response.AsJson(ValidationHelper.SendSonarrError(result?.ErrorMessages ?? new List<string>()));
|
||||||
}
|
}
|
||||||
|
|
||||||
var srSettings = SickRageService.GetSettings();
|
var srSettings = SickRageService.GetSettings();
|
||||||
|
|
|
@ -157,9 +157,15 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-5 ">
|
<div class="col-sm-5 ">
|
||||||
<div>
|
<div>
|
||||||
|
{{#if_eq type "movie"}}
|
||||||
|
<a href="https://www.themoviedb.org/movie/{{id}}/" target="_blank">
|
||||||
|
<h4>{{title}} ({{year}})</h4>
|
||||||
|
</a>
|
||||||
|
{{else}}
|
||||||
<a href="http://www.imdb.com/title/{{imdb}}/" target="_blank">
|
<a href="http://www.imdb.com/title/{{imdb}}/" target="_blank">
|
||||||
<h4>{{title}} ({{year}})</h4>
|
<h4>{{title}} ({{year}})</h4>
|
||||||
</a>
|
</a>
|
||||||
|
{{/if_eq}}
|
||||||
</div>
|
</div>
|
||||||
<p>{{overview}}</p>
|
<p>{{overview}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -341,9 +347,9 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script id="seasonNumber-template" type="text/x-handlebars-template">
|
<script id="seasonNumber-template" type="text/x-handlebars-template">
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<div id="seasonNumber{{seasonNumber}}">
|
<div id="seasonNumber{{seasonNumber}}">
|
||||||
<strong>@UI.Search_Season {{seasonNumber}}</strong>
|
<strong>@UI.Search_Season {{seasonNumber}}</strong>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue