mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-02-11 07:02:24 +00:00
sync updates
This commit is contained in:
@@ -59,6 +59,15 @@ namespace MediaBrowser.Server.Implementations.Sync
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
// Respect ItemLimit, if set
|
||||
if (job.ItemLimit.HasValue)
|
||||
{
|
||||
if (jobItems.Count >= job.ItemLimit.Value)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var itemId = item.Id.ToString("N");
|
||||
|
||||
var jobItem = jobItems.FirstOrDefault(i => string.Equals(i.ItemId, itemId, StringComparison.OrdinalIgnoreCase));
|
||||
@@ -89,6 +98,13 @@ namespace MediaBrowser.Server.Implementations.Sync
|
||||
await UpdateJobStatus(job, jobItems).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public Task UpdateJobStatus(string id)
|
||||
{
|
||||
var job = _syncRepo.GetJob(id);
|
||||
|
||||
return UpdateJobStatus(job);
|
||||
}
|
||||
|
||||
private Task UpdateJobStatus(SyncJob job)
|
||||
{
|
||||
if (job == null)
|
||||
|
||||
Reference in New Issue
Block a user