diff --git a/MediaBrowser.Api/Sync/SyncService.cs b/MediaBrowser.Api/Sync/SyncService.cs index d4d1106ec7..cefb0e46e8 100644 --- a/MediaBrowser.Api/Sync/SyncService.cs +++ b/MediaBrowser.Api/Sync/SyncService.cs @@ -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> + [Route("/Sync/JobItems", "GET", Summary = "Gets sync job items.")] + public class GetSyncJobItems : SyncJobItemQuery, IReturn> { - /// - /// Skips over a given number of items within the results. Use for paging. - /// - /// The start index. - [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; } + } - /// - /// The maximum number of items to return - /// - /// The limit. - [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> + { } [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); } diff --git a/MediaBrowser.Common.Implementations/Security/MbAdmin.cs b/MediaBrowser.Common.Implementations/Security/MbAdmin.cs index 9171e9e13e..ab4a83257c 100644 --- a/MediaBrowser.Common.Implementations/Security/MbAdmin.cs +++ b/MediaBrowser.Common.Implementations/Security/MbAdmin.cs @@ -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/"; /// /// Leaving as http for now until we get it squared away diff --git a/MediaBrowser.Controller/Sync/ISyncManager.cs b/MediaBrowser.Controller/Sync/ISyncManager.cs index 5814daf2d2..47339f6773 100644 --- a/MediaBrowser.Controller/Sync/ISyncManager.cs +++ b/MediaBrowser.Controller/Sync/ISyncManager.cs @@ -22,6 +22,13 @@ namespace MediaBrowser.Controller.Sync /// QueryResult<SyncJob>. QueryResult GetJobs(SyncJobQuery query); + /// + /// Gets the job items. + /// + /// The query. + /// QueryResult<SyncJobItem>. + QueryResult GetJobItems(SyncJobItemQuery query); + /// /// Gets the job. /// diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs index 5560e19acc..9521f85381 100644 --- a/MediaBrowser.Model/ApiClient/IApiClient.cs +++ b/MediaBrowser.Model/ApiClient/IApiClient.cs @@ -1411,8 +1411,9 @@ namespace MediaBrowser.Model.ApiClient /// Gets the synchronize job item file. /// /// The identifier. + /// The cancellation token. /// Task<Stream>. - Task GetSyncJobItemFile(string id); + Task GetSyncJobItemFile(string id, CancellationToken cancellationToken); /// /// Opens the web socket. diff --git a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs b/MediaBrowser.Server.Implementations/Sync/SyncManager.cs index 6043e8344b..5c699f0102 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs +++ b/MediaBrowser.Server.Implementations/Sync/SyncManager.cs @@ -284,5 +284,10 @@ namespace MediaBrowser.Server.Implementations.Sync { return _repo.GetJobItem(id); } + + public QueryResult GetJobItems(SyncJobItemQuery query) + { + return _repo.GetJobItems(query); + } } }