Esempio n. 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));
        }
Esempio n. 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);
        }
Esempio n. 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()));
        }
Esempio n. 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());
        }
Esempio n. 5
0
        public Task UpdateJobStatus(string id)
        {
            var job = _syncRepo.GetJob(id);

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