diff --git a/Jellyfin.Plugin.Tvdb/Providers/TvdbMissingEpisodeProvider.cs b/Jellyfin.Plugin.Tvdb/Providers/TvdbMissingEpisodeProvider.cs index 6019c89..03d1f32 100644 --- a/Jellyfin.Plugin.Tvdb/Providers/TvdbMissingEpisodeProvider.cs +++ b/Jellyfin.Plugin.Tvdb/Providers/TvdbMissingEpisodeProvider.cs @@ -11,6 +11,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Globalization; +using MediaBrowser.Model.IO; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Tvdb.Sdk; @@ -35,6 +36,7 @@ public class TvdbMissingEpisodeProvider : IHostedService private readonly IProviderManager _providerManager; private readonly ILocalizationManager _localization; private readonly ILibraryManager _libraryManager; + private readonly IFileSystem _fileSystem; private readonly ILogger _logger; /// @@ -45,6 +47,7 @@ public class TvdbMissingEpisodeProvider : IHostedService /// Instance of the interface. /// Instance of the interface. /// Instance of the interface. + /// Instance of the interface. /// Instance of the interface. public TvdbMissingEpisodeProvider( TvdbClientManager tvdbClientManager, @@ -52,6 +55,7 @@ public TvdbMissingEpisodeProvider( IProviderManager providerManager, ILocalizationManager localization, ILibraryManager libraryManager, + IFileSystem fileSystem, ILogger logger) { _tvdbClientManager = tvdbClientManager; @@ -59,6 +63,7 @@ public TvdbMissingEpisodeProvider( _providerManager = providerManager; _localization = localization; _libraryManager = libraryManager; + _fileSystem = fileSystem; _logger = logger; } @@ -428,6 +433,7 @@ private Season AddVirtualSeason(int season, Series series) }; series.AddChild(newSeason); + _providerManager.QueueRefresh(newSeason.Id, new MetadataRefreshOptions(new DirectoryService(_fileSystem)), RefreshPriority.High); return newSeason; } @@ -481,6 +487,7 @@ private void AddVirtualEpisode(EpisodeBaseRecord? episode, Season? season) episode.Number); season.AddChild(newEpisode); + _providerManager.QueueRefresh(newEpisode.Id, new MetadataRefreshOptions(new DirectoryService(_fileSystem)), RefreshPriority.High); } ///