added sync model objects
This commit is contained in:
parent
98012480f7
commit
6375411f53
|
@ -319,6 +319,7 @@
|
||||||
<Compile Include="Sorting\SortExtensions.cs" />
|
<Compile Include="Sorting\SortExtensions.cs" />
|
||||||
<Compile Include="Subtitles\SubtitleResponse.cs" />
|
<Compile Include="Subtitles\SubtitleResponse.cs" />
|
||||||
<Compile Include="Subtitles\SubtitleSearchRequest.cs" />
|
<Compile Include="Subtitles\SubtitleSearchRequest.cs" />
|
||||||
|
<Compile Include="Sync\ISyncManager.cs" />
|
||||||
<Compile Include="Themes\IAppThemeManager.cs" />
|
<Compile Include="Themes\IAppThemeManager.cs" />
|
||||||
<Compile Include="Themes\InternalThemeImage.cs" />
|
<Compile Include="Themes\InternalThemeImage.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
50
MediaBrowser.Controller/Sync/ISyncManager.cs
Normal file
50
MediaBrowser.Controller/Sync/ISyncManager.cs
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
using MediaBrowser.Model.Querying;
|
||||||
|
using MediaBrowser.Model.Sync;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace MediaBrowser.Controller.Sync
|
||||||
|
{
|
||||||
|
public interface ISyncManager
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Creates the job.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request">The request.</param>
|
||||||
|
/// <returns>Task.</returns>
|
||||||
|
Task<List<SyncJob>> CreateJob(SyncJobRequest request);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates the schedule.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request">The request.</param>
|
||||||
|
/// <returns>Task.</returns>
|
||||||
|
Task<SyncSchedule> CreateSchedule(SyncScheduleRequest request);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the jobs.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>QueryResult<SyncJob>.</returns>
|
||||||
|
QueryResult<SyncJob> GetJobs(SyncJobQuery query);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the schedules.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>QueryResult<SyncSchedule>.</returns>
|
||||||
|
QueryResult<SyncSchedule> GetSchedules(SyncScheduleQuery query);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Cancels the job.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">The identifier.</param>
|
||||||
|
/// <returns>Task.</returns>
|
||||||
|
Task CancelJob(string id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Cancels the schedule.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">The identifier.</param>
|
||||||
|
/// <returns>Task.</returns>
|
||||||
|
Task CancelSchedule(string id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -842,6 +842,30 @@
|
||||||
<Compile Include="..\MediaBrowser.Model\Session\UserDataChangeInfo.cs">
|
<Compile Include="..\MediaBrowser.Model\Session\UserDataChangeInfo.cs">
|
||||||
<Link>Session\UserDataChangeInfo.cs</Link>
|
<Link>Session\UserDataChangeInfo.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncJob.cs">
|
||||||
|
<Link>Sync\SyncJob.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncJobQuery.cs">
|
||||||
|
<Link>Sync\SyncJobQuery.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncJobRequest.cs">
|
||||||
|
<Link>Sync\SyncJobRequest.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncJobStatus.cs">
|
||||||
|
<Link>Sync\SyncJobStatus.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncQuality.cs">
|
||||||
|
<Link>Sync\SyncQuality.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncSchedule.cs">
|
||||||
|
<Link>Sync\SyncSchedule.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncScheduleQuery.cs">
|
||||||
|
<Link>Sync\SyncScheduleQuery.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncScheduleRequest.cs">
|
||||||
|
<Link>Sync\SyncScheduleRequest.cs</Link>
|
||||||
|
</Compile>
|
||||||
<Compile Include="..\MediaBrowser.Model\System\LogFile.cs">
|
<Compile Include="..\MediaBrowser.Model\System\LogFile.cs">
|
||||||
<Link>System\LogFile.cs</Link>
|
<Link>System\LogFile.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
|
@ -799,6 +799,30 @@
|
||||||
<Compile Include="..\MediaBrowser.Model\Session\UserDataChangeInfo.cs">
|
<Compile Include="..\MediaBrowser.Model\Session\UserDataChangeInfo.cs">
|
||||||
<Link>Session\UserDataChangeInfo.cs</Link>
|
<Link>Session\UserDataChangeInfo.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncJob.cs">
|
||||||
|
<Link>Sync\SyncJob.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncJobQuery.cs">
|
||||||
|
<Link>Sync\SyncJobQuery.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncJobRequest.cs">
|
||||||
|
<Link>Sync\SyncJobRequest.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncJobStatus.cs">
|
||||||
|
<Link>Sync\SyncJobStatus.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncQuality.cs">
|
||||||
|
<Link>Sync\SyncQuality.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncSchedule.cs">
|
||||||
|
<Link>Sync\SyncSchedule.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncScheduleQuery.cs">
|
||||||
|
<Link>Sync\SyncScheduleQuery.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\MediaBrowser.Model\Sync\SyncScheduleRequest.cs">
|
||||||
|
<Link>Sync\SyncScheduleRequest.cs</Link>
|
||||||
|
</Compile>
|
||||||
<Compile Include="..\MediaBrowser.Model\System\LogFile.cs">
|
<Compile Include="..\MediaBrowser.Model\System\LogFile.cs">
|
||||||
<Link>System\LogFile.cs</Link>
|
<Link>System\LogFile.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
|
@ -295,6 +295,14 @@
|
||||||
<Compile Include="Session\SessionInfoDto.cs" />
|
<Compile Include="Session\SessionInfoDto.cs" />
|
||||||
<Compile Include="Session\SessionUserInfo.cs" />
|
<Compile Include="Session\SessionUserInfo.cs" />
|
||||||
<Compile Include="Session\UserDataChangeInfo.cs" />
|
<Compile Include="Session\UserDataChangeInfo.cs" />
|
||||||
|
<Compile Include="Sync\SyncJob.cs" />
|
||||||
|
<Compile Include="Sync\SyncJobQuery.cs" />
|
||||||
|
<Compile Include="Sync\SyncJobRequest.cs" />
|
||||||
|
<Compile Include="Sync\SyncJobStatus.cs" />
|
||||||
|
<Compile Include="Sync\SyncQuality.cs" />
|
||||||
|
<Compile Include="Sync\SyncSchedule.cs" />
|
||||||
|
<Compile Include="Sync\SyncScheduleQuery.cs" />
|
||||||
|
<Compile Include="Sync\SyncScheduleRequest.cs" />
|
||||||
<Compile Include="System\LogFile.cs" />
|
<Compile Include="System\LogFile.cs" />
|
||||||
<Compile Include="Themes\AppTheme.cs" />
|
<Compile Include="Themes\AppTheme.cs" />
|
||||||
<Compile Include="Themes\AppThemeInfo.cs" />
|
<Compile Include="Themes\AppThemeInfo.cs" />
|
||||||
|
|
47
MediaBrowser.Model/Sync/SyncJob.cs
Normal file
47
MediaBrowser.Model/Sync/SyncJob.cs
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
|
||||||
|
namespace MediaBrowser.Model.Sync
|
||||||
|
{
|
||||||
|
public class SyncJob
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the identifier.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The identifier.</value>
|
||||||
|
public string Id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the device identifier.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The device identifier.</value>
|
||||||
|
public string DeviceId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the item identifier.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The item identifier.</value>
|
||||||
|
public string ItemId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the quality.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The quality.</value>
|
||||||
|
public SyncQuality Quality { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the status.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The status.</value>
|
||||||
|
public SyncJobStatus Status { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the current progress.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The current progress.</value>
|
||||||
|
public double? CurrentProgress { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the synchronize rule identifier.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The synchronize rule identifier.</value>
|
||||||
|
public string SyncScheduleId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the transcoded path.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The transcoded path.</value>
|
||||||
|
public string TranscodedPath { get; set; }
|
||||||
|
}
|
||||||
|
}
|
7
MediaBrowser.Model/Sync/SyncJobQuery.cs
Normal file
7
MediaBrowser.Model/Sync/SyncJobQuery.cs
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
|
||||||
|
namespace MediaBrowser.Model.Sync
|
||||||
|
{
|
||||||
|
public class SyncJobQuery
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
28
MediaBrowser.Model/Sync/SyncJobRequest.cs
Normal file
28
MediaBrowser.Model/Sync/SyncJobRequest.cs
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace MediaBrowser.Model.Sync
|
||||||
|
{
|
||||||
|
public class SyncJobRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the device identifier.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The device identifier.</value>
|
||||||
|
public List<string> DeviceIds { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the item identifier.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The item identifier.</value>
|
||||||
|
public string ItemId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the quality.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The quality.</value>
|
||||||
|
public SyncQuality Quality { get; set; }
|
||||||
|
|
||||||
|
public SyncJobRequest()
|
||||||
|
{
|
||||||
|
DeviceIds = new List<string>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
35
MediaBrowser.Model/Sync/SyncJobStatus.cs
Normal file
35
MediaBrowser.Model/Sync/SyncJobStatus.cs
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
|
||||||
|
namespace MediaBrowser.Model.Sync
|
||||||
|
{
|
||||||
|
public enum SyncJobStatus
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The queued
|
||||||
|
/// </summary>
|
||||||
|
Queued = 0,
|
||||||
|
/// <summary>
|
||||||
|
/// The transcoding
|
||||||
|
/// </summary>
|
||||||
|
Transcoding = 1,
|
||||||
|
/// <summary>
|
||||||
|
/// The transcoding failed
|
||||||
|
/// </summary>
|
||||||
|
TranscodingFailed = 2,
|
||||||
|
/// <summary>
|
||||||
|
/// The transcoding completed
|
||||||
|
/// </summary>
|
||||||
|
TranscodingCompleted = 3,
|
||||||
|
/// <summary>
|
||||||
|
/// The transfering
|
||||||
|
/// </summary>
|
||||||
|
Transfering = 4,
|
||||||
|
/// <summary>
|
||||||
|
/// The transfer failed
|
||||||
|
/// </summary>
|
||||||
|
TransferFailed = 4,
|
||||||
|
/// <summary>
|
||||||
|
/// The completed
|
||||||
|
/// </summary>
|
||||||
|
Completed = 6
|
||||||
|
}
|
||||||
|
}
|
21
MediaBrowser.Model/Sync/SyncQuality.cs
Normal file
21
MediaBrowser.Model/Sync/SyncQuality.cs
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
|
||||||
|
namespace MediaBrowser.Model.Sync
|
||||||
|
{
|
||||||
|
public enum SyncQuality
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The good
|
||||||
|
/// </summary>
|
||||||
|
Good = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The better
|
||||||
|
/// </summary>
|
||||||
|
Better = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The best
|
||||||
|
/// </summary>
|
||||||
|
Best = 2
|
||||||
|
}
|
||||||
|
}
|
12
MediaBrowser.Model/Sync/SyncSchedule.cs
Normal file
12
MediaBrowser.Model/Sync/SyncSchedule.cs
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
namespace MediaBrowser.Model.Sync
|
||||||
|
{
|
||||||
|
public class SyncSchedule
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the identifier.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The identifier.</value>
|
||||||
|
public string Id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
7
MediaBrowser.Model/Sync/SyncScheduleQuery.cs
Normal file
7
MediaBrowser.Model/Sync/SyncScheduleQuery.cs
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
|
||||||
|
namespace MediaBrowser.Model.Sync
|
||||||
|
{
|
||||||
|
public class SyncScheduleQuery
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
23
MediaBrowser.Model/Sync/SyncScheduleRequest.cs
Normal file
23
MediaBrowser.Model/Sync/SyncScheduleRequest.cs
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace MediaBrowser.Model.Sync
|
||||||
|
{
|
||||||
|
public class SyncScheduleRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the device identifier.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The device identifier.</value>
|
||||||
|
public List<string> DeviceIds { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the quality.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The quality.</value>
|
||||||
|
public SyncQuality Quality { get; set; }
|
||||||
|
|
||||||
|
public SyncScheduleRequest()
|
||||||
|
{
|
||||||
|
DeviceIds = new List<string>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -339,7 +339,6 @@ namespace MediaBrowser.Providers.Manager
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
failedProviderCount++;
|
|
||||||
Logger.Debug("{0} returned no metadata for {1}", providerName, item.Path ?? item.Name);
|
Logger.Debug("{0} returned no metadata for {1}", providerName, item.Path ?? item.Name);
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user