sync updates

This commit is contained in:
Luke Pulverenti
2014-12-17 00:30:31 -05:00
parent febaab13bf
commit 13274348e9
62 changed files with 456 additions and 224 deletions

View File

@@ -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)