aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Sync
diff options
context:
space:
mode:
authorTavares André <tavares_and@hotmail.com>2015-07-16 20:19:12 +0200
committerTavares André <tavares_and@hotmail.com>2015-07-16 20:19:12 +0200
commit8fd5a8af8d8b6d371a0a2c44d0c7c6809410125c (patch)
treec23e4a4afc33c35318eb2a26f51b28d3a6bb35da /MediaBrowser.Server.Implementations/Sync
parent0fa55fd6de42b683bcdcc0c632f4db1436bca36d (diff)
parentf1ad56a7deaef79f6dcb2b871de727b8e4af3371 (diff)
Merge branch 'dev' of https://github.com/MediaBrowser/MediaBrowser into dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/Sync')
-rw-r--r--MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs14
-rw-r--r--MediaBrowser.Server.Implementations/Sync/MediaSync.cs6
2 files changed, 20 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs b/MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs
index 6272fe9261..175dbbc010 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 96e996ff12..86ef58e425 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;