From 29ba865ab8f42567f011d593aa0d45ace4431fb9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 28 May 2014 10:30:55 -0400 Subject: switch to device name --- .../EntryPoints/UsageEntryPoint.cs | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'MediaBrowser.Server.Implementations/EntryPoints') diff --git a/MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs b/MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs index 98b9b2ae91..af3fde34b4 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs @@ -46,24 +46,17 @@ namespace MediaBrowser.Server.Implementations.EntryPoints if (!string.IsNullOrEmpty(session.Client) && !string.IsNullOrEmpty(session.DeviceName) && - !string.IsNullOrEmpty(session.DeviceId)) + !string.IsNullOrEmpty(session.DeviceId) && + !string.IsNullOrEmpty(session.ApplicationVersion)) { var keys = new List { session.Client, session.DeviceName, - session.DeviceId + session.DeviceId, + session.ApplicationVersion }; - if (!string.IsNullOrEmpty(session.DeviceVersion)) - { - keys.Add(session.DeviceVersion); - } - else - { - keys.Add(DefaultDeviceVersion); - } - var key = string.Join("_", keys.ToArray()).GetMD5(); _apps.GetOrAdd(key, guid => GetNewClientInfo(session)); @@ -90,15 +83,10 @@ namespace MediaBrowser.Server.Implementations.EntryPoints { AppName = session.Client, AppVersion = session.ApplicationVersion, - DeviceVersion = session.DeviceVersion, + DeviceName = session.DeviceName, DeviceId = session.DeviceId }; - if (string.IsNullOrEmpty(info.DeviceVersion)) - { - info.DeviceVersion = DefaultDeviceVersion; - } - // Report usage to remote server, except for web client, since we already have data on that if (!string.Equals(info.AppName, "Dashboard", StringComparison.OrdinalIgnoreCase)) { -- cgit v1.2.3