diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Sync')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs | 14 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/Sync/MediaSync.cs | 6 |
2 files changed, 20 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs b/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs index 6272fe926..175dbbc01 100644 --- a/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs +++ b/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs @@ -210,6 +210,13 @@ namespace MediaBrowser.Server.Implementations.Sync }, new ProfileCondition { + Condition = ProfileConditionType.LessThanEqual, + Property = ProfileConditionValue.AudioBitrate, + Value = "320000", + IsRequired = true + }, + new ProfileCondition + { Condition = ProfileConditionType.Equals, Property = ProfileConditionValue.IsSecondaryAudio, Value = "false", @@ -232,6 +239,13 @@ namespace MediaBrowser.Server.Implementations.Sync }, new ProfileCondition { + Condition = ProfileConditionType.LessThanEqual, + Property = ProfileConditionValue.AudioBitrate, + Value = "320000", + IsRequired = true + }, + new ProfileCondition + { Condition = ProfileConditionType.Equals, Property = ProfileConditionValue.IsSecondaryAudio, Value = "false", diff --git a/MediaBrowser.Server.Implementations/Sync/MediaSync.cs b/MediaBrowser.Server.Implementations/Sync/MediaSync.cs index 96e996ff1..86ef58e42 100644 --- a/MediaBrowser.Server.Implementations/Sync/MediaSync.cs +++ b/MediaBrowser.Server.Implementations/Sync/MediaSync.cs @@ -341,6 +341,12 @@ namespace MediaBrowser.Server.Implementations.Sync private async Task<SyncedFileInfo> SendFile(IServerSyncProvider provider, string inputPath, string[] pathParts, SyncTarget target, SyncOptions options, IProgress<double> progress, CancellationToken cancellationToken) { _logger.Debug("Sending {0} to {1}. Remote path: {2}", inputPath, provider.Name, string.Join("/", pathParts)); + var supportsDirectCopy = provider as ISupportsDirectCopy; + if (supportsDirectCopy != null) + { + return await supportsDirectCopy.SendFile(inputPath, pathParts, target, progress, cancellationToken).ConfigureAwait(false); + } + using (var fileStream = _fileSystem.GetFileStream(inputPath, FileMode.Open, FileAccess.Read, FileShare.Read, true)) { Stream stream = fileStream; |
