Merge branch 'develop' of https://github.com/tidusjar/ombi into develop

pull/3016/head
tidusjar 6 years ago
commit ded9b028b4

@ -364,7 +364,7 @@ namespace Ombi.Schedule.Jobs.Ombi
if (embySettings.Enable) if (embySettings.Enable)
{ {
await ProcessEmbyMovies(embyMovies, sb, ombiSettings.DefaultLanguageCode); await ProcessEmbyMovies(embyMovies, sb, ombiSettings.DefaultLanguageCode, embySettings.Servers.FirstOrDefault()?.ServerHostname ?? string.Empty);
} }
sb.Append("</tr>"); sb.Append("</tr>");
@ -390,7 +390,7 @@ namespace Ombi.Schedule.Jobs.Ombi
if (embySettings.Enable) if (embySettings.Enable)
{ {
await ProcessEmbyTv(embyEp, sb); await ProcessEmbyTv(embyEp, sb, embySettings.Servers.FirstOrDefault()?.ServerHostname ?? string.Empty);
} }
sb.Append("</tr>"); sb.Append("</tr>");
@ -495,7 +495,7 @@ namespace Ombi.Schedule.Jobs.Ombi
} }
} }
private async Task ProcessEmbyMovies(IQueryable<EmbyContent> embyContent, StringBuilder sb, string defaultLangaugeCode) private async Task ProcessEmbyMovies(IQueryable<EmbyContent> embyContent, StringBuilder sb, string defaultLangaugeCode, string customUrl)
{ {
int count = 0; int count = 0;
var ordered = embyContent.OrderByDescending(x => x.AddedAt); var ordered = embyContent.OrderByDescending(x => x.AddedAt);
@ -516,6 +516,10 @@ namespace Ombi.Schedule.Jobs.Ombi
} }
var mediaurl = content.Url; var mediaurl = content.Url;
if (customUrl.HasValue())
{
mediaurl = customUrl;
}
var info = await _movieApi.GetMovieInformationWithExtraInfo(StringHelper.IntParseLinq(theMovieDbId), defaultLangaugeCode); var info = await _movieApi.GetMovieInformationWithExtraInfo(StringHelper.IntParseLinq(theMovieDbId), defaultLangaugeCode);
if (info == null) if (info == null)
{ {
@ -759,7 +763,7 @@ namespace Ombi.Schedule.Jobs.Ombi
private async Task ProcessEmbyTv(HashSet<EmbyEpisode> embyContent, StringBuilder sb) private async Task ProcessEmbyTv(HashSet<EmbyEpisode> embyContent, StringBuilder sb, string serverUrl)
{ {
var series = new List<EmbyContent>(); var series = new List<EmbyContent>();
foreach (var episode in embyContent) foreach (var episode in embyContent)
@ -814,7 +818,7 @@ namespace Ombi.Schedule.Jobs.Ombi
AddBackgroundInsideTable(sb, $"https://image.tmdb.org/t/p/w1280/"); AddBackgroundInsideTable(sb, $"https://image.tmdb.org/t/p/w1280/");
} }
AddPosterInsideTable(sb, banner); AddPosterInsideTable(sb, banner);
AddMediaServerUrl(sb, t.Url, banner); AddMediaServerUrl(sb, serverUrl.HasValue() ? serverUrl : t.Url, banner);
AddInfoTable(sb); AddInfoTable(sb);
var title = ""; var title = "";

Loading…
Cancel
Save