Beispiel #1
0
        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));
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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()));
        }
Beispiel #4
0
        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());
        }
Beispiel #5
0
        public Task UpdateJobStatus(string id)
        {
            var job = _syncRepo.GetJob(id);

            return(UpdateJobStatus(job));
        }
Beispiel #6
0
 public SyncJob GetJob(string id)
 {
     return(_repo.GetJob(id));
 }