diff --git a/MediaBrowser.Api/UserLibrary/GameGenresService.cs b/MediaBrowser.Api/UserLibrary/GameGenresService.cs index 813407e55f..792cdb8540 100644 --- a/MediaBrowser.Api/UserLibrary/GameGenresService.cs +++ b/MediaBrowser.Api/UserLibrary/GameGenresService.cs @@ -1,9 +1,9 @@ using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Persistence; using MediaBrowser.Model.Dto; +using MediaBrowser.Model.Entities; using MediaBrowser.Model.Querying; using ServiceStack.ServiceHost; using System; @@ -19,7 +19,7 @@ namespace MediaBrowser.Api.UserLibrary { public GetGameGenres() { - IncludeItemTypes = typeof(Audio).Name; + MediaTypes = MediaType.Game; } } diff --git a/MediaBrowser.Providers/Savers/GameXmlSaver.cs b/MediaBrowser.Providers/Savers/GameXmlSaver.cs index e0640df4f1..eb17658eee 100644 --- a/MediaBrowser.Providers/Savers/GameXmlSaver.cs +++ b/MediaBrowser.Providers/Savers/GameXmlSaver.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Controller.Configuration; +using System.Security; +using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Providers.Movies; @@ -56,14 +57,28 @@ namespace MediaBrowser.Providers.Savers builder.Append(""); + var game = (Game)item; + + if (game.PlayersSupported.HasValue) + { + builder.Append("" + SecurityElement.Escape(game.PlayersSupported.Value.ToString(UsCulture)) + ""); + } + + if (!string.IsNullOrEmpty(game.GameSystem)) + { + builder.Append(""); + } + XmlSaverHelpers.AddCommonNodes(item, builder); builder.Append(""); var xmlFilePath = GetSavePath(item); - XmlSaverHelpers.Save(builder, xmlFilePath, new string[] + XmlSaverHelpers.Save(builder, xmlFilePath, new[] { + "Players", + "GameSystem" }); // Set last refreshed so that the provider doesn't trigger after the file save