updated nuget

This commit is contained in:
Luke Pulverenti 2014-01-19 14:25:29 -05:00
parent ccf707e57b
commit 7da8345078
8 changed files with 45 additions and 6 deletions

View file

@ -147,6 +147,15 @@ namespace MediaBrowser.Api.UserLibrary
items = items.Where(i => GetLibraryItems(i, libraryItems).All(l => l.IsUnplayed(user)));
}
if (request.IsPlayed.HasValue)
{
var val = request.IsPlayed.Value;
var libraryItems = user.RootFolder.GetRecursiveChildren(user).ToList();
items = items.Where(i => GetLibraryItems(i, libraryItems).All(l => l.IsPlayed(user) == val));
}
return items;
}

View file

@ -93,6 +93,9 @@ namespace MediaBrowser.Api.UserLibrary
[ApiMember(Name = "SortBy", Description = "Optional. Specify one or more sort orders, comma delimeted. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
public string SortBy { get; set; }
[ApiMember(Name = "IsPlayed", Description = "Optional filter by items that are played, or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
public bool? IsPlayed { get; set; }
/// <summary>
/// Gets the filters.
/// </summary>

View file

@ -216,6 +216,9 @@ namespace MediaBrowser.Api.UserLibrary
[ApiMember(Name = "IsYearMismatched", Description = "Optional filter by items that are potentially misidentified.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
public bool? IsYearMismatched { get; set; }
[ApiMember(Name = "IsInBoxSet", Description = "Optional filter by items that are in boxsets, or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
public bool? IsInBoxSet { get; set; }
}
/// <summary>
@ -969,6 +972,8 @@ namespace MediaBrowser.Api.UserLibrary
if (request.HasParentalRating.HasValue)
{
var val = request.HasParentalRating.Value;
items = items.Where(i =>
{
var rating = i.CustomRating;
@ -978,7 +983,7 @@ namespace MediaBrowser.Api.UserLibrary
rating = i.OfficialRating;
}
if (request.HasParentalRating.Value)
if (val)
{
return !string.IsNullOrEmpty(rating);
}
@ -993,6 +998,18 @@ namespace MediaBrowser.Api.UserLibrary
items = items.OfType<Video>().Where(i => i.IsHD == val);
}
if (request.IsInBoxSet.HasValue)
{
var val = request.IsHD.Value;
items = items.Where(i => i.Parents.OfType<BoxSet>().Any() == val);
}
if (request.IsPlayed.HasValue)
{
var val = request.IsPlayed.Value;
items = items.Where(i => i.IsPlayed(user) == val);
}
if (request.ParentIndexNumber.HasValue)
{
var filterValue = request.ParentIndexNumber.Value;

View file

@ -249,6 +249,10 @@ namespace MediaBrowser.Model.Querying
public bool? IsUnaired { get; set; }
public bool? IsVirtualUnaired { get; set; }
public bool? IsInBoxSet { get; set; }
public bool? IsPlayed { get; set; }
/// <summary>
/// Gets or sets the exclude location types.

View file

@ -91,6 +91,12 @@ namespace MediaBrowser.Model.Querying
/// <value>The name less than.</value>
public string NameLessThan { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is played.
/// </summary>
/// <value><c>null</c> if [is played] contains no value, <c>true</c> if [is played]; otherwise, <c>false</c>.</value>
public bool? IsPlayed { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="ItemsByNameQuery" /> class.
/// </summary>

View file

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common.Internal</id>
<version>3.0.305</version>
<version>3.0.306</version>
<title>MediaBrowser.Common.Internal</title>
<authors>Luke</authors>
<owners>ebr,Luke,scottisafool</owners>
@ -12,7 +12,7 @@
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
<dependency id="MediaBrowser.Common" version="3.0.305" />
<dependency id="MediaBrowser.Common" version="3.0.306" />
<dependency id="NLog" version="2.1.0" />
<dependency id="SimpleInjector" version="2.4.0" />
<dependency id="sharpcompress" version="0.10.2" />

View file

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common</id>
<version>3.0.305</version>
<version>3.0.306</version>
<title>MediaBrowser.Common</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>

View file

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MediaBrowser.Server.Core</id>
<version>3.0.305</version>
<version>3.0.306</version>
<title>Media Browser.Server.Core</title>
<authors>Media Browser Team</authors>
<owners>ebr,Luke,scottisafool</owners>
@ -12,7 +12,7 @@
<description>Contains core components required to build plugins for Media Browser Server.</description>
<copyright>Copyright © Media Browser 2013</copyright>
<dependencies>
<dependency id="MediaBrowser.Common" version="3.0.305" />
<dependency id="MediaBrowser.Common" version="3.0.306" />
</dependencies>
</metadata>
<files>