diff options
| author | Tthecreator <epostvanthomas@kpnmail.nl> | 2019-01-22 15:22:42 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-22 15:22:42 +0000 |
| commit | 189b99df16bd4c93cc96422d7282d01d9ff5b82f (patch) | |
| tree | 26d7da95fe3e3b2772b8b39a2463a6c0ac7652fc /MediaBrowser.Model/Dlna/ConditionProcessor.cs | |
| parent | a00c0defa8cb22774f5dc8a7d566eb36ac7307e8 (diff) | |
| parent | edcfd8b565f632088c8b1f826db8e2fbecf9790d (diff) | |
Merge pull request #1 from jellyfin/dev
Update from jellyfin repo
Diffstat (limited to 'MediaBrowser.Model/Dlna/ConditionProcessor.cs')
| -rw-r--r-- | MediaBrowser.Model/Dlna/ConditionProcessor.cs | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs index 5bcee6de2..dc0c5f139 100644 --- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs +++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs @@ -1,8 +1,7 @@ -using MediaBrowser.Model.Extensions; -using MediaBrowser.Model.MediaInfo; using System; -using System.Collections.Generic; using System.Globalization; +using MediaBrowser.Model.Extensions; +using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Model.Dlna { @@ -24,7 +23,7 @@ namespace MediaBrowser.Model.Dlna int? numVideoStreams, int? numAudioStreams, string videoCodecTag, - bool? isAvc ) + bool? isAvc) { switch (condition.Property) { @@ -130,8 +129,7 @@ namespace MediaBrowser.Model.Dlna return !condition.IsRequired; } - int expected; - if (int.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out expected)) + if (int.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out var expected)) { switch (condition.Condition) { @@ -185,8 +183,7 @@ namespace MediaBrowser.Model.Dlna return !condition.IsRequired; } - bool expected; - if (bool.TryParse(condition.Value, out expected)) + if (bool.TryParse(condition.Value, out var expected)) { switch (condition.Condition) { @@ -210,8 +207,7 @@ namespace MediaBrowser.Model.Dlna return !condition.IsRequired; } - float expected; - if (float.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out expected)) + if (float.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out var expected)) { switch (condition.Condition) { @@ -239,8 +235,7 @@ namespace MediaBrowser.Model.Dlna return !condition.IsRequired; } - double expected; - if (double.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out expected)) + if (double.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out var expected)) { switch (condition.Condition) { @@ -268,7 +263,7 @@ namespace MediaBrowser.Model.Dlna return !condition.IsRequired; } - TransportStreamTimestamp expected = (TransportStreamTimestamp)Enum.Parse(typeof(TransportStreamTimestamp), condition.Value, true); + var expected = (TransportStreamTimestamp)Enum.Parse(typeof(TransportStreamTimestamp), condition.Value, true); switch (condition.Condition) { |
