diff --git a/MediaBrowser.Api/Reports/ReportsService.cs b/MediaBrowser.Api/Reports/ReportsService.cs index b8709a499e..6cbe2fd892 100644 --- a/MediaBrowser.Api/Reports/ReportsService.cs +++ b/MediaBrowser.Api/Reports/ReportsService.cs @@ -215,6 +215,7 @@ namespace MediaBrowser.Api.Reports Filter = i => ApplyAdditionalFilters(request, i, user, _libraryManager), + IsFavorite = request.IsFavorite, Limit = request.Limit, StartIndex = request.StartIndex, IsMissing = request.IsMissing, @@ -275,9 +276,6 @@ namespace MediaBrowser.Api.Reports case ItemFilter.IsFavorite: query.IsFavorite = true; break; - case ItemFilter.IsNotFavorite: - query.IsFavorite = false; - break; case ItemFilter.IsFavoriteOrLikes: query.IsFavoriteOrLiked = true; break; diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs index 4d844e6cbe..23d4da60c3 100644 --- a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs +++ b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs @@ -168,6 +168,13 @@ namespace MediaBrowser.Api.UserLibrary [ApiMember(Name = "Filters", Description = "Optional. Specify additional filters to apply. This allows multiple, comma delimeted. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Filters { get; set; } + /// + /// Gets or sets the Isfavorite option + /// + /// IsFavorite + [ApiMember(Name = "IsFavorite", Description = "Optional filter by items that are marked as favorite, or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")] + public bool? IsFavorite { get; set; } + /// /// Gets or sets the media types. /// diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index f1168ab7f4..97d0ad7ab0 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -181,6 +181,7 @@ namespace MediaBrowser.Api.UserLibrary Filter = i => ApplyAdditionalFilters(request, i, user, _libraryManager), + IsFavorite = request.IsFavorite, Limit = request.Limit, StartIndex = request.StartIndex, IsMissing = request.IsMissing, diff --git a/MediaBrowser.Model/Querying/ItemFilter.cs b/MediaBrowser.Model/Querying/ItemFilter.cs index 3a1786a156..83d61ae514 100644 --- a/MediaBrowser.Model/Querying/ItemFilter.cs +++ b/MediaBrowser.Model/Querying/ItemFilter.cs @@ -45,10 +45,6 @@ namespace MediaBrowser.Model.Querying /// /// The is favorite or likes /// - IsFavoriteOrLikes = 10, - /// - /// The item is not a favorite - /// - IsNotFavorite = 11 + IsFavoriteOrLikes = 10 } }