예제 #1
0
        /// <inheritdoc />
        protected override async Task AfterMetadataRefresh(Series item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken)
        {
            await base.AfterMetadataRefresh(item, refreshOptions, cancellationToken).ConfigureAwait(false);

            var seasonProvider = new DummySeasonProvider(Logger, _localization, LibraryManager, FileSystem);
            await seasonProvider.Run(item, cancellationToken).ConfigureAwait(false);

            // TODO why does it not register this itself omg
            var provider = new MissingEpisodeProvider(
                Logger,
                ServerConfigurationManager,
                LibraryManager,
                _localization,
                FileSystem,
                _tvdbClientManager);

            try
            {
                await provider.Run(item, true, CancellationToken.None).ConfigureAwait(false);
            }
            catch (Exception ex)
            {
                Logger.LogError(ex, "Error in DummySeasonProvider");
            }
        }
예제 #2
0
        protected override async Task AfterMetadataRefresh(Series item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken)
        {
            await base.AfterMetadataRefresh(item, refreshOptions, cancellationToken).ConfigureAwait(false);

            if (refreshOptions.IsPostRecursiveRefresh)
            {
                var seasonProvider = new DummySeasonProvider(ServerConfigurationManager, Logger, _localization, LibraryManager, FileSystem);
                await seasonProvider.Run(item, cancellationToken).ConfigureAwait(false);

                var provider = new MissingEpisodeProvider(Logger,
                                                          ServerConfigurationManager,
                                                          LibraryManager,
                                                          _localization,
                                                          FileSystem,
                                                          _xmlSettings);

                try
                {
                    await provider.Run(item, true, CancellationToken.None).ConfigureAwait(false);
                }
                catch (Exception ex)
                {
                    Logger.ErrorException("Error in DummySeasonProvider", ex);
                }
            }
        }