mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
potential fix for #1942
This commit is contained in:
parent
c3c85b0ae0
commit
e9e61153cb
2 changed files with 6 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Ombi.Helpers;
|
||||||
using Ombi.Notifications.Models;
|
using Ombi.Notifications.Models;
|
||||||
using Ombi.Settings.Settings.Models;
|
using Ombi.Settings.Settings.Models;
|
||||||
using Ombi.Store.Entities;
|
using Ombi.Store.Entities;
|
||||||
|
@ -12,7 +13,7 @@ namespace Ombi.Notifications
|
||||||
|
|
||||||
public void Setup(NotificationOptions opts, FullBaseRequest req, CustomizationSettings s)
|
public void Setup(NotificationOptions opts, FullBaseRequest req, CustomizationSettings s)
|
||||||
{
|
{
|
||||||
ApplicationUrl = s?.ApplicationUrl;
|
ApplicationUrl = (s?.ApplicationUrl.HasValue() ?? false) ? s.ApplicationUrl : string.Empty;
|
||||||
ApplicationName = string.IsNullOrEmpty(s?.ApplicationName) ? "Ombi" : s?.ApplicationName;
|
ApplicationName = string.IsNullOrEmpty(s?.ApplicationName) ? "Ombi" : s?.ApplicationName;
|
||||||
RequestedUser = string.IsNullOrEmpty(req.RequestedUser.Alias)
|
RequestedUser = string.IsNullOrEmpty(req.RequestedUser.Alias)
|
||||||
? req.RequestedUser.UserName
|
? req.RequestedUser.UserName
|
||||||
|
@ -24,12 +25,12 @@ namespace Ombi.Notifications
|
||||||
Year = req.ReleaseDate.Year.ToString();
|
Year = req.ReleaseDate.Year.ToString();
|
||||||
PosterImage = req.RequestType == RequestType.Movie ?
|
PosterImage = req.RequestType == RequestType.Movie ?
|
||||||
$"https://image.tmdb.org/t/p/w300{req.PosterPath}" : req.PosterPath;
|
$"https://image.tmdb.org/t/p/w300{req.PosterPath}" : req.PosterPath;
|
||||||
AdditionalInformation = opts.AdditionalInformation;
|
AdditionalInformation = opts?.AdditionalInformation ?? string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Setup(NotificationOptions opts, ChildRequests req, CustomizationSettings s)
|
public void Setup(NotificationOptions opts, ChildRequests req, CustomizationSettings s)
|
||||||
{
|
{
|
||||||
ApplicationUrl = s?.ApplicationUrl;
|
ApplicationUrl = (s?.ApplicationUrl.HasValue() ?? false) ? s.ApplicationUrl : string.Empty;
|
||||||
ApplicationName = string.IsNullOrEmpty(s?.ApplicationName) ? "Ombi" : s?.ApplicationName;
|
ApplicationName = string.IsNullOrEmpty(s?.ApplicationName) ? "Ombi" : s?.ApplicationName;
|
||||||
RequestedUser = string.IsNullOrEmpty(req.RequestedUser.Alias)
|
RequestedUser = string.IsNullOrEmpty(req.RequestedUser.Alias)
|
||||||
? req.RequestedUser.UserName
|
? req.RequestedUser.UserName
|
||||||
|
@ -47,7 +48,7 @@ namespace Ombi.Notifications
|
||||||
|
|
||||||
public void Setup(OmbiUser user, CustomizationSettings s)
|
public void Setup(OmbiUser user, CustomizationSettings s)
|
||||||
{
|
{
|
||||||
ApplicationUrl = s?.ApplicationUrl;
|
ApplicationUrl = (s?.ApplicationUrl.HasValue() ?? false) ? s.ApplicationUrl : string.Empty;
|
||||||
ApplicationName = string.IsNullOrEmpty(s?.ApplicationName) ? "Ombi" : s?.ApplicationName;
|
ApplicationName = string.IsNullOrEmpty(s?.ApplicationName) ? "Ombi" : s?.ApplicationName;
|
||||||
RequestedUser = user.UserName;
|
RequestedUser = user.UserName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,6 +221,7 @@ namespace Ombi.Schedule.Jobs.Plex
|
||||||
//var existing = await Repo.GetByKey(movie.ratingKey);
|
//var existing = await Repo.GetByKey(movie.ratingKey);
|
||||||
if (existing != null)
|
if (existing != null)
|
||||||
{
|
{
|
||||||
|
Logger.LogInformation("We already have movie {0}", movie.title);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue