From f251fd5abf9de16cdd427145ceeb4c2284c4a432 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 17 Mar 2015 15:52:25 -0400 Subject: [PATCH] update SocketHttpListener --- MediaBrowser.Model/Sync/SyncJobItemQuery.cs | 7 +++---- MediaBrowser.Model/Sync/SyncJobQuery.cs | 7 +++---- MediaBrowser.Server.Implementations/Dto/DtoService.cs | 2 +- .../MediaBrowser.Server.Implementations.csproj | 4 ++-- .../Sync/SyncJobProcessor.cs | 4 ++-- MediaBrowser.Server.Implementations/Sync/SyncManager.cs | 8 ++++---- .../Sync/SyncRepository.cs | 4 ++-- .../Sync/SyncedMediaSourceProvider.cs | 2 +- MediaBrowser.Server.Implementations/packages.config | 2 +- 9 files changed, 19 insertions(+), 21 deletions(-) diff --git a/MediaBrowser.Model/Sync/SyncJobItemQuery.cs b/MediaBrowser.Model/Sync/SyncJobItemQuery.cs index 97f26b3243..74d3ac096a 100644 --- a/MediaBrowser.Model/Sync/SyncJobItemQuery.cs +++ b/MediaBrowser.Model/Sync/SyncJobItemQuery.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; - + namespace MediaBrowser.Model.Sync { public class SyncJobItemQuery @@ -33,7 +32,7 @@ namespace MediaBrowser.Model.Sync /// Gets or sets the status. /// /// The status. - public List Statuses { get; set; } + public SyncJobItemStatus[] Statuses { get; set; } /// /// Gets or sets a value indicating whether [add metadata]. /// @@ -42,7 +41,7 @@ namespace MediaBrowser.Model.Sync public SyncJobItemQuery() { - Statuses = new List(); + Statuses = new SyncJobItemStatus[] {}; } } } diff --git a/MediaBrowser.Model/Sync/SyncJobQuery.cs b/MediaBrowser.Model/Sync/SyncJobQuery.cs index 233dc7878a..e86ec929f2 100644 --- a/MediaBrowser.Model/Sync/SyncJobQuery.cs +++ b/MediaBrowser.Model/Sync/SyncJobQuery.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; - + namespace MediaBrowser.Model.Sync { public class SyncJobQuery @@ -28,7 +27,7 @@ namespace MediaBrowser.Model.Sync /// Gets or sets the status. /// /// The status. - public List Statuses { get; set; } + public SyncJobStatus[] Statuses { get; set; } /// /// Gets or sets a value indicating whether [synchronize new content]. /// @@ -37,7 +36,7 @@ namespace MediaBrowser.Model.Sync public SyncJobQuery() { - Statuses = new List(); + Statuses = new SyncJobStatus[] { }; } } } diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index 3280cf264b..887a94ab30 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -161,7 +161,7 @@ namespace MediaBrowser.Server.Implementations.Dto var result = _syncManager.GetLibraryItemIds(new SyncJobItemQuery { TargetId = deviceId, - Statuses = new List + Statuses = new SyncJobItemStatus[] { SyncJobItemStatus.Converting, SyncJobItemStatus.Queued, diff --git a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj index 9207b606ef..3eb414068f 100644 --- a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj +++ b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj @@ -68,9 +68,9 @@ ..\ThirdParty\ServiceStack\ServiceStack.Api.Swagger.dll - + False - ..\packages\SocketHttpListener.1.0.0.1\lib\net45\SocketHttpListener.dll + ..\packages\SocketHttpListener.1.0.0.3\lib\net45\SocketHttpListener.dll diff --git a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs index 76cfa46085..22c59610b9 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs +++ b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs @@ -364,7 +364,7 @@ namespace MediaBrowser.Server.Implementations.Sync // If it already has a converting status then is must have been aborted during conversion var result = _syncRepo.GetJobItems(new SyncJobItemQuery { - Statuses = new List { SyncJobItemStatus.Queued, SyncJobItemStatus.Converting } + Statuses = new SyncJobItemStatus[] { SyncJobItemStatus.Queued, SyncJobItemStatus.Converting } }); await SyncJobItems(result.Items, true, progress, cancellationToken).ConfigureAwait(false); @@ -386,7 +386,7 @@ namespace MediaBrowser.Server.Implementations.Sync // If it already has a converting status then is must have been aborted during conversion var result = _syncRepo.GetJobItems(new SyncJobItemQuery { - Statuses = new List { SyncJobItemStatus.Queued, SyncJobItemStatus.Converting }, + Statuses = new SyncJobItemStatus[] { SyncJobItemStatus.Queued, SyncJobItemStatus.Converting }, TargetId = targetId }); diff --git a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs b/MediaBrowser.Server.Implementations/Sync/SyncManager.cs index 6e55688a8f..dc539b4083 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs +++ b/MediaBrowser.Server.Implementations/Sync/SyncManager.cs @@ -183,7 +183,7 @@ namespace MediaBrowser.Server.Implementations.Sync // If it already has a converting status then is must have been aborted during conversion var jobItemsResult = _repo.GetJobItems(new SyncJobItemQuery { - Statuses = new List { SyncJobItemStatus.Queued, SyncJobItemStatus.Converting }, + Statuses = new SyncJobItemStatus[] { SyncJobItemStatus.Queued, SyncJobItemStatus.Converting }, JobId = jobId }); @@ -192,7 +192,7 @@ namespace MediaBrowser.Server.Implementations.Sync jobItemsResult = _repo.GetJobItems(new SyncJobItemQuery { - Statuses = new List { SyncJobItemStatus.Queued, SyncJobItemStatus.Converting }, + Statuses = new SyncJobItemStatus[] { SyncJobItemStatus.Queued, SyncJobItemStatus.Converting }, JobId = jobId }); @@ -719,7 +719,7 @@ namespace MediaBrowser.Server.Implementations.Sync var jobItemResult = GetJobItems(new SyncJobItemQuery { TargetId = targetId, - Statuses = new List + Statuses = new SyncJobItemStatus[] { SyncJobItemStatus.ReadyToTransfer } @@ -736,7 +736,7 @@ namespace MediaBrowser.Server.Implementations.Sync var jobItemResult = GetJobItems(new SyncJobItemQuery { TargetId = request.TargetId, - Statuses = new List { SyncJobItemStatus.Synced } + Statuses = new SyncJobItemStatus[] { SyncJobItemStatus.Synced } }); var response = new SyncDataResponse(); diff --git a/MediaBrowser.Server.Implementations/Sync/SyncRepository.cs b/MediaBrowser.Server.Implementations/Sync/SyncRepository.cs index ae99c7a1e5..5ad351af52 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncRepository.cs +++ b/MediaBrowser.Server.Implementations/Sync/SyncRepository.cs @@ -440,7 +440,7 @@ namespace MediaBrowser.Server.Implementations.Sync var whereClauses = new List(); - if (query.Statuses.Count > 0) + if (query.Statuses.Length > 0) { var statuses = string.Join(",", query.Statuses.Select(i => "'" + i.ToString() + "'").ToArray()); @@ -571,7 +571,7 @@ namespace MediaBrowser.Server.Implementations.Sync cmd.Parameters.Add(cmd, "@TargetId", DbType.String).Value = query.TargetId; } - if (query.Statuses.Count > 0) + if (query.Statuses.Length > 0) { var statuses = string.Join(",", query.Statuses.Select(i => "'" + i.ToString() + "'").ToArray()); diff --git a/MediaBrowser.Server.Implementations/Sync/SyncedMediaSourceProvider.cs b/MediaBrowser.Server.Implementations/Sync/SyncedMediaSourceProvider.cs index 93a466c526..893b16b140 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncedMediaSourceProvider.cs +++ b/MediaBrowser.Server.Implementations/Sync/SyncedMediaSourceProvider.cs @@ -28,7 +28,7 @@ namespace MediaBrowser.Server.Implementations.Sync var jobItemResult = _syncManager.GetJobItems(new SyncJobItemQuery { AddMetadata = false, - Statuses = new List { SyncJobItemStatus.Synced }, + Statuses = new SyncJobItemStatus[] { SyncJobItemStatus.Synced }, ItemId = item.Id.ToString("N") }); diff --git a/MediaBrowser.Server.Implementations/packages.config b/MediaBrowser.Server.Implementations/packages.config index 1e27c1cdc2..438ccff92a 100644 --- a/MediaBrowser.Server.Implementations/packages.config +++ b/MediaBrowser.Server.Implementations/packages.config @@ -5,5 +5,5 @@ - + \ No newline at end of file