The Free Software Media System - Server Backend & API
update cloud sync profile
Luke Pulverentie1da7b80f4e8
diff --git a/Emby.Server.Implementations/Sync/CloudSyncProfile.cs b/Emby.Server.Implementations/Sync/CloudSyncProfile.csindex 1a78c8ae66..c0675df817 100644--- a/Emby.Server.Implementations/Sync/CloudSyncProfile.cs+++ b/Emby.Server.Implementations/Sync/CloudSyncProfile.cs@@ -68,7 +68,7 @@ namespace Emby.Server.Implementations.Sync},new ProfileCondition{- Condition = ProfileConditionType.EqualsAny,+ Condition = ProfileConditionType.Equals,Property = ProfileConditionValue.NumVideoStreams,Value = "1",IsRequired = false@@ -230,20 +230,6 @@ namespace Emby.Server.Implementations.SyncCodec = "aac,mp3",Conditions = new[]{- new ProfileCondition- {- Condition = ProfileConditionType.LessThanEqual,- Property = ProfileConditionValue.AudioChannels,- Value = "2",- IsRequired = true- },- new ProfileCondition- {- Condition = ProfileConditionType.LessThanEqual,- Property = ProfileConditionValue.AudioBitrate,- Value = "320000",- IsRequired = true- },new ProfileCondition{Condition = ProfileConditionType.Equals,diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.csindex e9e76a993e..1c11e6a3ca 100644--- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs+++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs@@ -124,6 +124,7 @@ namespace MediaBrowser.Model.Dlnaswitch (condition.Condition){case ProfileConditionType.Equals:+ case ProfileConditionType.EqualsAny:return currentValue.Value.Equals(expected);case ProfileConditionType.GreaterThanEqual:return currentValue.Value >= expected;@@ -132,7 +133,7 @@ namespace MediaBrowser.Model.Dlnacase ProfileConditionType.NotEquals:return !currentValue.Value.Equals(expected);default:- throw new InvalidOperationException("Unexpected ProfileConditionType");+ throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);}}@@ -160,7 +161,7 @@ namespace MediaBrowser.Model.Dlnacase ProfileConditionType.NotEquals:return !StringHelper.EqualsIgnoreCase(currentValue, expected);default:- throw new InvalidOperationException("Unexpected ProfileConditionType");+ throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);}}@@ -182,7 +183,7 @@ namespace MediaBrowser.Model.Dlnacase ProfileConditionType.NotEquals:return currentValue.Value != expected;default:- throw new InvalidOperationException("Unexpected ProfileConditionType");+ throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);}}@@ -211,7 +212,7 @@ namespace MediaBrowser.Model.Dlnacase ProfileConditionType.NotEquals:return !currentValue.Value.Equals(expected);default:- throw new InvalidOperationException("Unexpected ProfileConditionType");+ throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);}}@@ -240,7 +241,7 @@ namespace MediaBrowser.Model.Dlnacase ProfileConditionType.NotEquals:return !currentValue.Value.Equals(expected);default:- throw new InvalidOperationException("Unexpected ProfileConditionType");+ throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);}}@@ -264,7 +265,7 @@ namespace MediaBrowser.Model.Dlnacase ProfileConditionType.NotEquals:return timestamp != expected;default:- throw new InvalidOperationException("Unexpected ProfileConditionType");+ throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);}}}diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.csindex 6d68831ff7..cbbf434ff1 100644--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs@@ -410,8 +410,6 @@ namespace MediaBrowser.Model.DlnaaudioStreamIndex = audioStream.Index;}- var allMediaStreams = item.MediaStreams;-MediaStream videoStream = item.VideoStream;// TODO: This doesn't accout for situation of device being able to handle media bitrate, but wifi connection not fast enough@@ -427,7 +425,7 @@ namespace MediaBrowser.Model.Dlnaif (isEligibleForDirectPlay || isEligibleForDirectStream){// See if it can be direct played- PlayMethod? directPlay = GetVideoDirectPlayProfile(options, item, videoStream, audioStream, isEligibleForDirectPlay, isEligibleForDirectStream, allMediaStreams);+ PlayMethod? directPlay = GetVideoDirectPlayProfile(options, item, videoStream, audioStream, isEligibleForDirectPlay, isEligibleForDirectStream);if (directPlay != null){@@ -656,8 +654,7 @@ namespace MediaBrowser.Model.DlnaMediaStream videoStream,MediaStream audioStream,bool isEligibleForDirectPlay,- bool isEligibleForDirectStream,- List<MediaStream> allMediaStreams)+ bool isEligibleForDirectStream){DeviceProfile profile = options.Profile;