Пример #1
0
        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);
            }
        }
Пример #2
0
 public void Handle(MoviesImportedEvent message)
 {
     _commandQueueManager.PushMany(message.MovieIds.Select(s => new RefreshMovieCommand(new List <int> {
         s
     }, true)).ToList());
 }
Пример #3
0
 public void Handle(ArtistsImportedEvent message)
 {
     _commandQueueManager.PushMany(message.ArtistIds.Select(s => new RefreshArtistCommand(s, true)).ToList());
 }
Пример #4
0
 public void Handle(SeriesImportedEvent message)
 {
     _commandQueueManager.PushMany(message.SeriesIds.Select(s => new RefreshSeriesCommand(s, true)).ToList());
 }