sync updates
This commit is contained in:
parent
7773862fac
commit
d7a979979b
|
@ -152,7 +152,7 @@ namespace MediaBrowser.Server.Implementations.Sync
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sendFileResult = await SendFile(provider, internalSyncJobItem.OutputPath, localItem.LocalPath, target, cancellationToken).ConfigureAwait(false);
|
var sendFileResult = await SendFile(provider, internalSyncJobItem.OutputPath, localItem.LocalPath, target, fileTransferProgress, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
if (localItem.Item.MediaSources != null)
|
if (localItem.Item.MediaSources != null)
|
||||||
{
|
{
|
||||||
|
@ -213,7 +213,7 @@ namespace MediaBrowser.Server.Implementations.Sync
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var remotePath = GetRemoteSubtitlePath(localItem, mediaStream, provider, target);
|
var remotePath = GetRemoteSubtitlePath(localItem, mediaStream, provider, target);
|
||||||
var sendFileResult = await SendFile(provider, mediaStream.Path, remotePath, target, cancellationToken).ConfigureAwait(false);
|
var sendFileResult = await SendFile(provider, mediaStream.Path, remotePath, target, new Progress<double>(), cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
mediaStream.Path = sendFileResult.Path;
|
mediaStream.Path = sendFileResult.Path;
|
||||||
requiresSave = true;
|
requiresSave = true;
|
||||||
|
@ -293,12 +293,12 @@ namespace MediaBrowser.Server.Implementations.Sync
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<SendFileResult> SendFile(IServerSyncProvider provider, string inputPath, string remotePath, SyncTarget target, CancellationToken cancellationToken)
|
private async Task<SendFileResult> SendFile(IServerSyncProvider provider, string inputPath, string remotePath, SyncTarget target, IProgress<double> progress, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
_logger.Debug("Sending {0} to {1}. Remote path: {2}", inputPath, provider.Name, remotePath);
|
_logger.Debug("Sending {0} to {1}. Remote path: {2}", inputPath, provider.Name, remotePath);
|
||||||
using (var stream = _fileSystem.GetFileStream(inputPath, FileMode.Open, FileAccess.Read, FileShare.Read, true))
|
using (var stream = _fileSystem.GetFileStream(inputPath, FileMode.Open, FileAccess.Read, FileShare.Read, true))
|
||||||
{
|
{
|
||||||
return await provider.SendFile(stream, remotePath, target, new Progress<double>(), cancellationToken).ConfigureAwait(false);
|
return await provider.SendFile(stream, remotePath, target, progress, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user