|
|
@ -152,6 +152,7 @@ namespace Ombi.Notifications
|
|
|
|
RequestId = req?.Id.ToString();
|
|
|
|
RequestId = req?.Id.ToString();
|
|
|
|
RequestedUser = req?.RequestedUser?.UserName;
|
|
|
|
RequestedUser = req?.RequestedUser?.UserName;
|
|
|
|
RequestedDate = req?.RequestedDate.ToString("D");
|
|
|
|
RequestedDate = req?.RequestedDate.ToString("D");
|
|
|
|
|
|
|
|
DetailsUrl = GetDetailsUrl(s, req);
|
|
|
|
|
|
|
|
|
|
|
|
if (Type.IsNullOrEmpty())
|
|
|
|
if (Type.IsNullOrEmpty())
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -217,6 +218,26 @@ namespace Ombi.Notifications
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private string GetDetailsUrl(CustomizationSettings s, BaseRequest req)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(s.ApplicationUrl))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return string.Empty;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (req)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
case MovieRequests movieRequest:
|
|
|
|
|
|
|
|
return $"{s.ApplicationUrl}/details/movie/{movieRequest.TheMovieDbId}";
|
|
|
|
|
|
|
|
case ChildRequests tvRequest:
|
|
|
|
|
|
|
|
return $"{s.ApplicationUrl}/details/tv/{tvRequest.ParentRequest.ExternalProviderId}";
|
|
|
|
|
|
|
|
case AlbumRequest albumRequest:
|
|
|
|
|
|
|
|
return $"{s.ApplicationUrl}/details/artist/{albumRequest.ForeignArtistId}";
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
return string.Empty;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void CalculateRequestStatus(BaseRequest req)
|
|
|
|
private void CalculateRequestStatus(BaseRequest req)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
RequestStatus = string.Empty;
|
|
|
|
RequestStatus = string.Empty;
|
|
|
@ -258,6 +279,7 @@ namespace Ombi.Notifications
|
|
|
|
public string Year { get; set; }
|
|
|
|
public string Year { get; set; }
|
|
|
|
public string EpisodesList { get; set; }
|
|
|
|
public string EpisodesList { get; set; }
|
|
|
|
public string SeasonsList { get; set; }
|
|
|
|
public string SeasonsList { get; set; }
|
|
|
|
|
|
|
|
public string DetailsUrl { get; set; }
|
|
|
|
public string PosterImage { get; set; }
|
|
|
|
public string PosterImage { get; set; }
|
|
|
|
public string ApplicationName { get; set; }
|
|
|
|
public string ApplicationName { get; set; }
|
|
|
|
public string ApplicationUrl { get; set; }
|
|
|
|
public string ApplicationUrl { get; set; }
|
|
|
|