add latest translations

This commit is contained in:
Luke Pulverenti
2014-04-02 17:55:19 -04:00
parent dcf2e70f03
commit 0200911afc
37 changed files with 333 additions and 114 deletions

View File

@@ -1,10 +1,9 @@
using System;
using System.Globalization;
using System.IO;
using System.Linq;
using MediaBrowser.Model.Dto;
using System.Collections.Generic;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
namespace MediaBrowser.Model.Dlna
{
@@ -453,19 +452,19 @@ namespace MediaBrowser.Model.Dlna
if (actualValue.HasValue)
{
long expected;
if (long.TryParse(condition.Value, NumberStyles.Any, _usCulture, out expected))
double expected;
if (double.TryParse(condition.Value, NumberStyles.Any, _usCulture, out expected))
{
switch (condition.Condition)
{
case ProfileConditionType.Equals:
return actualValue.Value == expected;
return actualValue.Value.Equals(expected);
case ProfileConditionType.GreaterThanEqual:
return actualValue.Value >= expected;
case ProfileConditionType.LessThanEqual:
return actualValue.Value <= expected;
case ProfileConditionType.NotEquals:
return actualValue.Value != expected;
return !actualValue.Value.Equals(expected);
default:
throw new InvalidOperationException("Unexpected ProfileConditionType");
}
@@ -486,7 +485,7 @@ namespace MediaBrowser.Model.Dlna
/// <param name="audioStream">The audio stream.</param>
/// <returns>System.Nullable{System.Int64}.</returns>
/// <exception cref="System.InvalidOperationException">Unexpected Property</exception>
private long? GetConditionValue(ProfileCondition condition, string mediaPath, MediaStream videoStream, MediaStream audioStream)
private double? GetConditionValue(ProfileCondition condition, string mediaPath, MediaStream videoStream, MediaStream audioStream)
{
switch (condition.Property)
{
@@ -497,37 +496,17 @@ namespace MediaBrowser.Model.Dlna
case ProfileConditionValue.VideoBitrate:
return videoStream == null ? null : videoStream.BitRate;
case ProfileConditionValue.VideoFramerate:
return videoStream == null ? null : (ConvertToLong(videoStream.AverageFrameRate ?? videoStream.RealFrameRate));
return videoStream == null ? null : (videoStream.AverageFrameRate ?? videoStream.RealFrameRate);
case ProfileConditionValue.Height:
return videoStream == null ? null : videoStream.Height;
case ProfileConditionValue.Width:
return videoStream == null ? null : videoStream.Width;
case ProfileConditionValue.VideoLevel:
return videoStream == null ? null : ConvertToLong(videoStream.Level);
return videoStream == null ? null : videoStream.Level;
default:
throw new InvalidOperationException("Unexpected Property");
}
}
/// <summary>
/// Converts to long.
/// </summary>
/// <param name="val">The value.</param>
/// <returns>System.Nullable{System.Int64}.</returns>
private long? ConvertToLong(float? val)
{
return val.HasValue ? Convert.ToInt64(val.Value) : (long?)null;
}
/// <summary>
/// Converts to long.
/// </summary>
/// <param name="val">The value.</param>
/// <returns>System.Nullable{System.Int64}.</returns>
private long? ConvertToLong(double? val)
{
return val.HasValue ? Convert.ToInt64(val.Value) : (long?)null;
}
}
}

View File

@@ -1,19 +1,17 @@

using System.Collections.Generic;
namespace MediaBrowser.Model.Session
{
public class SessionCapabilities
{
public string[] PlayableMediaTypes { get; set; }
public List<string> PlayableMediaTypes { get; set; }
public bool SupportsFullscreenToggle { get; set; }
public List<string> SupportedCommands { get; set; }
public bool SupportsOsdToggle { get; set; }
public bool SupportsNavigationControl { get; set; }
public SessionCapabilities()
{
PlayableMediaTypes = new string[] {};
PlayableMediaTypes = new List<string>();
SupportedCommands = new List<string>();
}
}
}

View File

@@ -15,6 +15,12 @@ namespace MediaBrowser.Model.Session
/// <value><c>true</c> if this instance can seek; otherwise, <c>false</c>.</value>
public bool CanSeek { get; set; }
/// <summary>
/// Gets or sets the supported commands.
/// </summary>
/// <value>The supported commands.</value>
public List<string> SupportedCommands { get; set; }
/// <summary>
/// Gets or sets the remote end point.
/// </summary>
@@ -167,6 +173,7 @@ namespace MediaBrowser.Model.Session
PlayableMediaTypes = new List<string>();
QueueableMediaTypes = new List<string>();
SupportedCommands = new List<string>();
}
}