コード例 #1
0
ファイル: RootFolderService.cs プロジェクト: whoshoe/Readarr
        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
ファイル: SeriesAddedHandler.cs プロジェクト: Macharr/Macharr
 public void Handle(SeriesImportedEvent message)
 {
     _commandQueueManager.PushMany(message.SeriesIds.Select(s => new RefreshSeriesCommand(s, true)).ToList());
 }