public Task UpdateJob(SyncJob job) { // Get fresh from the db and only update the fields that are supported to be changed. var instance = _repo.GetJob(job.Id); instance.Name = job.Name; instance.Quality = job.Quality; instance.UnwatchedOnly = job.UnwatchedOnly; instance.SyncNewContent = job.SyncNewContent; instance.ItemLimit = job.ItemLimit; return(_repo.Update(instance)); }
public async Task UpdateJob(SyncJob job) { // Get fresh from the db and only update the fields that are supported to be changed. var instance = _repo.GetJob(job.Id); instance.Name = job.Name; instance.Quality = job.Quality; instance.UnwatchedOnly = job.UnwatchedOnly; instance.SyncNewContent = job.SyncNewContent; instance.ItemLimit = job.ItemLimit; await _repo.Update(instance).ConfigureAwait(false); OnSyncJobUpdated(instance); }
public Task UpdateJobStatus(string id) { var job = _syncRepo.GetJob(id); var result = _syncManager.GetJobItems(new SyncJobItemQuery { JobId = job.Id, AddMetadata = false }); return(UpdateJobStatus(job, result.Items.ToList())); }
public Task UpdateJobStatus(string id) { var job = _syncRepo.GetJob(id); if (job == null) { return Task.FromResult(true); } var result = _syncManager.GetJobItems(new SyncJobItemQuery { JobId = job.Id, AddMetadata = false }); return UpdateJobStatus(job, result.Items.ToList()); }
public Task UpdateJobStatus(string id) { var job = _syncRepo.GetJob(id); return(UpdateJobStatus(job)); }
public SyncJob GetJob(string id) { return(_repo.GetJob(id)); }