The Free Software Media System - Server Backend & API
Made BaseJsonHandler strongly typed. Moved DTO entities to their own DTO namespace in Model.
LukePulverenti Luke Pulverenti luke pulverenti5c094afd7e79
diff --git a/MediaBrowser.Api/ApiService.cs b/MediaBrowser.Api/ApiService.csindex 7c52e0e5c6..e4a7f71bf5 100644--- a/MediaBrowser.Api/ApiService.cs+++ b/MediaBrowser.Api/ApiService.cs@@ -4,6 +4,7 @@ using System.Linq;using System.Reflection;using MediaBrowser.Common.Configuration;using MediaBrowser.Controller;+using MediaBrowser.Model.DTO;using MediaBrowser.Model.Entities;namespace MediaBrowser.Api@@ -23,9 +24,9 @@ namespace MediaBrowser.Api/// <summary>/// Takes a BaseItem and returns the actual object that will be serialized by the api/// </summary>- public static ApiBaseItemWrapper<BaseItem> GetSerializationObject(BaseItem item, bool includeChildren, Guid userId)+ public static BaseItemWrapper<BaseItem> GetSerializationObject(BaseItem item, bool includeChildren, Guid userId){- ApiBaseItemWrapper<BaseItem> wrapper = new ApiBaseItemWrapper<BaseItem>()+ BaseItemWrapper<BaseItem> wrapper = new BaseItemWrapper<BaseItem>(){Item = item,UserItemData = Kernel.Instance.GetUserItemData(userId, item.Id),diff --git a/MediaBrowser.Api/HttpHandlers/GenresHandler.cs b/MediaBrowser.Api/HttpHandlers/GenresHandler.csindex 0c38a23962..c3292d3633 100644--- a/MediaBrowser.Api/HttpHandlers/GenresHandler.cs+++ b/MediaBrowser.Api/HttpHandlers/GenresHandler.cs@@ -1,13 +1,15 @@using System;+using System.Collections.Generic;using MediaBrowser.Common.Net.Handlers;using MediaBrowser.Controller;+using MediaBrowser.Model.DTO;using MediaBrowser.Model.Entities;namespace MediaBrowser.Api.HttpHandlers{- public class GenresHandler : BaseJsonHandler+ public class GenresHandler : BaseJsonHandler<IEnumerable<CategoryInfo<Genre>>>{- protected override object GetObjectToSerialize()+ protected override IEnumerable<CategoryInfo<Genre>> GetObjectToSerialize(){Folder parent = ApiService.GetItemById(QueryString["id"]) as Folder;Guid userId = Guid.Parse(QueryString["userid"]);diff --git a/MediaBrowser.Api/HttpHandlers/ItemHandler.cs b/MediaBrowser.Api/HttpHandlers/ItemHandler.csindex 28def271f8..efb67db54e 100644--- a/MediaBrowser.Api/HttpHandlers/ItemHandler.cs+++ b/MediaBrowser.Api/HttpHandlers/ItemHandler.cs@@ -1,12 +1,13 @@using System;using MediaBrowser.Common.Net.Handlers;+using MediaBrowser.Model.DTO;using MediaBrowser.Model.Entities;namespace MediaBrowser.Api.HttpHandlers{- public class ItemHandler : BaseJsonHandler+ public class ItemHandler : BaseJsonHandler<BaseItemWrapper<BaseItem>>{- protected sealed override object GetObjectToSerialize()+ protected sealed override BaseItemWrapper<BaseItem> GetObjectToSerialize(){Guid userId = Guid.Parse(QueryString["userid"]);diff --git a/MediaBrowser.Api/HttpHandlers/ItemListHandler.cs b/MediaBrowser.Api/HttpHandlers/ItemListHandler.csindex 0d9d3d0a89..6e08561b23 100644--- a/MediaBrowser.Api/HttpHandlers/ItemListHandler.cs+++ b/MediaBrowser.Api/HttpHandlers/ItemListHandler.cs@@ -2,13 +2,14 @@using System.Collections.Generic;using System.Linq;using MediaBrowser.Common.Net.Handlers;+using MediaBrowser.Model.DTO;using MediaBrowser.Model.Entities;namespace MediaBrowser.Api.HttpHandlers{- public abstract class ItemListHandler : BaseJsonHandler+ public abstract class ItemListHandler : BaseJsonHandler<IEnumerable<BaseItemWrapper<BaseItem>>>{- protected override object GetObjectToSerialize()+ protected override IEnumerable<BaseItemWrapper<BaseItem>> GetObjectToSerialize(){return ItemsToSerialize.Select(i =>{diff --git a/MediaBrowser.Api/HttpHandlers/PersonHandler.cs b/MediaBrowser.Api/HttpHandlers/PersonHandler.csindex 103e49cd2d..513840b81e 100644--- a/MediaBrowser.Api/HttpHandlers/PersonHandler.cs+++ b/MediaBrowser.Api/HttpHandlers/PersonHandler.cs@@ -1,11 +1,12 @@using MediaBrowser.Common.Net.Handlers;using MediaBrowser.Controller;+using MediaBrowser.Model.Entities;namespace MediaBrowser.Api.HttpHandlers{- public class PersonHandler : BaseJsonHandler+ public class PersonHandler : BaseJsonHandler<Person>{- protected override object GetObjectToSerialize()+ protected override Person GetObjectToSerialize(){return Kernel.Instance.ItemController.GetPerson(QueryString["name"]);}diff --git a/MediaBrowser.Api/HttpHandlers/PluginConfigurationHandler.cs b/MediaBrowser.Api/HttpHandlers/PluginConfigurationHandler.csindex 4dc317ecc1..0e19aecd5c 100644--- a/MediaBrowser.Api/HttpHandlers/PluginConfigurationHandler.cs+++ b/MediaBrowser.Api/HttpHandlers/PluginConfigurationHandler.cs@@ -2,12 +2,13 @@using System.Linq;using MediaBrowser.Common.Net.Handlers;using MediaBrowser.Controller;+using MediaBrowser.Model.Plugins;namespace MediaBrowser.Api.HttpHandlers{- public class PluginConfigurationHandler : BaseJsonHandler+ public class PluginConfigurationHandler : BaseJsonHandler<BasePluginConfiguration>{- protected override object GetObjectToSerialize()+ protected override BasePluginConfiguration GetObjectToSerialize(){string pluginName = QueryString["name"];diff --git a/MediaBrowser.Api/HttpHandlers/PluginsHandler.cs b/MediaBrowser.Api/HttpHandlers/PluginsHandler.csindex a44e126921..c3c1b40493 100644--- a/MediaBrowser.Api/HttpHandlers/PluginsHandler.cs+++ b/MediaBrowser.Api/HttpHandlers/PluginsHandler.cs@@ -1,16 +1,17 @@-using System.Linq;+using System.Collections.Generic;+using System.Linq;using MediaBrowser.Common.Net.Handlers;using MediaBrowser.Controller;-using MediaBrowser.Model.Plugins;+using MediaBrowser.Model.DTO;namespace MediaBrowser.Api.HttpHandlers{/// <summary>/// Provides information about installed plugins/// </summary>- public class PluginsHandler : BaseJsonHandler+ public class PluginsHandler : BaseJsonHandler<IEnumerable<PluginInfo>>{- protected override object GetObjectToSerialize()+ protected override IEnumerable<PluginInfo> GetObjectToSerialize(){var plugins = Kernel.Instance.Plugins.Select(p =>{diff --git a/MediaBrowser.Api/HttpHandlers/StudiosHandler.cs b/MediaBrowser.Api/HttpHandlers/StudiosHandler.csindex a381af15fe..b1be2cad2a 100644--- a/MediaBrowser.Api/HttpHandlers/StudiosHandler.cs+++ b/MediaBrowser.Api/HttpHandlers/StudiosHandler.cs@@ -1,17 +1,19 @@using System;+using System.Collections.Generic;using MediaBrowser.Common.Net.Handlers;using MediaBrowser.Controller;+using MediaBrowser.Model.DTO;using MediaBrowser.Model.Entities;namespace MediaBrowser.Api.HttpHandlers{- public class StudiosHandler : BaseJsonHandler+ public class StudiosHandler : BaseJsonHandler<IEnumerable<CategoryInfo<Studio>>>{- protected override object GetObjectToSerialize()+ protected override IEnumerable<CategoryInfo<Studio>> GetObjectToSerialize(){Folder parent = ApiService.GetItemById(QueryString["id"]) as Folder;Guid userId = Guid.Parse(QueryString["userid"]);-+return Kernel.Instance.GetAllStudios(parent, userId);}}diff --git a/MediaBrowser.Api/HttpHandlers/UserConfigurationHandler.cs b/MediaBrowser.Api/HttpHandlers/UserConfigurationHandler.csindex f9d3536b6d..12e80f3060 100644--- a/MediaBrowser.Api/HttpHandlers/UserConfigurationHandler.cs+++ b/MediaBrowser.Api/HttpHandlers/UserConfigurationHandler.cs@@ -1,12 +1,13 @@using System;using MediaBrowser.Common.Net.Handlers;using MediaBrowser.Controller;+using MediaBrowser.Model.Configuration;namespace MediaBrowser.Api.HttpHandlers{- public class UserConfigurationHandler : BaseJsonHandler+ public class UserConfigurationHandler : BaseJsonHandler<UserConfiguration>{- protected override object GetObjectToSerialize()+ protected override UserConfiguration GetObjectToSerialize(){Guid userId = Guid.Parse(QueryString["userid"]);diff --git a/MediaBrowser.Api/HttpHandlers/UsersHandler.cs b/MediaBrowser.Api/HttpHandlers/UsersHandler.csindex 64f68f62f1..64239005fc 100644--- a/MediaBrowser.Api/HttpHandlers/UsersHandler.cs+++ b/MediaBrowser.Api/HttpHandlers/UsersHandler.cs@@ -1,11 +1,13 @@-using MediaBrowser.Common.Net.Handlers;+using System.Collections.Generic;+using MediaBrowser.Common.Net.Handlers;using MediaBrowser.Controller;+using MediaBrowser.Model.Users;namespace MediaBrowser.Api.HttpHandlers{- class UsersHandler : BaseJsonHandler+ class UsersHandler : BaseJsonHandler<IEnumerable<User>>{- protected override object GetObjectToSerialize()+ protected override IEnumerable<User> GetObjectToSerialize(){return Kernel.Instance.Users;}diff --git a/MediaBrowser.Api/HttpHandlers/VideoHandler.cs b/MediaBrowser.Api/HttpHandlers/VideoHandler.csindex 7fe82ef0c6..343fcc70bd 100644--- a/MediaBrowser.Api/HttpHandlers/VideoHandler.cs+++ b/MediaBrowser.Api/HttpHandlers/VideoHandler.cs@@ -1,10 +1,10 @@using System;using System.Collections.Generic;+using System.Drawing;using System.IO;using System.Linq;-using MediaBrowser.Model.Entities;-using System.Drawing;using MediaBrowser.Common.Drawing;+using MediaBrowser.Model.Entities;namespace MediaBrowser.Api.HttpHandlers{diff --git a/MediaBrowser.Api/HttpHandlers/YearsHandler.cs b/MediaBrowser.Api/HttpHandlers/YearsHandler.csindex 044866dca3..cc34748805 100644--- a/MediaBrowser.Api/HttpHandlers/YearsHandler.cs+++ b/MediaBrowser.Api/HttpHandlers/YearsHandler.cs@@ -1,13 +1,15 @@using System;+using System.Collections.Generic;using MediaBrowser.Common.Net.Handlers;using MediaBrowser.Controller;+using MediaBrowser.Model.DTO;using MediaBrowser.Model.Entities;namespace MediaBrowser.Api.HttpHandlers{- public class YearsHandler : BaseJsonHandler+ public class YearsHandler : BaseJsonHandler<IEnumerable<CategoryInfo<Year>>>{- protected override object GetObjectToSerialize()+ protected override IEnumerable<CategoryInfo<Year>> GetObjectToSerialize(){Folder parent = ApiService.GetItemById(QueryString["id"]) as Folder;Guid userId = Guid.Parse(QueryString["userid"]);diff --git a/MediaBrowser.ApiInteraction/ApiClient.cs b/MediaBrowser.ApiInteraction/ApiClient.csindex 0750223b6d..7818dbdf8b 100644--- a/MediaBrowser.ApiInteraction/ApiClient.cs+++ b/MediaBrowser.ApiInteraction/ApiClient.cs@@ -4,6 +4,7 @@ using System.IO;using System.Linq;using System.Threading.Tasks;using MediaBrowser.Model.Configuration;+using MediaBrowser.Model.DTO;using MediaBrowser.Model.Entities;using MediaBrowser.Model.Users;@@ -90,7 +91,7 @@ namespace MediaBrowser.ApiInteraction/// <param name="maxWidth">Use if a max width is required. Aspect ratio will be preserved.</param>/// <param name="maxHeight">Use if a max height is required. Aspect ratio will be preserved.</param>/// <param name="quality">Quality level, from 0-100. Currently only applies to JPG. The default value should suffice.</param>- public IEnumerable<string> GetBackdropImageUrls(ApiBaseItemWrapper<ApiBaseItem> itemWrapper, int? width = null, int? height = null, int? maxWidth = null, int? maxHeight = null, int? quality = null)+ public IEnumerable<string> GetBackdropImageUrls(BaseItemWrapper<ApiBaseItem> itemWrapper, int? width = null, int? height = null, int? maxWidth = null, int? maxHeight = null, int? quality = null){Guid? backdropItemId = null;int backdropCount = 0;@@ -130,7 +131,7 @@ namespace MediaBrowser.ApiInteraction/// <param name="maxWidth">Use if a max width is required. Aspect ratio will be preserved.</param>/// <param name="maxHeight">Use if a max height is required. Aspect ratio will be preserved.</param>/// <param name="quality">Quality level, from 0-100. Currently only applies to JPG. The default value should suffice.</param>- public string GetLogoImageUrl(ApiBaseItemWrapper<ApiBaseItem> itemWrapper, int? width = null, int? height = null, int? maxWidth = null, int? maxHeight = null, int? quality = null)+ public string GetLogoImageUrl(BaseItemWrapper<ApiBaseItem> itemWrapper, int? width = null, int? height = null, int? maxWidth = null, int? maxHeight = null, int? quality = null){Guid? logoItemId = !string.IsNullOrEmpty(itemWrapper.Item.LogoImagePath) ? itemWrapper.Item.Id : itemWrapper.ParentLogoItemId;@@ -153,7 +154,7 @@ namespace MediaBrowser.ApiInteraction/// <summary>/// Gets a BaseItem/// </summary>- public async Task<ApiBaseItemWrapper<ApiBaseItem>> GetItemAsync(Guid id, Guid userId)+ public async Task<BaseItemWrapper<ApiBaseItem>> GetItemAsync(Guid id, Guid userId){string url = ApiUrl + "/item?userId=" + userId.ToString();@@ -164,7 +165,7 @@ namespace MediaBrowser.ApiInteractionusing (Stream stream = await HttpClient.GetStreamAsync(url)){- return JsonSerializer.DeserializeFromStream<ApiBaseItemWrapper<ApiBaseItem>>(stream);+ return JsonSerializer.DeserializeFromStream<BaseItemWrapper<ApiBaseItem>>(stream);}}@@ -210,33 +211,33 @@ namespace MediaBrowser.ApiInteraction/// <summary>/// Gets all items that contain a given Year/// </summary>- public async Task<IEnumerable<ApiBaseItemWrapper<ApiBaseItem>>> GetItemsWithYearAsync(string name, Guid userId)+ public async Task<IEnumerable<BaseItemWrapper<ApiBaseItem>>> GetItemsWithYearAsync(string name, Guid userId){string url = ApiUrl + "/itemswithyear?userId=" + userId.ToString() + "&name=" + name;using (Stream stream = await HttpClient.GetStreamAsync(url)){- return JsonSerializer.DeserializeFromStream<IEnumerable<ApiBaseItemWrapper<ApiBaseItem>>>(stream);+ return JsonSerializer.DeserializeFromStream<IEnumerable<BaseItemWrapper<ApiBaseItem>>>(stream);}}/// <summary>/// Gets all items that contain a given Genre/// </summary>- public async Task<IEnumerable<ApiBaseItemWrapper<ApiBaseItem>>> GetItemsWithGenreAsync(string name, Guid userId)+ public async Task<IEnumerable<BaseItemWrapper<ApiBaseItem>>> GetItemsWithGenreAsync(string name, Guid userId){string url = ApiUrl + "/itemswithgenre?userId=" + userId.ToString() + "&name=" + name;using (Stream stream = await HttpClient.GetStreamAsync(url)){- return JsonSerializer.DeserializeFromStream<IEnumerable<ApiBaseItemWrapper<ApiBaseItem>>>(stream);+ return JsonSerializer.DeserializeFromStream<IEnumerable<BaseItemWrapper<ApiBaseItem>>>(stream);}}/// <summary>/// Gets all items that contain a given Person/// </summary>- public async Task<IEnumerable<ApiBaseItemWrapper<ApiBaseItem>>> GetItemsWithPersonAsync(string name, PersonType? personType, Guid userId)+ public async Task<IEnumerable<BaseItemWrapper<ApiBaseItem>>> GetItemsWithPersonAsync(string name, PersonType? personType, Guid userId){string url = ApiUrl + "/itemswithperson?userId=" + userId.ToString() + "&name=" + name;@@ -247,7 +248,7 @@ namespace MediaBrowser.ApiInteractionusing (Stream stream = await HttpClient.GetStreamAsync(url)){- return JsonSerializer.DeserializeFromStream<IEnumerable<ApiBaseItemWrapper<ApiBaseItem>>>(stream);+ return JsonSerializer.DeserializeFromStream<IEnumerable<BaseItemWrapper<ApiBaseItem>>>(stream);}}@@ -280,13 +281,13 @@ namespace MediaBrowser.ApiInteraction/// <summary>/// Gets all items that contain a given Studio/// </summary>- public async Task<IEnumerable<ApiBaseItemWrapper<ApiBaseItem>>> GetItemsWithStudioAsync(string name, Guid userId)+ public async Task<IEnumerable<BaseItemWrapper<ApiBaseItem>>> GetItemsWithStudioAsync(string name, Guid userId){string url = ApiUrl + "/itemswithstudio?userId=" + userId.ToString() + "&name=" + name;using (Stream stream = await HttpClient.GetStreamAsync(url)){- return JsonSerializer.DeserializeFromStream<IEnumerable<ApiBaseItemWrapper<ApiBaseItem>>>(stream);+ return JsonSerializer.DeserializeFromStream<IEnumerable<BaseItemWrapper<ApiBaseItem>>>(stream);}}diff --git a/MediaBrowser.Common/Net/Handlers/BaseJsonHandler.cs b/MediaBrowser.Common/Net/Handlers/BaseJsonHandler.csindex 03de398c90..a35af92313 100644--- a/MediaBrowser.Common/Net/Handlers/BaseJsonHandler.cs+++ b/MediaBrowser.Common/Net/Handlers/BaseJsonHandler.cs@@ -4,7 +4,7 @@ using MediaBrowser.Common.Serialization;namespace MediaBrowser.Common.Net.Handlers{- public abstract class BaseJsonHandler : BaseHandler+ public abstract class BaseJsonHandler<T> : BaseHandler{public override string ContentType{@@ -12,7 +12,7 @@ namespace MediaBrowser.Common.Net.Handlers}private bool _ObjectToSerializeEnsured = false;- private object _ObjectToSerialize;+ private T _ObjectToSerialize;private void EnsureObjectToSerialize(){@@ -29,7 +29,7 @@ namespace MediaBrowser.Common.Net.Handlers}}- private object ObjectToSerialize+ private T ObjectToSerialize{get{@@ -38,7 +38,7 @@ namespace MediaBrowser.Common.Net.Handlers}}- protected abstract object GetObjectToSerialize();+ protected abstract T GetObjectToSerialize();protected override void PrepareResponse(){@@ -51,7 +51,7 @@ namespace MediaBrowser.Common.Net.Handlers{return Task.Run(() =>{- JsonSerializer.SerializeToStream(ObjectToSerialize, stream);+ JsonSerializer.SerializeToStream<T>(ObjectToSerialize, stream);});}}diff --git a/MediaBrowser.Controller/Kernel.cs b/MediaBrowser.Controller/Kernel.csindex 18598d0144..ef9a07814b 100644--- a/MediaBrowser.Controller/Kernel.cs+++ b/MediaBrowser.Controller/Kernel.cs@@ -13,6 +13,7 @@ using MediaBrowser.Controller.IO;using MediaBrowser.Controller.Library;using MediaBrowser.Controller.Resolvers;using MediaBrowser.Model.Configuration;+using MediaBrowser.Model.DTO;using MediaBrowser.Model.Entities;using MediaBrowser.Model.Progress;using MediaBrowser.Model.Users;diff --git a/MediaBrowser.Controller/Xml/BaseItemXmlParser.cs b/MediaBrowser.Controller/Xml/BaseItemXmlParser.csindex 38b8584fc0..30bf3d367b 100644--- a/MediaBrowser.Controller/Xml/BaseItemXmlParser.cs+++ b/MediaBrowser.Controller/Xml/BaseItemXmlParser.cs@@ -113,10 +113,6 @@ namespace MediaBrowser.Controller.Xmlitem.CustomRating = reader.ReadString();break;- case "CustomPin":- item.CustomPin = reader.ReadString();- break;-case "Genre":{var genres = (item.Genres ?? new string[] { }).ToList();diff --git a/MediaBrowser.Model/Entities/ApiBaseItem.cs b/MediaBrowser.Model/DTO/ApiBaseItem.cssimilarity index 73%rename from MediaBrowser.Model/Entities/ApiBaseItem.csrename to MediaBrowser.Model/DTO/ApiBaseItem.csindex e40fdc25f8..d6b0f4a047 100644--- a/MediaBrowser.Model/Entities/ApiBaseItem.cs+++ b/MediaBrowser.Model/DTO/ApiBaseItem.cs@@ -1,8 +1,9 @@using System;using System.Collections.Generic;+using MediaBrowser.Model.Entities;using MediaBrowser.Model.Users;-namespace MediaBrowser.Model.Entities+namespace MediaBrowser.Model.DTO{/// <summary>/// This is a concrete class that the UI can use to deserialize@@ -10,7 +11,7 @@ namespace MediaBrowser.Model.Entities/// </summary>public class ApiBaseItem : BaseItem{- // TV Series+ // Series propertiespublic string Status { get; set; }public IEnumerable<DayOfWeek> AirDays { get; set; }public string AirTime { get; set; }@@ -19,14 +20,14 @@ namespace MediaBrowser.Model.Entities/// <summary>/// This is the full return object when requesting an Item/// </summary>- public class ApiBaseItemWrapper<T>+ public class BaseItemWrapper<T>where T : BaseItem{public T Item { get; set; }public UserItemData UserItemData { get; set; }- public IEnumerable<ApiBaseItemWrapper<T>> Children { get; set; }+ public IEnumerable<BaseItemWrapper<T>> Children { get; set; }public bool IsFolder { get; set; }@@ -55,4 +56,11 @@ namespace MediaBrowser.Model.Entitiespublic int? ParentBackdropCount { get; set; }}++ /// <summary>+ /// This is strictly for convenience so the UI's don't have to use the verbose generic syntax of BaseItemWrapper<ApiBaseItem>+ /// </summary>+ public class ApiBaseItemWrapper : BaseItemWrapper<ApiBaseItem>+ {+ }}diff --git a/MediaBrowser.Model/Entities/CategoryInfo.cs b/MediaBrowser.Model/DTO/CategoryInfo.cssimilarity index 89%rename from MediaBrowser.Model/Entities/CategoryInfo.csrename to MediaBrowser.Model/DTO/CategoryInfo.csindex 934a0ae1d1..e6b2aeafb0 100644--- a/MediaBrowser.Model/Entities/CategoryInfo.cs+++ b/MediaBrowser.Model/DTO/CategoryInfo.cs@@ -1,5 +1,5 @@-namespace MediaBrowser.Model.Entities+namespace MediaBrowser.Model.DTO{/// <summary>/// This is a stub class used by the api to get IBN types along with their item countsdiff --git a/MediaBrowser.Model/Plugins/PluginInfo.cs b/MediaBrowser.Model/DTO/PluginInfo.cssimilarity index 90%rename from MediaBrowser.Model/Plugins/PluginInfo.csrename to MediaBrowser.Model/DTO/PluginInfo.csindex e08128fd7b..76e9026a6b 100644--- a/MediaBrowser.Model/Plugins/PluginInfo.cs+++ b/MediaBrowser.Model/DTO/PluginInfo.cs@@ -1,6 +1,6 @@using System;-namespace MediaBrowser.Model.Plugins+namespace MediaBrowser.Model.DTO{/// <summary>/// This is a serializable stub class that is used by the api to provide information about installed plugins.diff --git a/MediaBrowser.Model/Entities/BaseItem.cs b/MediaBrowser.Model/Entities/BaseItem.csindex 322bac564c..d2745e460f 100644--- a/MediaBrowser.Model/Entities/BaseItem.cs+++ b/MediaBrowser.Model/Entities/BaseItem.cs@@ -26,9 +26,9 @@ namespace MediaBrowser.Model.Entitiespublic IEnumerable<string> BackdropImagePaths { get; set; }public string OfficialRating { get; set; }-++ [IgnoreDataMember]public string CustomRating { get; set; }- public string CustomPin { get; set; }public string Overview { get; set; }public string Tagline { get; set; }diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csprojindex 97a2233204..dd9034ed56 100644--- a/MediaBrowser.Model/MediaBrowser.Model.csproj+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj@@ -33,11 +33,11 @@</PropertyGroup><ItemGroup><Compile Include="Configuration\UserConfiguration.cs" />- <Compile Include="Entities\ApiBaseItem.cs" />+ <Compile Include="DTO\ApiBaseItem.cs" /><Compile Include="Entities\Audio.cs" /><Compile Include="Entities\BaseEntity.cs" /><Compile Include="Entities\BaseItem.cs" />- <Compile Include="Entities\CategoryInfo.cs" />+ <Compile Include="DTO\CategoryInfo.cs" /><Compile Include="Entities\Folder.cs" /><Compile Include="Entities\Genre.cs" /><Compile Include="Entities\ImageType.cs" />@@ -47,7 +47,7 @@<Compile Include="Entities\Video.cs" /><Compile Include="Entities\Year.cs" /><Compile Include="Plugins\BasePluginConfiguration.cs" />- <Compile Include="Plugins\PluginInfo.cs" />+ <Compile Include="DTO\PluginInfo.cs" /><Compile Include="Progress\TaskProgress.cs" /><Compile Include="Properties\AssemblyInfo.cs" /><Compile Include="Users\User.cs" />diff --git a/MediaBrowser.Movies/Entities/BoxSet.cs b/MediaBrowser.Movies/Entities/BoxSet.csindex 520722607d..ed6cb14012 100644--- a/MediaBrowser.Movies/Entities/BoxSet.cs+++ b/MediaBrowser.Movies/Entities/BoxSet.cs@@ -1,6 +1,4 @@-using System;-using System.Collections.Generic;-using MediaBrowser.Model.Entities;+using MediaBrowser.Model.Entities;namespace MediaBrowser.Movies.Entities{diff --git a/MediaBrowser.Movies/Entities/Movie.cs b/MediaBrowser.Movies/Entities/Movie.csindex 585b5b7773..25fb1327cb 100644--- a/MediaBrowser.Movies/Entities/Movie.cs+++ b/MediaBrowser.Movies/Entities/Movie.cs@@ -6,9 +6,6 @@ namespace MediaBrowser.Movies.Entities{public class Movie : Video{- public string TmdbId { get; set; }- public string ImdbId { get; set; }-[IgnoreDataMember]public IEnumerable<Video> SpecialFeatures { get; set; }}diff --git a/MediaBrowser.ServerApplication/MainWindow.xaml.cs b/MediaBrowser.ServerApplication/MainWindow.xaml.csindex b0b9420255..cbcf5186e3 100644--- a/MediaBrowser.ServerApplication/MainWindow.xaml.cs+++ b/MediaBrowser.ServerApplication/MainWindow.xaml.cs@@ -22,15 +22,15 @@ namespace MediaBrowser.ServerApplicationProgress<TaskProgress> progress = new Progress<TaskProgress>();Common.UI.Splash splash = new Common.UI.Splash(progress);+ splash.Show();+try{- splash.Show();-new Kernel().Init(progress);}catch (Exception ex){- MessageBox.Show("There was an error launching Media Browser: " + ex.Message);+ MessageBox.Show("There was an error launching Media Browser Server: " + ex.Message);}finally{diff --git a/MediaBrowser.TV/Entities/Episode.cs b/MediaBrowser.TV/Entities/Episode.csindex aa3227a77d..cc66eed80e 100644--- a/MediaBrowser.TV/Entities/Episode.cs+++ b/MediaBrowser.TV/Entities/Episode.cs@@ -4,6 +4,5 @@ namespace MediaBrowser.TV.Entities{public class Episode : Video{- public string SeasonNumber { get; set; }}}diff --git a/MediaBrowser.TV/Metadata/EpisodeXmlParser.cs b/MediaBrowser.TV/Metadata/EpisodeXmlParser.csindex 95099379f0..ef8a6705fd 100644--- a/MediaBrowser.TV/Metadata/EpisodeXmlParser.cs+++ b/MediaBrowser.TV/Metadata/EpisodeXmlParser.cs@@ -31,10 +31,6 @@ namespace MediaBrowser.TV.Metadata}break;- case "SeasonNumber":- item.SeasonNumber = reader.ReadString();- break;-case "EpisodeName":item.Name = reader.ReadString();break;