diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-07-09 12:11:16 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-07-09 12:11:16 -0400 |
| commit | 66624293ac2208020d25456801664d10ddd2450a (patch) | |
| tree | a8369c3cfc2a75e7cd7ffdd0d06080c1b5c530d8 /MediaBrowser.Api/BaseApiService.cs | |
| parent | 48265fefa445d2b9e62c4f050fca3da783e6123f (diff) | |
Display client version in the dashboard
Diffstat (limited to 'MediaBrowser.Api/BaseApiService.cs')
| -rw-r--r-- | MediaBrowser.Api/BaseApiService.cs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/MediaBrowser.Api/BaseApiService.cs b/MediaBrowser.Api/BaseApiService.cs index 193a23b3e..06e9c80e8 100644 --- a/MediaBrowser.Api/BaseApiService.cs +++ b/MediaBrowser.Api/BaseApiService.cs @@ -286,13 +286,21 @@ namespace MediaBrowser.Api } } - var deviceId = auth["DeviceId"]; - var device = auth["Device"]; - var client = auth["Client"]; + string deviceId; + string device; + string client; + string version; - if (!string.IsNullOrEmpty(client) && !string.IsNullOrEmpty(deviceId) && !string.IsNullOrEmpty(device)) + auth.TryGetValue("DeviceId", out deviceId); + auth.TryGetValue("Device", out device); + auth.TryGetValue("Client", out client); + auth.TryGetValue("Version", out version); + + version = version ?? "0.0.0.0"; + + if (!string.IsNullOrEmpty(client) && !string.IsNullOrEmpty(deviceId) && !string.IsNullOrEmpty(device) && !string.IsNullOrEmpty(version)) { - SessionManager.LogConnectionActivity(client, deviceId, device, user); + SessionManager.LogConnectionActivity(client, version, deviceId, device, user); } } } |
