mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-23 02:24:44 +01:00
added sync job database
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public class SyncJob
|
||||
@@ -14,39 +16,79 @@ namespace MediaBrowser.Model.Sync
|
||||
/// <value>The device identifier.</value>
|
||||
public string TargetId { 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; }
|
||||
public double? Progress { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the status.
|
||||
/// </summary>
|
||||
/// <value>The status.</value>
|
||||
public SyncJobStatus Status { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the user identifier.
|
||||
/// </summary>
|
||||
/// <value>The user identifier.</value>
|
||||
public string UserId { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [unwatched only].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [unwatched only]; otherwise, <c>false</c>.</value>
|
||||
public bool UnwatchedOnly { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the limit.
|
||||
/// </summary>
|
||||
/// <value>The limit.</value>
|
||||
public long? Limit { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the limit.
|
||||
/// </summary>
|
||||
/// <value>The type of the limit.</value>
|
||||
public SyncLimitType? LimitType { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the requested item ids.
|
||||
/// </summary>
|
||||
/// <value>The requested item ids.</value>
|
||||
public List<string> RequestedItemIds { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is dynamic.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is dynamic; otherwise, <c>false</c>.</value>
|
||||
public bool IsDynamic { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the date created.
|
||||
/// </summary>
|
||||
/// <value>The date created.</value>
|
||||
public DateTime DateCreated { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the date last modified.
|
||||
/// </summary>
|
||||
/// <value>The date last modified.</value>
|
||||
public DateTime DateLastModified { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the item count.
|
||||
/// </summary>
|
||||
/// <value>The item count.</value>
|
||||
public int ItemCount { get; set; }
|
||||
|
||||
public string ParentName { get; set; }
|
||||
public string PrimaryImageItemId { get; set; }
|
||||
public string PrimaryImageTag { get; set; }
|
||||
public double? PrimaryImageAspectRatio { get; set; }
|
||||
|
||||
public SyncJob()
|
||||
{
|
||||
RequestedItemIds = new List<string>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
8
MediaBrowser.Model/Sync/SyncJobCreationResult.cs
Normal file
8
MediaBrowser.Model/Sync/SyncJobCreationResult.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public class SyncJobCreationResult
|
||||
{
|
||||
public SyncJob Job { get; set; }
|
||||
}
|
||||
}
|
||||
48
MediaBrowser.Model/Sync/SyncJobItem.cs
Normal file
48
MediaBrowser.Model/Sync/SyncJobItem.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public class SyncJobItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier.
|
||||
/// </summary>
|
||||
/// <value>The identifier.</value>
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the job identifier.
|
||||
/// </summary>
|
||||
/// <value>The job identifier.</value>
|
||||
public string JobId { 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 target identifier.
|
||||
/// </summary>
|
||||
/// <value>The target identifier.</value>
|
||||
public string TargetId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the output path.
|
||||
/// </summary>
|
||||
/// <value>The output path.</value>
|
||||
public string OutputPath { 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; }
|
||||
}
|
||||
}
|
||||
@@ -3,5 +3,15 @@ namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public class SyncJobQuery
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the start index.
|
||||
/// </summary>
|
||||
/// <value>The start index.</value>
|
||||
public int? StartIndex { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the limit.
|
||||
/// </summary>
|
||||
/// <value>The limit.</value>
|
||||
public int? Limit { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ namespace MediaBrowser.Model.Sync
|
||||
public class SyncJobRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the device identifier.
|
||||
/// Gets or sets the target identifier.
|
||||
/// </summary>
|
||||
/// <value>The device identifier.</value>
|
||||
public List<string> TargetIds { get; set; }
|
||||
/// <value>The target identifier.</value>
|
||||
public string TargetId { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the item ids.
|
||||
/// </summary>
|
||||
@@ -24,11 +24,35 @@ namespace MediaBrowser.Model.Sync
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the user identifier.
|
||||
/// </summary>
|
||||
/// <value>The user identifier.</value>
|
||||
public string UserId { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [unwatched only].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [unwatched only]; otherwise, <c>false</c>.</value>
|
||||
public bool UnwatchedOnly { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the limit.
|
||||
/// </summary>
|
||||
/// <value>The limit.</value>
|
||||
public long? Limit { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the limit.
|
||||
/// </summary>
|
||||
/// <value>The type of the limit.</value>
|
||||
public SyncLimitType? LimitType { get; set; }
|
||||
|
||||
public SyncJobRequest()
|
||||
{
|
||||
TargetIds = new List<string>();
|
||||
ItemIds = new List<string>();
|
||||
}
|
||||
}
|
||||
|
||||
public enum SyncLimitType
|
||||
{
|
||||
ItemCount = 0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,33 +3,11 @@ 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
|
||||
Transfering = 3,
|
||||
Completed = 4,
|
||||
Cancelled = 5
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
|
||||
namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public class SyncSchedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier.
|
||||
/// </summary>
|
||||
/// <value>The identifier.</value>
|
||||
public string Id { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
|
||||
namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public class SyncScheduleQuery
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user