aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.WebDashboard/ApiClient.js
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.WebDashboard/ApiClient.js')
-rw-r--r--MediaBrowser.WebDashboard/ApiClient.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js
index 8b602610a..3117b4b00 100644
--- a/MediaBrowser.WebDashboard/ApiClient.js
+++ b/MediaBrowser.WebDashboard/ApiClient.js
@@ -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);
};
/**