diff options
| author | Sven Van den brande <sven.vandenbrande@outlook.com> | 2016-03-27 23:11:27 +0200 |
|---|---|---|
| committer | Sven Van den brande <sven.vandenbrande@outlook.com> | 2016-03-27 23:11:27 +0200 |
| commit | 168587b2a0d1f495a9f85e05b1e518f615b0cfcc (patch) | |
| tree | e9675fc086678d780d0a86caa92181173bac9486 /MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs | |
| parent | e73b418f9da82df8fdb443978228e350b9fe1bf2 (diff) | |
Remove unused code...
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs b/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs index dfaedbc9d..46ddf3dd8 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs @@ -5,11 +5,9 @@ using MediaBrowser.Common.ScheduledTasks; using MediaBrowser.Common.Updates; using MediaBrowser.Controller; using MediaBrowser.Controller.Activity; -using MediaBrowser.Controller.Channels; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.Localization; using MediaBrowser.Controller.Plugins; using MediaBrowser.Controller.Session; @@ -206,7 +204,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints Name = name, Type = "SessionEnded", ShortOverview = string.Format(_localization.GetLocalizedString("LabelIpAddressValue"), session.RemoteEndPoint), - UserId = (session.UserId.HasValue ? session.UserId.Value.ToString("N") : null) + UserId = session.UserId.HasValue ? session.UserId.Value.ToString("N") : null }); } @@ -336,7 +334,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints Name = name, Type = "SessionStarted", ShortOverview = string.Format(_localization.GetLocalizedString("LabelIpAddressValue"), session.RemoteEndPoint), - UserId = (session.UserId.HasValue ? session.UserId.Value.ToString("N") : null) + UserId = session.UserId.HasValue ? session.UserId.Value.ToString("N") : null }); } @@ -518,16 +516,16 @@ namespace MediaBrowser.Server.Implementations.EntryPoints int days = span.Days; if (days >= DaysInYear) { - int years = (days / DaysInYear); + int years = days / DaysInYear; values.Add(CreateValueString(years, "year")); - days = (days % DaysInYear); + days = days % DaysInYear; } // Number of months if (days >= DaysInMonth) { - int months = (days / DaysInMonth); + int months = days / DaysInMonth; values.Add(CreateValueString(months, "month")); - days = (days % DaysInMonth); + days = days % DaysInMonth; } // Number of days if (days >= 1) @@ -547,7 +545,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints for (int i = 0; i < values.Count; i++) { if (builder.Length > 0) - builder.Append((i == (values.Count - 1)) ? " and " : ", "); + builder.Append(i == values.Count - 1 ? " and " : ", "); builder.Append(values[i]); } // Return result @@ -562,7 +560,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints private static string CreateValueString(int value, string description) { return String.Format("{0:#,##0} {1}", - value, (value == 1) ? description : String.Format("{0}s", description)); + value, value == 1 ? description : String.Format("{0}s", description)); } } } |
