This commit is contained in:
ScottIsAFool 2013-09-08 08:41:50 +01:00
commit 802ec3153d
9 changed files with 33 additions and 20 deletions

View File

@ -66,7 +66,7 @@ namespace MediaBrowser.Api.Playback
{
using (var remoteStream = await _msg.Content.ReadAsStreamAsync().ConfigureAwait(false))
{
await remoteStream.CopyToAsync(responseStream, 8192000).ConfigureAwait(false);
await remoteStream.CopyToAsync(responseStream, 819200).ConfigureAwait(false);
}
}
}

View File

@ -67,12 +67,15 @@ namespace MediaBrowser.Model.Querying
/// <value>The sort by.</value>
public string[] SortBy { get; set; }
public ImageType[] ImageTypes { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="ItemsByNameQuery"/> class.
/// </summary>
public ItemsByNameQuery()
{
Fields = new ItemFields[] {};
ImageTypes = new ImageType[] { };
Fields = new ItemFields[] { };
Recursive = true;
MediaTypes = new string[] { };
SortBy = new string[] { };

View File

@ -1,4 +1,5 @@

using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.Querying
{
/// <summary>

View File

@ -72,7 +72,13 @@ namespace MediaBrowser.Model.System
/// </summary>
/// <value>The program data path.</value>
public string ProgramDataPath { get; set; }
/// <summary>
/// Gets or sets the HTTP server port number.
/// </summary>
/// <value>The HTTP server port number.</value>
public int HttpServerPortNumber { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="SystemInfo"/> class.
/// </summary>

View File

@ -219,7 +219,7 @@ namespace MediaBrowser.Server.Implementations.Providers
}
catch (Exception ex)
{
_logger.ErrorException("{0} failed refreshing {1}", ex, provider.GetType().Name, item.Name);
_logger.ErrorException("{0} failed refreshing {1} {2}", ex, provider.GetType().Name, item.Name, item.Path ?? string.Empty);
provider.SetLastRefreshed(item, DateTime.UtcNow, ProviderRefreshStatus.Failure);

View File

@ -132,10 +132,17 @@ namespace MediaBrowser.Server.Implementations.ServerManager
{
LastActivityDate = DateTime.UtcNow;
if (!message.StartsWith("{", StringComparison.OrdinalIgnoreCase))
{
_logger.Error("Received web socket message that is not a json structure: " + message);
return;
}
if (OnReceive == null)
{
return;
}
try
{
var stub = (WebSocketMessage<object>)_jsonSerializer.DeserializeFromString(message, typeof(WebSocketMessage<object>));

View File

@ -607,7 +607,8 @@ namespace MediaBrowser.ServerApplication
CompletedInstallations = InstallationManager.CompletedInstallations.ToArray(),
Id = _systemId,
ProgramDataPath = ApplicationPaths.ProgramDataPath,
MacAddress = GetMacAddress()
MacAddress = GetMacAddress(),
HttpServerPortNumber = ServerConfigurationManager.Configuration.HttpServerPortNumber
};
}

View File

@ -20,9 +20,6 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
if (!serverHostName) {
throw new Error("Must supply serverHostName, e.g. 192.168.1.1 or myServerName");
}
if (!serverPortNumber) {
throw new Error("Must supply a serverPortNumber");
}
var self = this;
var deviceName = "Web Browser";
@ -38,14 +35,6 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
return serverHostName;
};
/**
* Gets the server port number.
*/
self.serverPortNumber = function () {
return serverPortNumber;
};
/**
* Gets or sets the current user id.
*/
@ -152,7 +141,13 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
throw new Error("Url name cannot be empty");
}
var url = serverProtocol + "//" + serverHostName + ":" + serverPortNumber + "/mediabrowser/" + name;
var url = serverProtocol + "//" + serverHostName;
if (serverPortNumber) {
url += ":" + serverPortNumber;
}
url += "/mediabrowser/" + name;
if (params) {
url += "?" + $.param(params);
@ -3384,7 +3379,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
var deferred = $.Deferred();
var msgData = itemId + "|" + (positionTicks == null ? "" : positionTicks) + "|" + (isPaused == null ? "" : isPaused) + "|" + (isMuted == null ? "" : isMuted);
var msgData = itemId + "|" + (positionTicks == null ? "" : positionTicks) + "|" + (isPaused == null ? "" : isPaused) + "|" + (isMuted == null ? "" : isMuted);
self.sendWebSocketMessage("PlaybackProgress", msgData);

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.170" targetFramework="net45" />
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.171" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.58" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.58" targetFramework="net45" />
</packages>