public void Handle(ModelEvent <RemotePathMapping> message) { var commands = All() .Where(x => x.IsCalibreLibrary && x.CalibreSettings.Host == message.Model.Host && x.Path.StartsWith(message.Model.LocalPath)) .Select(x => new RescanFoldersCommand(new List <string> { x.Path }, FilterFilesType.None, true, null)) .ToList(); if (commands.Any()) { _commandQueueManager.PushMany(commands); } }
public void Handle(MoviesImportedEvent message) { _commandQueueManager.PushMany(message.MovieIds.Select(s => new RefreshMovieCommand(new List <int> { s }, true)).ToList()); }
public void Handle(ArtistsImportedEvent message) { _commandQueueManager.PushMany(message.ArtistIds.Select(s => new RefreshArtistCommand(s, true)).ToList()); }
public void Handle(SeriesImportedEvent message) { _commandQueueManager.PushMany(message.SeriesIds.Select(s => new RefreshSeriesCommand(s, true)).ToList()); }