You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
885 B
28 lines
885 B
using System.Collections.Generic;
|
|
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
|
|
if (message.Artist.MetadataProfileId != message.OldArtist.MetadataProfileId)
|
|
{
|
|
_commandQueueManager.Push(new RefreshArtistCommand(new List<int> { message.Artist.Id }, false));
|
|
}
|
|
}
|
|
}
|
|
}
|