mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
New: Additional Artist and Album properties on Webhook base
This commit is contained in:
parent
e3c1009a2e
commit
3c2a74fe7f
2 changed files with 21 additions and 5 deletions
|
@ -1,4 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using NzbDrone.Core.Music;
|
using NzbDrone.Core.Music;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Notifications.Webhook
|
namespace NzbDrone.Core.Notifications.Webhook
|
||||||
|
@ -12,17 +14,24 @@ namespace NzbDrone.Core.Notifications.Webhook
|
||||||
public WebhookAlbum(Album album)
|
public WebhookAlbum(Album album)
|
||||||
{
|
{
|
||||||
Id = album.Id;
|
Id = album.Id;
|
||||||
|
MBId = album.ForeignAlbumId;
|
||||||
Title = album.Title;
|
Title = album.Title;
|
||||||
|
Disambiguation = album.Disambiguation;
|
||||||
|
Overview = album.Overview;
|
||||||
|
AlbumType = album.AlbumType;
|
||||||
|
SecondaryAlbumTypes = album.SecondaryTypes.Select(x => x.Name).ToList();
|
||||||
|
Genres = album.Genres;
|
||||||
ReleaseDate = album.ReleaseDate;
|
ReleaseDate = album.ReleaseDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
public string MBId { get; set; }
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
|
public string Disambiguation { get; set; }
|
||||||
|
public string Overview { get; set; }
|
||||||
|
public string AlbumType { get; set; }
|
||||||
|
public List<string> SecondaryAlbumTypes { get; set; }
|
||||||
|
public List<string> Genres { get; set; }
|
||||||
public DateTime? ReleaseDate { get; set; }
|
public DateTime? ReleaseDate { get; set; }
|
||||||
|
|
||||||
public string Quality { get; set; }
|
|
||||||
public int QualityVersion { get; set; }
|
|
||||||
public string ReleaseGroup { get; set; }
|
|
||||||
public string SceneName { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
using NzbDrone.Core.Music;
|
using NzbDrone.Core.Music;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Notifications.Webhook
|
namespace NzbDrone.Core.Notifications.Webhook
|
||||||
|
@ -6,9 +7,12 @@ namespace NzbDrone.Core.Notifications.Webhook
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
public string Disambiguation { get; set; }
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
public string MBId { get; set; }
|
public string MBId { get; set; }
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
|
public string Overview { get; set; }
|
||||||
|
public List<string> Genres { get; set; }
|
||||||
|
|
||||||
public WebhookArtist()
|
public WebhookArtist()
|
||||||
{
|
{
|
||||||
|
@ -18,8 +22,11 @@ namespace NzbDrone.Core.Notifications.Webhook
|
||||||
{
|
{
|
||||||
Id = artist.Id;
|
Id = artist.Id;
|
||||||
Name = artist.Name;
|
Name = artist.Name;
|
||||||
|
Disambiguation = artist.Metadata.Value.Disambiguation;
|
||||||
Path = artist.Path;
|
Path = artist.Path;
|
||||||
Type = artist.Metadata.Value.Type;
|
Type = artist.Metadata.Value.Type;
|
||||||
|
Overview = artist.Metadata.Value.Overview;
|
||||||
|
Genres = artist.Metadata.Value.Genres;
|
||||||
MBId = artist.Metadata.Value.ForeignArtistId;
|
MBId = artist.Metadata.Value.ForeignArtistId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue