1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Display client version in the dashboard

This commit is contained in:
Luke Pulverenti 2013-07-09 12:11:16 -04:00
parent 04142091d9
commit 1200f8284d
4 changed files with 11 additions and 8 deletions

View file

@ -10,8 +10,9 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
* @param {String} serverHostName
* @param {String} serverPortNumber
* @param {String} clientName
* @param {String} applicationVersion
*/
return function (serverProtocol, serverHostName, serverPortNumber, clientName) {
return function (serverProtocol, serverHostName, serverPortNumber, clientName, applicationVersion) {
if (!serverProtocol) {
throw new Error("Must supply a serverProtocol, e.g. http:");
@ -120,7 +121,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
if (clientName) {
var auth = 'MediaBrowser Client="' + clientName + '", Device="' + deviceName + '", DeviceId="' + deviceId + '"';
var auth = 'MediaBrowser Client="' + clientName + '", Device="' + deviceName + '", DeviceId="' + deviceId + '", Version="' + applicationVersion + '"';
if (currentUserId) {
auth += ', UserId="' + currentUserId + '"';
@ -3277,11 +3278,11 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
/**
* Provides a friendly way to create an api client instance using information from the browser's current url
*/
MediaBrowser.ApiClient.create = function (clientName) {
MediaBrowser.ApiClient.create = function (clientName, applicationVersion) {
var loc = window.location;
return new MediaBrowser.ApiClient(loc.protocol, loc.hostname, loc.port, clientName);
return new MediaBrowser.ApiClient(loc.protocol, loc.hostname, loc.port, clientName, applicationVersion);
};
/**