add http server port number to system info

This commit is contained in:
Luke Pulverenti 2013-09-07 11:58:47 -04:00
parent a721a6b7af
commit 6beb7121a9
3 changed files with 10 additions and 15 deletions

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);

View File

@ -315,7 +315,7 @@
$('#appVersionNumber', page).html(dashboardInfo.SystemInfo.Version);
var port = ApiClient.serverPortNumber();
var port = dashboardInfo.SystemInfo.HttpServerPortNumber;
if (port == dashboardInfo.SystemInfo.WebSocketPortNumber) {
$('#ports', page).html('Running on port <b>' + port + '</b>');

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>