diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-12-22 18:54:45 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-22 18:54:45 -0500 |
| commit | 026e58eb16b839c31cd8fb16829265c2f9087a5d (patch) | |
| tree | 656be3f3a30a5a532b1a17a0ad3b27fb91473b7b /Emby.Server.Implementations/Sync/SyncManager.cs | |
| parent | ef671725559ef394337343af510ecb557b700d17 (diff) | |
| parent | 02f749c654a5af4525304ed3ee470ba40c6405b9 (diff) | |
Merge pull request #2364 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Sync/SyncManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Sync/SyncManager.cs | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/Emby.Server.Implementations/Sync/SyncManager.cs b/Emby.Server.Implementations/Sync/SyncManager.cs index 13f60f5ee..061129e5f 100644 --- a/Emby.Server.Implementations/Sync/SyncManager.cs +++ b/Emby.Server.Implementations/Sync/SyncManager.cs @@ -1042,10 +1042,7 @@ namespace Emby.Server.Implementations.Sync throw new ArgumentException("Operation is not valid for this job item"); } - if (jobItem.Status != SyncJobItemStatus.Synced) - { - jobItem.Status = SyncJobItemStatus.Cancelled; - } + jobItem.Status = SyncJobItemStatus.Cancelled; jobItem.Progress = 0; jobItem.IsMarkedForRemoval = true; @@ -1071,18 +1068,18 @@ namespace Emby.Server.Implementations.Sync _logger.ErrorException("Error deleting directory {0}", ex, path); } - //var jobItemsResult = GetJobItems(new SyncJobItemQuery - //{ - // AddMetadata = false, - // JobId = jobItem.JobId, - // Limit = 0, - // Statuses = new[] { SyncJobItemStatus.Converting, SyncJobItemStatus.Failed, SyncJobItemStatus.Queued, SyncJobItemStatus.ReadyToTransfer, SyncJobItemStatus.Synced, SyncJobItemStatus.Transferring } - //}); + var jobItemsResult = GetJobItems(new SyncJobItemQuery + { + AddMetadata = false, + JobId = jobItem.JobId, + Limit = 0, + Statuses = new[] { SyncJobItemStatus.Converting, SyncJobItemStatus.Queued, SyncJobItemStatus.ReadyToTransfer, SyncJobItemStatus.Synced, SyncJobItemStatus.Transferring } + }); - //if (jobItemsResult.TotalRecordCount == 0) - //{ - // await CancelJob(jobItem.JobId).ConfigureAwait(false); - //} + if (jobItemsResult.TotalRecordCount == 0) + { + await CancelJob(jobItem.JobId).ConfigureAwait(false); + } } public Task MarkJobItemForRemoval(string id) |
