mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-03 07:16:31 +01:00
sync updates
This commit is contained in:
@@ -1386,6 +1386,34 @@ namespace MediaBrowser.Model.ApiClient
|
||||
/// <returns>Task<SyncJob>.</returns>
|
||||
Task<SyncJob> CreateSyncJob(SyncJobRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the synchronize jobs.
|
||||
/// </summary>
|
||||
/// <param name="query">The query.</param>
|
||||
/// <returns>Task<QueryResult<SyncJob>>.</returns>
|
||||
Task<QueryResult<SyncJob>> GetSyncJobs(SyncJobQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the synchronize job items.
|
||||
/// </summary>
|
||||
/// <param name="query">The query.</param>
|
||||
/// <returns>Task<QueryResult<SyncJobItem>>.</returns>
|
||||
Task<QueryResult<SyncJobItem>> GetSyncJobItems(SyncJobItemQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Reports the synchronize job item transferred.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task ReportSyncJobItemTransferred(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the synchronize job item file.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>Task<Stream>.</returns>
|
||||
Task<Stream> GetSyncJobItemFile(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Opens the web socket.
|
||||
/// </summary>
|
||||
|
||||
@@ -364,6 +364,7 @@
|
||||
<Compile Include="Session\UserDataChangeInfo.cs" />
|
||||
<Compile Include="Devices\ContentUploadHistory.cs" />
|
||||
<Compile Include="Sync\SyncCategory.cs" />
|
||||
<Compile Include="Sync\SyncDialogOptions.cs" />
|
||||
<Compile Include="Sync\SyncHelper.cs" />
|
||||
<Compile Include="Sync\SyncJob.cs" />
|
||||
<Compile Include="Sync\SyncJobCreationResult.cs" />
|
||||
|
||||
24
MediaBrowser.Model/Sync/SyncDialogOptions.cs
Normal file
24
MediaBrowser.Model/Sync/SyncDialogOptions.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public class SyncDialogOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the targets.
|
||||
/// </summary>
|
||||
/// <value>The targets.</value>
|
||||
public List<SyncTarget> Targets { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the options.
|
||||
/// </summary>
|
||||
/// <value>The options.</value>
|
||||
public List<SyncOptions> Options { get; set; }
|
||||
|
||||
public SyncDialogOptions()
|
||||
{
|
||||
Targets = new List<SyncTarget>();
|
||||
Options = new List<SyncOptions>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,10 @@ namespace MediaBrowser.Model.Sync
|
||||
if (item.IsVideo)
|
||||
{
|
||||
options.Add(SyncOptions.Quality);
|
||||
options.Add(SyncOptions.UnwatchedOnly);
|
||||
if (items.Count > 1)
|
||||
{
|
||||
options.Add(SyncOptions.UnwatchedOnly);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (item.IsFolder && !item.IsMusicGenre && !item.IsArtist && !item.IsType("musicalbum") && !item.IsGameGenre)
|
||||
@@ -30,6 +33,12 @@ namespace MediaBrowser.Model.Sync
|
||||
options.Add(SyncOptions.UnwatchedOnly);
|
||||
break;
|
||||
}
|
||||
if (item.IsGenre)
|
||||
{
|
||||
options.Add(SyncOptions.SyncNewContent);
|
||||
options.Add(SyncOptions.ItemLimit);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,16 @@ namespace MediaBrowser.Model.Sync
|
||||
/// <value>The job identifier.</value>
|
||||
public string JobId { 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 status.
|
||||
/// </summary>
|
||||
/// <value>The status.</value>
|
||||
public SyncJobItemStatus? Status { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is completed.
|
||||
/// </summary>
|
||||
/// <value><c>null</c> if [is completed] contains no value, <c>true</c> if [is completed]; otherwise, <c>false</c>.</value>
|
||||
|
||||
@@ -18,5 +18,10 @@ namespace MediaBrowser.Model.Sync
|
||||
/// </summary>
|
||||
/// <value><c>null</c> if [is completed] contains no value, <c>true</c> if [is completed]; otherwise, <c>false</c>.</value>
|
||||
public bool? IsCompleted { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the target identifier.
|
||||
/// </summary>
|
||||
/// <value>The target identifier.</value>
|
||||
public string TargetId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user