diff --git a/ApiClient.js b/ApiClient.js index 8b602610a0..3117b4b006 100644 --- a/ApiClient.js +++ b/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); }; /** diff --git a/dashboard-ui/scripts/dashboardpage.js b/dashboard-ui/scripts/dashboardpage.js index 8a17becdec..4abae6da46 100644 --- a/dashboard-ui/scripts/dashboardpage.js +++ b/dashboard-ui/scripts/dashboardpage.js @@ -94,7 +94,9 @@ html += ''; html += ''; - html += connection.DeviceName; + html += '
' + connection.Client + '
'; + html += '
' + connection.ApplicationVersion + '
'; + html += '
' + connection.DeviceName + '
'; html += ''; html += ''; @@ -291,7 +293,7 @@ } $('#programDataPath', page).html(dashboardInfo.SystemInfo.ProgramDataPath); - + var host = ApiClient.serverHostName(); var url = "http://" + host + ":" + port + "/mediabrowser"; diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 67397a1e83..f790093b20 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1048,7 +1048,7 @@ var Dashboard = { }; -var ApiClient = MediaBrowser.ApiClient.create("Dashboard"); +var ApiClient = MediaBrowser.ApiClient.create("Dashboard", window.dashboardVersion); $(function () { diff --git a/packages.config b/packages.config index a1b6ec005d..bb1b35f247 100644 --- a/packages.config +++ b/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file