update xbox one profile
This commit is contained in:
parent
63dc2512c5
commit
55461b7605
|
@ -1086,6 +1086,10 @@ namespace MediaBrowser.Api.Playback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (ObjectDisposedException)
|
||||||
|
{
|
||||||
|
// Don't spam the log. This doesn't seem to throw in windows, but sometimes under linux
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Logger.ErrorException("Error reading ffmpeg log", ex);
|
Logger.ErrorException("Error reading ffmpeg log", ex);
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace MediaBrowser.Dlna.Profiles
|
||||||
|
|
||||||
Identification = new DeviceIdentification
|
Identification = new DeviceIdentification
|
||||||
{
|
{
|
||||||
FriendlyName = "XboxOne",
|
ModelName = "Xbox One",
|
||||||
|
|
||||||
Headers = new[]
|
Headers = new[]
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
<Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
<Name>Xbox One</Name>
|
<Name>Xbox One</Name>
|
||||||
<Identification>
|
<Identification>
|
||||||
<FriendlyName>XboxOne</FriendlyName>
|
<ModelName>Xbox One</ModelName>
|
||||||
<Headers>
|
<Headers>
|
||||||
<HttpHeaderInfo name="FriendlyName.DLNA.ORG" value="XboxOne" match="Substring" />
|
<HttpHeaderInfo name="FriendlyName.DLNA.ORG" value="XboxOne" match="Substring" />
|
||||||
<HttpHeaderInfo name="User-Agent" value="NSPlayer/12" match="Substring" />
|
<HttpHeaderInfo name="User-Agent" value="NSPlayer/12" match="Substring" />
|
||||||
|
|
|
@ -29,32 +29,43 @@ namespace MediaBrowser.Dlna.Ssdp
|
||||||
public void Send()
|
public void Send()
|
||||||
{
|
{
|
||||||
var msg = Encoding.ASCII.GetBytes(Message);
|
var msg = Encoding.ASCII.GetBytes(Message);
|
||||||
try
|
|
||||||
{
|
|
||||||
var client = CreateSocket();
|
|
||||||
|
|
||||||
if (FromEndPoint != null)
|
var socket = CreateSocket();
|
||||||
|
|
||||||
|
if (socket == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FromEndPoint != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
try
|
socket.Bind(FromEndPoint);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
if (EnableDebugLogging)
|
||||||
{
|
{
|
||||||
client.Bind(FromEndPoint);
|
_logger.ErrorException("Error binding datagram socket", ex);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
|
||||||
|
if (!IgnoreBindFailure)
|
||||||
{
|
{
|
||||||
if (EnableDebugLogging)
|
CloseSocket(socket, false);
|
||||||
{
|
|
||||||
_logger.ErrorException("Error binding datagram socket", ex);
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (!IgnoreBindFailure) throw;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
client.BeginSendTo(msg, 0, msg.Length, SocketFlags.None, ToEndPoint, result =>
|
try
|
||||||
|
{
|
||||||
|
socket.BeginSendTo(msg, 0, msg.Length, SocketFlags.None, ToEndPoint, result =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
client.EndSend(result);
|
socket.EndSend(result);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -65,32 +76,46 @@ namespace MediaBrowser.Dlna.Ssdp
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
try
|
CloseSocket(socket, true);
|
||||||
{
|
|
||||||
client.Close();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
if (EnableDebugLogging)
|
|
||||||
{
|
|
||||||
_logger.ErrorException("Error closing datagram socket", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}, null);
|
}, null);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.ErrorException("Error sending Datagram to {0} from {1}: " + Message, ex, ToEndPoint, FromEndPoint == null ? "" : FromEndPoint.ToString());
|
_logger.ErrorException("Error sending Datagram to {0} from {1}: " + Message, ex, ToEndPoint, FromEndPoint == null ? "" : FromEndPoint.ToString());
|
||||||
|
CloseSocket(socket, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CloseSocket(Socket socket, bool logError)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
socket.Close();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
if (logError && EnableDebugLogging)
|
||||||
|
{
|
||||||
|
_logger.ErrorException("Error closing datagram socket", ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Socket CreateSocket()
|
private Socket CreateSocket()
|
||||||
{
|
{
|
||||||
var socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
|
try
|
||||||
|
{
|
||||||
|
var socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
|
||||||
|
|
||||||
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
|
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
|
||||||
return socket;
|
return socket;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.ErrorException("Error creating socket", ex);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -281,7 +281,7 @@ namespace MediaBrowser.WebDashboard.Api
|
||||||
|
|
||||||
await AppendResource(memoryStream, "thirdparty/jstree3.0.8/jstree.js", newLineBytes).ConfigureAwait(false);
|
await AppendResource(memoryStream, "thirdparty/jstree3.0.8/jstree.js", newLineBytes).ConfigureAwait(false);
|
||||||
|
|
||||||
await AppendResource(memoryStream, "thirdparty/fastclick.js", newLineBytes).ConfigureAwait(false);
|
//await AppendResource(memoryStream, "thirdparty/fastclick.js", newLineBytes).ConfigureAwait(false);
|
||||||
await AppendResource(memoryStream, "thirdparty/headroom.js", newLineBytes).ConfigureAwait(false);
|
await AppendResource(memoryStream, "thirdparty/headroom.js", newLineBytes).ConfigureAwait(false);
|
||||||
|
|
||||||
await AppendLocalization(memoryStream, culture).ConfigureAwait(false);
|
await AppendLocalization(memoryStream, culture).ConfigureAwait(false);
|
||||||
|
|
|
@ -363,9 +363,6 @@
|
||||||
<Content Include="dashboard-ui\css\images\icons\volumeup.png">
|
<Content Include="dashboard-ui\css\images\icons\volumeup.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="dashboard-ui\css\images\icons\wireless.png">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="dashboard-ui\css\images\items\detail\tv.png">
|
<Content Include="dashboard-ui\css\images\items\detail\tv.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user