resolve update check errors

This commit is contained in:
Luke Pulverenti 2014-12-17 00:52:34 -05:00
parent 13274348e9
commit 3763f7d912
5 changed files with 29 additions and 21 deletions

View File

@ -27,22 +27,14 @@ namespace MediaBrowser.Api.Sync
public string Id { get; set; }
}
[Route("/Sync/Jobs", "GET", Summary = "Gets sync jobs.")]
public class GetSyncJobs : IReturn<QueryResult<SyncJob>>
[Route("/Sync/JobItems", "GET", Summary = "Gets sync job items.")]
public class GetSyncJobItems : SyncJobItemQuery, IReturn<QueryResult<SyncJobItem>>
{
/// <summary>
/// Skips over a given number of items within the results. Use for paging.
/// </summary>
/// <value>The start index.</value>
[ApiMember(Name = "StartIndex", Description = "Optional. The record index to start at. All items with a lower index will be dropped from the results.", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
public int? StartIndex { get; set; }
}
/// <summary>
/// The maximum number of items to return
/// </summary>
/// <value>The limit.</value>
[ApiMember(Name = "Limit", Description = "Optional. The maximum number of records to return", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
public int? Limit { get; set; }
[Route("/Sync/Jobs", "GET", Summary = "Gets sync jobs.")]
public class GetSyncJobs : SyncJobQuery, IReturn<QueryResult<SyncJob>>
{
}
[Route("/Sync/Jobs", "POST", Summary = "Gets sync jobs.")]
@ -104,11 +96,14 @@ namespace MediaBrowser.Api.Sync
public object Get(GetSyncJobs request)
{
var result = _syncManager.GetJobs(new SyncJobQuery
{
StartIndex = request.StartIndex,
Limit = request.Limit
});
var result = _syncManager.GetJobs(request);
return ToOptimizedResult(result);
}
public object Get(GetSyncJobItems request)
{
var result = _syncManager.GetJobItems(request);
return ToOptimizedResult(result);
}

View File

@ -3,7 +3,7 @@ namespace MediaBrowser.Common.Implementations.Security
{
public class MbAdmin
{
public const string HttpUrl = "https://www.mb3admin.com/admin/";
public const string HttpUrl = "http://www.mb3admin.com/admin/";
/// <summary>
/// Leaving as http for now until we get it squared away

View File

@ -22,6 +22,13 @@ namespace MediaBrowser.Controller.Sync
/// <returns>QueryResult&lt;SyncJob&gt;.</returns>
QueryResult<SyncJob> GetJobs(SyncJobQuery query);
/// <summary>
/// Gets the job items.
/// </summary>
/// <param name="query">The query.</param>
/// <returns>QueryResult&lt;SyncJobItem&gt;.</returns>
QueryResult<SyncJobItem> GetJobItems(SyncJobItemQuery query);
/// <summary>
/// Gets the job.
/// </summary>

View File

@ -1411,8 +1411,9 @@ namespace MediaBrowser.Model.ApiClient
/// Gets the synchronize job item file.
/// </summary>
/// <param name="id">The identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;Stream&gt;.</returns>
Task<Stream> GetSyncJobItemFile(string id);
Task<Stream> GetSyncJobItemFile(string id, CancellationToken cancellationToken);
/// <summary>
/// Opens the web socket.

View File

@ -284,5 +284,10 @@ namespace MediaBrowser.Server.Implementations.Sync
{
return _repo.GetJobItem(id);
}
public QueryResult<SyncJobItem> GetJobItems(SyncJobItemQuery query)
{
return _repo.GetJobItems(query);
}
}
}