1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-21 23:33:00 +00:00

New: Add Languages to Webhook Notifications

Closes #7421
This commit is contained in:
Stevie Robinson 2024-12-02 01:16:36 +01:00 committed by GitHub
parent 776143cc81
commit e039dc45e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 0 deletions

View file

@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using NzbDrone.Core.Languages;
using NzbDrone.Core.MediaFiles;
namespace NzbDrone.Core.Notifications.Webhook
@ -20,6 +22,7 @@ namespace NzbDrone.Core.Notifications.Webhook
SceneName = episodeFile.SceneName;
Size = episodeFile.Size;
DateAdded = episodeFile.DateAdded;
Languages = episodeFile.Languages;
if (episodeFile.MediaInfo != null)
{
@ -36,6 +39,7 @@ namespace NzbDrone.Core.Notifications.Webhook
public string SceneName { get; set; }
public long Size { get; set; }
public DateTime DateAdded { get; set; }
public List<Language> Languages { get; set; }
public WebhookEpisodeFileMediaInfo MediaInfo { get; set; }
public string SourcePath { get; set; }
public string RecycleBinPath { get; set; }

View file

@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Core.Languages;
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Qualities;
@ -21,6 +22,7 @@ namespace NzbDrone.Core.Notifications.Webhook
Size = remoteEpisode.Release.Size;
CustomFormats = remoteEpisode.CustomFormats?.Select(x => x.Name).ToList();
CustomFormatScore = remoteEpisode.CustomFormatScore;
Languages = remoteEpisode.Languages;
}
public string Quality { get; set; }
@ -31,5 +33,6 @@ namespace NzbDrone.Core.Notifications.Webhook
public long Size { get; set; }
public int CustomFormatScore { get; set; }
public List<string> CustomFormats { get; set; }
public List<Language> Languages { get; set; }
}
}

View file

@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Core.Languages;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Notifications.Webhook
@ -19,6 +20,7 @@ namespace NzbDrone.Core.Notifications.Webhook
public List<string> Genres { get; set; }
public List<WebhookImage> Images { get; set; }
public List<string> Tags { get; set; }
public Language OriginalLanguage { get; set; }
public WebhookSeries()
{
@ -39,6 +41,7 @@ namespace NzbDrone.Core.Notifications.Webhook
Genres = series.Genres;
Images = series.Images.Select(i => new WebhookImage(i)).ToList();
Tags = tags;
OriginalLanguage = series.OriginalLanguage;
}
}
}