2017-10-17 02:08:49 +00:00
|
|
|
using NzbDrone.Core.Messaging.Commands;
|
|
|
|
using NzbDrone.Core.Messaging.Events;
|
|
|
|
using NzbDrone.Core.Music.Commands;
|
|
|
|
using NzbDrone.Core.Music.Events;
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Music
|
|
|
|
{
|
|
|
|
public class ArtistEditedService : IHandle<ArtistEditedEvent>
|
|
|
|
{
|
|
|
|
private readonly IManageCommandQueue _commandQueueManager;
|
|
|
|
|
|
|
|
public ArtistEditedService(IManageCommandQueue commandQueueManager)
|
|
|
|
{
|
|
|
|
_commandQueueManager = commandQueueManager;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void Handle(ArtistEditedEvent message)
|
|
|
|
{
|
|
|
|
// Refresh Artist is we change AlbumType Preferences
|
2017-11-26 03:51:37 +00:00
|
|
|
if (message.Artist.LanguageProfileId != message.OldArtist.LanguageProfileId)
|
2017-10-17 02:08:49 +00:00
|
|
|
{
|
|
|
|
_commandQueueManager.Push(new RefreshArtistCommand(message.Artist.Id));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|