update SocketHttpListener

This commit is contained in:
Luke Pulverenti 2015-03-17 15:52:25 -04:00
parent 3e8576edd2
commit f251fd5abf
9 changed files with 19 additions and 21 deletions

View File

@ -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.
/// </summary>
/// <value>The status.</value>
public List<SyncJobItemStatus> Statuses { get; set; }
public SyncJobItemStatus[] Statuses { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [add metadata].
/// </summary>
@ -42,7 +41,7 @@ namespace MediaBrowser.Model.Sync
public SyncJobItemQuery()
{
Statuses = new List<SyncJobItemStatus>();
Statuses = new SyncJobItemStatus[] {};
}
}
}

View File

@ -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.
/// </summary>
/// <value>The status.</value>
public List<SyncJobStatus> Statuses { get; set; }
public SyncJobStatus[] Statuses { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [synchronize new content].
/// </summary>
@ -37,7 +36,7 @@ namespace MediaBrowser.Model.Sync
public SyncJobQuery()
{
Statuses = new List<SyncJobStatus>();
Statuses = new SyncJobStatus[] { };
}
}
}

View File

@ -161,7 +161,7 @@ namespace MediaBrowser.Server.Implementations.Dto
var result = _syncManager.GetLibraryItemIds(new SyncJobItemQuery
{
TargetId = deviceId,
Statuses = new List<SyncJobItemStatus>
Statuses = new SyncJobItemStatus[]
{
SyncJobItemStatus.Converting,
SyncJobItemStatus.Queued,

View File

@ -68,9 +68,9 @@
<Reference Include="ServiceStack.Api.Swagger">
<HintPath>..\ThirdParty\ServiceStack\ServiceStack.Api.Swagger.dll</HintPath>
</Reference>
<Reference Include="SocketHttpListener, Version=1.0.5501.2204, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="SocketHttpListener, Version=1.0.5554.26260, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\SocketHttpListener.1.0.0.1\lib\net45\SocketHttpListener.dll</HintPath>
<HintPath>..\packages\SocketHttpListener.1.0.0.3\lib\net45\SocketHttpListener.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

View File

@ -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> { 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> { SyncJobItemStatus.Queued, SyncJobItemStatus.Converting },
Statuses = new SyncJobItemStatus[] { SyncJobItemStatus.Queued, SyncJobItemStatus.Converting },
TargetId = targetId
});

View File

@ -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> { 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> { 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<SyncJobItemStatus>
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> { SyncJobItemStatus.Synced }
Statuses = new SyncJobItemStatus[] { SyncJobItemStatus.Synced }
});
var response = new SyncDataResponse();

View File

@ -440,7 +440,7 @@ namespace MediaBrowser.Server.Implementations.Sync
var whereClauses = new List<string>();
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());

View File

@ -28,7 +28,7 @@ namespace MediaBrowser.Server.Implementations.Sync
var jobItemResult = _syncManager.GetJobItems(new SyncJobItemQuery
{
AddMetadata = false,
Statuses = new List<SyncJobItemStatus> { SyncJobItemStatus.Synced },
Statuses = new SyncJobItemStatus[] { SyncJobItemStatus.Synced },
ItemId = item.Id.ToString("N")
});

View File

@ -5,5 +5,5 @@
<package id="Mono.Nat" version="1.2.21.0" targetFramework="net45" />
<package id="morelinq" version="1.1.0" targetFramework="net45" />
<package id="Patterns.Logging" version="1.0.0.2" targetFramework="net45" />
<package id="SocketHttpListener" version="1.0.0.1" targetFramework="net45" />
<package id="SocketHttpListener" version="1.0.0.3" targetFramework="net45" />
</packages>