diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-12-28 16:13:12 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-28 16:13:12 -0500 |
| commit | 2cb0f3eed635bb468b3672d08dca9a720b4fb48f (patch) | |
| tree | 1a0d7c53ec148619ae966a81187413a33ca9a8a4 /Emby.Server.Implementations/Sync/SyncJobProcessor.cs | |
| parent | e47ccdce4247b93faa6d27849b255aac83324c42 (diff) | |
| parent | c10b152018967ddafe72efbccfe8ca6c586cbf04 (diff) | |
Merge pull request #2372 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Server.Implementations/Sync/SyncJobProcessor.cs')
| -rw-r--r-- | Emby.Server.Implementations/Sync/SyncJobProcessor.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Sync/SyncJobProcessor.cs b/Emby.Server.Implementations/Sync/SyncJobProcessor.cs index 415757609..b1adc64df 100644 --- a/Emby.Server.Implementations/Sync/SyncJobProcessor.cs +++ b/Emby.Server.Implementations/Sync/SyncJobProcessor.cs @@ -515,8 +515,14 @@ namespace Emby.Server.Implementations.Sync jobItem.Progress = 0; - var syncOptions = _config.GetSyncOptions(); var job = _syncManager.GetJob(jobItem.JobId); + if (job == null) + { + _logger.Error("Job not found. Cannot complete the sync job."); + await _syncManager.CancelJobItem(jobItem.Id).ConfigureAwait(false); + return; + } + var user = _userManager.GetUserById(job.UserId); if (user == null) { @@ -552,6 +558,8 @@ namespace Emby.Server.Implementations.Sync } } + var syncOptions = _config.GetSyncOptions(); + var video = item as Video; if (video != null) { |
