From 07e230c2eb9524c7c5e8a7fe0a021df3801d40b0 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 25 Jun 2013 14:10:39 -0400 Subject: [PATCH] Added Video3DFormat property --- MediaBrowser.Api/UserLibrary/ItemsService.cs | 10 ++++----- MediaBrowser.Controller/Dto/DtoBuilder.cs | 2 +- MediaBrowser.Controller/Entities/Video.cs | 8 ++++++- .../Resolvers/BaseVideoResolver.cs | 21 ++++++++++++++++++- .../MediaBrowser.Model.net35.csproj | 3 +++ MediaBrowser.Model/Dto/BaseItemDto.cs | 6 ++++++ MediaBrowser.Model/Entities/Video3DFormat.cs | 14 +++++++++++++ MediaBrowser.Model/MediaBrowser.Model.csproj | 1 + MediaBrowser.Model/Querying/ItemQuery.cs | 4 +--- .../Savers/FolderXmlSaver.cs | 20 ++++++++++++++++-- .../Library/ResolverHelper.cs | 7 ++++++- Nuget/MediaBrowser.Common.Internal.nuspec | 4 ++-- Nuget/MediaBrowser.Common.nuspec | 2 +- Nuget/MediaBrowser.Server.Core.nuspec | 4 ++-- 14 files changed, 86 insertions(+), 20 deletions(-) create mode 100644 MediaBrowser.Model/Entities/Video3DFormat.cs diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index b96b94823..68436b6f1 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -117,8 +117,8 @@ namespace MediaBrowser.Api.UserLibrary /// Gets or sets the video formats. /// /// The video formats. - [ApiMember(Name = "VideoFormats", Description = "Optional filter by VideoFormat (Standard, Digital3D, Sbs3D). Allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] - public string VideoFormats { get; set; } + [ApiMember(Name = "Is3D", Description = "Optional filter by items that are 3D, or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")] + public bool? Is3D { get; set; } /// /// Gets or sets the series status. @@ -535,11 +535,9 @@ namespace MediaBrowser.Api.UserLibrary } // Filter by VideoFormat - if (!string.IsNullOrEmpty(request.VideoFormats)) + if (request.Is3D.HasValue) { - var formats = request.VideoFormats.Split(','); - - items = items.OfType