mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 22:08:27 +01:00
Update to 3.5.2 and .net core 2.1
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
using MediaBrowser.Model.Sync;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.Sync
|
||||
{
|
||||
public interface IHasDynamicAccess
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the synced file information.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task<SyncedFileInfo>.</returns>
|
||||
Task<SyncedFileInfo> GetSyncedFileInfo(string id, SyncTarget target, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
|
||||
namespace MediaBrowser.Controller.Sync
|
||||
{
|
||||
/// <summary>
|
||||
/// A marker interface
|
||||
/// </summary>
|
||||
public interface IRemoteSyncProvider
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
using MediaBrowser.Model.Querying;
|
||||
using MediaBrowser.Model.Sync;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.IO;
|
||||
|
||||
namespace MediaBrowser.Controller.Sync
|
||||
{
|
||||
public interface IServerSyncProvider : ISyncProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Transfers the file.
|
||||
/// </summary>
|
||||
/// <param name="stream">The stream.</param>
|
||||
/// <param name="pathParts">The path parts.</param>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="progress">The progress.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task<SyncedFileInfo> SendFile(Stream stream, string[] pathParts, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the file.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task DeleteFile(string id, SyncTarget target, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the file.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="progress">The progress.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task<Stream>.</returns>
|
||||
Task<Stream> GetFile(string id, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
|
||||
|
||||
Task<QueryResult<FileSystemMetadata>> GetFiles(string[] pathParts, SyncTarget target, CancellationToken cancellationToken);
|
||||
Task<QueryResult<FileSystemMetadata>> GetFiles(SyncTarget target, CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
public interface ISupportsDirectCopy
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends the file.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <param name="pathParts">The path parts.</param>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="progress">The progress.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task<SyncedFileInfo>.</returns>
|
||||
Task<SyncedFileInfo> SendFile(string path, string[] pathParts, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
public interface IHasDuplicateCheck
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows the duplicate job item.
|
||||
/// </summary>
|
||||
/// <param name="original">The original.</param>
|
||||
/// <param name="duplicate">The duplicate.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
bool AllowDuplicateJobItem(SyncJobItem original, SyncJobItem duplicate);
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
using MediaBrowser.Model.Sync;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.Sync
|
||||
{
|
||||
public interface ISyncDataProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the local items.
|
||||
/// </summary>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="serverId">The server identifier.</param>
|
||||
/// <returns>Task<List<LocalItem>>.</returns>
|
||||
Task<List<LocalItem>> GetLocalItems(SyncTarget target, string serverId);
|
||||
|
||||
/// <summary>
|
||||
/// Adds the or update.
|
||||
/// </summary>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task AddOrUpdate(SyncTarget target, LocalItem item);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the specified identifier.
|
||||
/// </summary>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task Delete(SyncTarget target, string id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the specified identifier.
|
||||
/// </summary>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>Task<LocalItem>.</returns>
|
||||
Task<LocalItem> Get(SyncTarget target, string id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the cached item.
|
||||
/// </summary>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="serverId">The server identifier.</param>
|
||||
/// <param name="itemId">The item identifier.</param>
|
||||
/// <returns>Task<LocalItem>.</returns>
|
||||
Task<List<LocalItem>> GetItems(SyncTarget target, string serverId, string itemId);
|
||||
/// <summary>
|
||||
/// Gets the cached items by synchronize job item identifier.
|
||||
/// </summary>
|
||||
/// <param name="target">The target.</param>
|
||||
/// <param name="serverId">The server identifier.</param>
|
||||
/// <param name="syncJobItemId">The synchronize job item identifier.</param>
|
||||
/// <returns>Task<List<LocalItem>>.</returns>
|
||||
Task<List<LocalItem>> GetItemsBySyncJobItemId(SyncTarget target, string serverId, string syncJobItemId);
|
||||
}
|
||||
}
|
||||
@@ -1,181 +0,0 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.Events;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using MediaBrowser.Model.Sync;
|
||||
using MediaBrowser.Model.Users;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.Sync
|
||||
{
|
||||
public interface ISyncManager
|
||||
{
|
||||
event EventHandler<GenericEventArgs<SyncJobCreationResult>> SyncJobCreated;
|
||||
event EventHandler<GenericEventArgs<SyncJob>> SyncJobCancelled;
|
||||
event EventHandler<GenericEventArgs<SyncJob>> SyncJobUpdated;
|
||||
event EventHandler<GenericEventArgs<SyncJobItem>> SyncJobItemUpdated;
|
||||
event EventHandler<GenericEventArgs<SyncJobItem>> SyncJobItemCreated;
|
||||
event EventHandler<GenericEventArgs<SyncJobItem>> SyncJobItemCancelled;
|
||||
|
||||
/// <summary>
|
||||
/// Creates the job.
|
||||
/// </summary>
|
||||
/// <param name="request">The request.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task<SyncJobCreationResult> CreateJob(SyncJobRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the jobs.
|
||||
/// </summary>
|
||||
/// <returns>QueryResult<SyncJob>.</returns>
|
||||
QueryResult<SyncJob> GetJobs(SyncJobQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the job items.
|
||||
/// </summary>
|
||||
/// <param name="query">The query.</param>
|
||||
/// <returns>QueryResult<SyncJobItem>.</returns>
|
||||
QueryResult<SyncJobItem> GetJobItems(SyncJobItemQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the job.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>SyncJob.</returns>
|
||||
SyncJob GetJob(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Updates the job.
|
||||
/// </summary>
|
||||
/// <param name="job">The job.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task UpdateJob(SyncJob job);
|
||||
|
||||
/// <summary>
|
||||
/// Res the enable job item.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task ReEnableJobItem(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Cnacels the job item.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task CancelJobItem(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Cancels the job.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task CancelJob(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Cancels the items.
|
||||
/// </summary>
|
||||
/// <param name="targetId">The target identifier.</param>
|
||||
/// <param name="itemIds">The item ids.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task CancelItems(string targetId, string[] itemIds);
|
||||
|
||||
/// <summary>
|
||||
/// Adds the parts.
|
||||
/// </summary>
|
||||
void AddParts(IEnumerable<ISyncProvider> providers);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the synchronize targets.
|
||||
/// </summary>
|
||||
List<SyncTarget> GetSyncTargets(string userId);
|
||||
|
||||
/// <summary>
|
||||
/// Supportses the synchronize.
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
bool SupportsSync(BaseItem item);
|
||||
|
||||
/// <summary>
|
||||
/// Reports the synchronize job item transferred.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task ReportSyncJobItemTransferred(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the job item.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>SyncJobItem.</returns>
|
||||
SyncJobItem GetJobItem(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Reports the offline action.
|
||||
/// </summary>
|
||||
/// <param name="action">The action.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task ReportOfflineAction(UserAction action);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the ready synchronize items.
|
||||
/// </summary>
|
||||
/// <param name="targetId">The target identifier.</param>
|
||||
/// <returns>List<SyncedItem>.</returns>
|
||||
Task<List<SyncedItem>> GetReadySyncItems(string targetId);
|
||||
|
||||
/// <summary>
|
||||
/// Synchronizes the data.
|
||||
/// </summary>
|
||||
/// <param name="request">The request.</param>
|
||||
/// <returns>Task<SyncDataResponse>.</returns>
|
||||
Task<SyncDataResponse> SyncData(SyncDataRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the library item ids.
|
||||
/// </summary>
|
||||
/// <param name="query">The query.</param>
|
||||
/// <returns>QueryResult<System.String>.</returns>
|
||||
Dictionary<string, SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Reports the synchronize job item transfer beginning.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task ReportSyncJobItemTransferBeginning(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Reports the synchronize job item transfer failed.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task ReportSyncJobItemTransferFailed(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the quality options.
|
||||
/// </summary>
|
||||
/// <param name="targetId">The target identifier.</param>
|
||||
List<SyncQualityOption> GetQualityOptions(string targetId);
|
||||
/// <summary>
|
||||
/// Gets the quality options.
|
||||
/// </summary>
|
||||
/// <param name="targetId">The target identifier.</param>
|
||||
/// <param name="user">The user.</param>
|
||||
List<SyncQualityOption> GetQualityOptions(string targetId, User user);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the profile options.
|
||||
/// </summary>
|
||||
/// <param name="targetId">The target identifier.</param>
|
||||
List<SyncProfileOption> GetProfileOptions(string targetId);
|
||||
/// <summary>
|
||||
/// Gets the profile options.
|
||||
/// </summary>
|
||||
/// <param name="targetId">The target identifier.</param>
|
||||
/// <param name="user">The user.</param>
|
||||
List<SyncProfileOption> GetProfileOptions(string targetId, User user);
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
using MediaBrowser.Model.Sync;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Sync
|
||||
{
|
||||
public interface ISyncProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the synchronize targets.
|
||||
/// </summary>
|
||||
/// <param name="userId">The user identifier.</param>
|
||||
/// <returns>IEnumerable<SyncTarget>.</returns>
|
||||
List<SyncTarget> GetSyncTargets(string userId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all synchronize targets.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable<SyncTarget>.</returns>
|
||||
List<SyncTarget> GetAllSyncTargets();
|
||||
}
|
||||
|
||||
public interface IHasUniqueTargetIds
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Sync
|
||||
{
|
||||
public class SyncedFileInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the path.
|
||||
/// </summary>
|
||||
/// <value>The path.</value>
|
||||
public string Path { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the protocol.
|
||||
/// </summary>
|
||||
/// <value>The protocol.</value>
|
||||
public MediaProtocol Protocol { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the required HTTP headers.
|
||||
/// </summary>
|
||||
/// <value>The required HTTP headers.</value>
|
||||
public Dictionary<string, string> RequiredHttpHeaders { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier.
|
||||
/// </summary>
|
||||
/// <value>The identifier.</value>
|
||||
public string Id { get; set; }
|
||||
|
||||
public SyncedFileInfo()
|
||||
{
|
||||
RequiredHttpHeaders = new Dictionary<string, string>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
using MediaBrowser.Model.Sync;
|
||||
|
||||
namespace MediaBrowser.Controller.Sync
|
||||
{
|
||||
public class SyncedItemProgress
|
||||
{
|
||||
public double Progress { get; set; }
|
||||
public SyncJobItemStatus Status { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user