New: Grouped Album Import Notification (#265)
* New: Grouped Album Import Notification * fixup: Add Emby and Kodi Notify for Album Downloadpull/274/head
parent
fa63b962ea
commit
226f884233
@ -0,0 +1,14 @@
|
||||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Migration(13)]
|
||||
public class album_download_notification : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Alter.Table("Notifications").AddColumn("OnAlbumDownload").AsBoolean().WithDefaultValue(0);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
using System.Collections.Generic;
|
||||
using NzbDrone.Common.Messaging;
|
||||
using NzbDrone.Core.Download;
|
||||
using NzbDrone.Core.Music;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
namespace NzbDrone.Core.MediaFiles.Events
|
||||
{
|
||||
public class AlbumImportedEvent : IEvent
|
||||
{
|
||||
public Artist Artist { get; private set; }
|
||||
public Album Album { get; private set; }
|
||||
public List<LocalTrack> ImportedTracks { get; private set; }
|
||||
public bool NewDownload { get; private set; }
|
||||
public string DownloadClient { get; private set; }
|
||||
public string DownloadId { get; private set; }
|
||||
|
||||
public AlbumImportedEvent(Artist artist, Album album, List<LocalTrack> importedTracks, bool newDownload, DownloadClientItem downloadClientItem)
|
||||
{
|
||||
Artist = artist;
|
||||
Album = album;
|
||||
ImportedTracks = importedTracks;
|
||||
NewDownload = newDownload;
|
||||
|
||||
if (downloadClientItem != null)
|
||||
{
|
||||
DownloadClient = downloadClientItem.DownloadClient;
|
||||
DownloadId = downloadClientItem.DownloadId;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using NzbDrone.Core.MediaFiles;
|
||||
using NzbDrone.Core.Music;
|
||||
|
||||
namespace NzbDrone.Core.Notifications
|
||||
{
|
||||
public class AlbumDownloadMessage
|
||||
{
|
||||
public string Message { get; set; }
|
||||
public Artist Artist { get; set; }
|
||||
public Album Album { get; set; }
|
||||
public List<TrackFile> TrackFiles { get; set; }
|
||||
public string DownloadClient { get; set; }
|
||||
public string DownloadId { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Message;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue