mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Batch the PlexContentSync and increase the plex episode batch size
This commit is contained in:
parent
6f06f962d7
commit
801b212bd4
2 changed files with 6 additions and 1 deletions
|
@ -252,6 +252,11 @@ namespace Ombi.Schedule.Jobs.Plex
|
|||
contentToAdd.Add(item);
|
||||
}
|
||||
}
|
||||
if (contentToAdd.Count > 500)
|
||||
{
|
||||
await Repo.AddRange(contentToAdd);
|
||||
contentToAdd = new List<PlexServerContent>();
|
||||
}
|
||||
}
|
||||
|
||||
if (contentToAdd.Any())
|
||||
|
|
|
@ -99,7 +99,7 @@ namespace Ombi.Schedule.Jobs.Plex
|
|||
private async Task GetEpisodes(PlexServers settings, Directory section)
|
||||
{
|
||||
var currentPosition = 0;
|
||||
var resultCount = settings.EpisodeBatchSize == 0 ? 50 : settings.EpisodeBatchSize;
|
||||
var resultCount = settings.EpisodeBatchSize == 0 ? 150 : settings.EpisodeBatchSize;
|
||||
var episodes = await _api.GetAllEpisodes(settings.PlexAuthToken, settings.FullUri, section.key, currentPosition, resultCount);
|
||||
_log.LogInformation(LoggingEvents.PlexEpisodeCacher, $"Total Epsiodes found for {episodes.MediaContainer.librarySectionTitle} = {episodes.MediaContainer.totalSize}");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue