mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
add http server port number to system info
This commit is contained in:
parent
a721a6b7af
commit
6beb7121a9
19
ApiClient.js
19
ApiClient.js
@ -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);
|
||||
|
@ -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>');
|
||||
|
@ -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>
|
Loading…
Reference in New Issue
Block a user