aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-08-17 09:16:50 -0400
committerLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-08-17 09:16:50 -0400
commit5c094afd7e79934cb02f29a9a0080ed12c7e1098 (patch)
tree4ea0724f3fae7b65459a36ae56ff164fc67da8f0
parent8a2e0badaeed08e747f5607ce6ecf46225873839 (diff)
Made BaseJsonHandler strongly typed. Moved DTO entities to their own DTO namespace in Model.
-rw-r--r--MediaBrowser.Api/ApiService.cs5
-rw-r--r--MediaBrowser.Api/HttpHandlers/GenresHandler.cs6
-rw-r--r--MediaBrowser.Api/HttpHandlers/ItemHandler.cs5
-rw-r--r--MediaBrowser.Api/HttpHandlers/ItemListHandler.cs5
-rw-r--r--MediaBrowser.Api/HttpHandlers/PersonHandler.cs5
-rw-r--r--MediaBrowser.Api/HttpHandlers/PluginConfigurationHandler.cs5
-rw-r--r--MediaBrowser.Api/HttpHandlers/PluginsHandler.cs9
-rw-r--r--MediaBrowser.Api/HttpHandlers/StudiosHandler.cs8
-rw-r--r--MediaBrowser.Api/HttpHandlers/UserConfigurationHandler.cs5
-rw-r--r--MediaBrowser.Api/HttpHandlers/UsersHandler.cs8
-rw-r--r--MediaBrowser.Api/HttpHandlers/VideoHandler.cs4
-rw-r--r--MediaBrowser.Api/HttpHandlers/YearsHandler.cs6
-rw-r--r--MediaBrowser.ApiInteraction/ApiClient.cs25
-rw-r--r--MediaBrowser.Common/Net/Handlers/BaseJsonHandler.cs10
-rw-r--r--MediaBrowser.Controller/Kernel.cs1
-rw-r--r--MediaBrowser.Controller/Xml/BaseItemXmlParser.cs4
-rw-r--r--MediaBrowser.Model/DTO/ApiBaseItem.cs (renamed from MediaBrowser.Model/Entities/ApiBaseItem.cs)16
-rw-r--r--MediaBrowser.Model/DTO/CategoryInfo.cs (renamed from MediaBrowser.Model/Entities/CategoryInfo.cs)2
-rw-r--r--MediaBrowser.Model/DTO/PluginInfo.cs (renamed from MediaBrowser.Model/Plugins/PluginInfo.cs)2
-rw-r--r--MediaBrowser.Model/Entities/BaseItem.cs4
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj6
-rw-r--r--MediaBrowser.Movies/Entities/BoxSet.cs4
-rw-r--r--MediaBrowser.Movies/Entities/Movie.cs3
-rw-r--r--MediaBrowser.ServerApplication/MainWindow.xaml.cs6
-rw-r--r--MediaBrowser.TV/Entities/Episode.cs1
-rw-r--r--MediaBrowser.TV/Metadata/EpisodeXmlParser.cs4
26 files changed, 85 insertions, 74 deletions
diff --git a/MediaBrowser.Api/ApiService.cs b/MediaBrowser.Api/ApiService.cs
index 7c52e0e5c..e4a7f71bf 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.cs
index 0c38a2396..c3292d363 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.cs
index 28def271f..efb67db54 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.cs
index 0d9d3d0a8..6e08561b2 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.cs
index 103e49cd2..513840b81 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.cs
index 4dc317ecc..0e19aecd5 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.cs
index a44e12692..c3c1b4049 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.cs
index a381af15f..b1be2cad2 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.cs
index f9d3536b6..12e80f306 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.cs
index 64f68f62f..64239005f 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.cs
index 7fe82ef0c..343fcc70b 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.cs
index 044866dca..cc3474880 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.cs
index 0750223b6..7818dbdf8 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.ApiInteraction
using (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.ApiInteraction
using (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.cs
index 03de398c9..a35af9231 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.cs
index 18598d014..ef9a07814 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.cs
index 38b8584fc..30bf3d367 100644
--- a/MediaBrowser.Controller/Xml/BaseItemXmlParser.cs
+++ b/MediaBrowser.Controller/Xml/BaseItemXmlParser.cs
@@ -113,10 +113,6 @@ namespace MediaBrowser.Controller.Xml
item.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.cs
index e40fdc25f..d6b0f4a04 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 properties
public 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.Entities
public 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.cs
index 934a0ae1d..e6b2aeafb 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 counts
diff --git a/MediaBrowser.Model/Plugins/PluginInfo.cs b/MediaBrowser.Model/DTO/PluginInfo.cs
index e08128fd7..76e9026a6 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.cs
index 322bac564..d2745e460 100644
--- a/MediaBrowser.Model/Entities/BaseItem.cs
+++ b/MediaBrowser.Model/Entities/BaseItem.cs
@@ -26,9 +26,9 @@ namespace MediaBrowser.Model.Entities
public 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.csproj
index 97a223320..dd9034ed5 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.cs
index 520722607..ed6cb1401 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.cs
index 585b5b777..25fb1327c 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.cs
index b0b942025..cbcf5186e 100644
--- a/MediaBrowser.ServerApplication/MainWindow.xaml.cs
+++ b/MediaBrowser.ServerApplication/MainWindow.xaml.cs
@@ -22,15 +22,15 @@ namespace MediaBrowser.ServerApplication
Progress<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.cs
index aa3227a77..cc66eed80 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.cs
index 95099379f..ef8a6705f 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;