diff --git a/Jellyfin.Plugin.Tvdb/ScheduledTasks/UpdateTask.cs b/Jellyfin.Plugin.Tvdb/ScheduledTasks/UpdateTask.cs index 76dc815..0a59e26 100644 --- a/Jellyfin.Plugin.Tvdb/ScheduledTasks/UpdateTask.cs +++ b/Jellyfin.Plugin.Tvdb/ScheduledTasks/UpdateTask.cs @@ -72,7 +72,8 @@ public async Task ExecuteAsync(IProgress progress, CancellationToken can progress.Report(10); MetadataRefreshOptions refreshOptions = new MetadataRefreshOptions(new DirectoryService(_fileSystem)) { - MetadataRefreshMode = MetadataRefreshMode.FullRefresh + MetadataRefreshMode = MetadataRefreshMode.FullRefresh, + ReplaceAllMetadata = true, }; double increment = 90.0 / toUpdateItems.Count; double currentProgress = 10; diff --git a/Jellyfin.Plugin.Tvdb/TvdbClientManager.cs b/Jellyfin.Plugin.Tvdb/TvdbClientManager.cs index 24c15ef..30e77ad 100644 --- a/Jellyfin.Plugin.Tvdb/TvdbClientManager.cs +++ b/Jellyfin.Plugin.Tvdb/TvdbClientManager.cs @@ -542,7 +542,18 @@ public async Task> GetUpdates( var updatesClient = _serviceProvider.GetRequiredService(); await LoginAsync().ConfigureAwait(false); var updatesResult = await updatesClient.UpdatesAsync(since: fromTime, type: type, action: action, cancellationToken: cancellationToken).ConfigureAwait(false); - return updatesResult.Data; + var updates = updatesResult.Data.ToList(); + + // Each page has limit of 500 updates. Get all updates starting from page 1. First page (page 0) is already fetched. + int page = 1; + while (updatesResult.Links.Next != null) + { + updatesResult = await updatesClient.UpdatesAsync(since: fromTime, type: type, action: action, page: page, cancellationToken: cancellationToken).ConfigureAwait(false); + updates.AddRange(updatesResult.Data); + page++; + } + + return updates; } ///