From 8985fb8d58c9b968b8e773276d7c3902aa4d55f3 Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Mon, 28 Jan 2019 18:49:25 +0100 Subject: Remove support for games as a media type --- .../Sorting/GameSystemComparer.cs | 51 ---------------------- .../Sorting/PlayersComparer.cs | 43 ------------------ 2 files changed, 94 deletions(-) delete mode 100644 Emby.Server.Implementations/Sorting/GameSystemComparer.cs delete mode 100644 Emby.Server.Implementations/Sorting/PlayersComparer.cs (limited to 'Emby.Server.Implementations/Sorting') diff --git a/Emby.Server.Implementations/Sorting/GameSystemComparer.cs b/Emby.Server.Implementations/Sorting/GameSystemComparer.cs deleted file mode 100644 index 2a04bae3c..000000000 --- a/Emby.Server.Implementations/Sorting/GameSystemComparer.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Sorting; -using MediaBrowser.Model.Querying; - -namespace Emby.Server.Implementations.Sorting -{ - public class GameSystemComparer : IBaseItemComparer - { - /// - /// Compares the specified x. - /// - /// The x. - /// The y. - /// System.Int32. - public int Compare(BaseItem x, BaseItem y) - { - return string.Compare(GetValue(x), GetValue(y), StringComparison.CurrentCultureIgnoreCase); - } - - /// - /// Gets the value. - /// - /// The x. - /// System.String. - private static string GetValue(BaseItem x) - { - var game = x as Game; - - if (game != null) - { - return game.GameSystem; - } - - var system = x as GameSystem; - - if (system != null) - { - return system.GameSystemName; - } - - return string.Empty; - } - - /// - /// Gets the name. - /// - /// The name. - public string Name => ItemSortBy.GameSystem; - } -} diff --git a/Emby.Server.Implementations/Sorting/PlayersComparer.cs b/Emby.Server.Implementations/Sorting/PlayersComparer.cs deleted file mode 100644 index e3652f36b..000000000 --- a/Emby.Server.Implementations/Sorting/PlayersComparer.cs +++ /dev/null @@ -1,43 +0,0 @@ -using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Sorting; -using MediaBrowser.Model.Querying; - -namespace Emby.Server.Implementations.Sorting -{ - public class PlayersComparer : IBaseItemComparer - { - /// - /// Compares the specified x. - /// - /// The x. - /// The y. - /// System.Int32. - public int Compare(BaseItem x, BaseItem y) - { - return GetValue(x).CompareTo(GetValue(y)); - } - - /// - /// Gets the value. - /// - /// The x. - /// System.String. - private static int GetValue(BaseItem x) - { - var game = x as Game; - - if (game != null) - { - return game.PlayersSupported ?? 0; - } - - return 0; - } - - /// - /// Gets the name. - /// - /// The name. - public string Name => ItemSortBy.Players; - } -} -- cgit v1.2.3