aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MediaBrowser.Api/Reports/ReportsService.cs14
-rw-r--r--MediaBrowser.Api/UserLibrary/ItemsService.cs14
-rw-r--r--MediaBrowser.Controller/Entities/Folder.cs6
-rw-r--r--MediaBrowser.Controller/Entities/InternalItemsQuery.cs3
-rw-r--r--MediaBrowser.Controller/Entities/UserViewBuilder.cs11
5 files changed, 23 insertions, 25 deletions
diff --git a/MediaBrowser.Api/Reports/ReportsService.cs b/MediaBrowser.Api/Reports/ReportsService.cs
index 4ff3dcf26..5b492d8b4 100644
--- a/MediaBrowser.Api/Reports/ReportsService.cs
+++ b/MediaBrowser.Api/Reports/ReportsService.cs
@@ -260,7 +260,8 @@ namespace MediaBrowser.Api.Reports
MinCommunityRating = request.MinCommunityRating,
MinCriticRating = request.MinCriticRating,
ParentIndexNumber = request.ParentIndexNumber,
- AiredDuringSeason = request.AiredDuringSeason
+ AiredDuringSeason = request.AiredDuringSeason,
+ AlbumArtistStartsWithOrGreater = request.AlbumArtistStartsWithOrGreater
};
if (!string.IsNullOrWhiteSpace(request.Ids))
@@ -477,17 +478,6 @@ namespace MediaBrowser.Api.Reports
}
}
- if (!string.IsNullOrEmpty(request.AlbumArtistStartsWithOrGreater))
- {
- var ok = new[] { i }.OfType<IHasAlbumArtist>()
- .Any(p => string.Compare(request.AlbumArtistStartsWithOrGreater, p.AlbumArtists.FirstOrDefault(), StringComparison.CurrentCultureIgnoreCase) < 1);
-
- if (!ok)
- {
- return false;
- }
- }
-
return true;
}
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs
index c54f25973..92b2d6002 100644
--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs
@@ -233,7 +233,8 @@ namespace MediaBrowser.Api.UserLibrary
MinCriticRating = request.MinCriticRating,
ParentId = string.IsNullOrWhiteSpace(request.ParentId) ? (Guid?)null : new Guid(request.ParentId),
ParentIndexNumber = request.ParentIndexNumber,
- AiredDuringSeason = request.AiredDuringSeason
+ AiredDuringSeason = request.AiredDuringSeason,
+ AlbumArtistStartsWithOrGreater = request.AlbumArtistStartsWithOrGreater
};
if (!string.IsNullOrWhiteSpace(request.Ids))
@@ -435,17 +436,6 @@ namespace MediaBrowser.Api.UserLibrary
}
}
- if (!string.IsNullOrEmpty(request.AlbumArtistStartsWithOrGreater))
- {
- var ok = new[] { i }.OfType<IHasAlbumArtist>()
- .Any(p => string.Compare(request.AlbumArtistStartsWithOrGreater, p.AlbumArtists.FirstOrDefault(), StringComparison.CurrentCultureIgnoreCase) < 1);
-
- if (!ok)
- {
- return false;
- }
- }
-
return true;
}
}
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs
index dc0a8d0aa..dcdd10dd6 100644
--- a/MediaBrowser.Controller/Entities/Folder.cs
+++ b/MediaBrowser.Controller/Entities/Folder.cs
@@ -1188,6 +1188,12 @@ namespace MediaBrowser.Controller.Entities
return true;
}
+ if (!string.IsNullOrWhiteSpace(query.AlbumArtistStartsWithOrGreater))
+ {
+ Logger.Debug("Query requires post-filtering due to AlbumArtistStartsWithOrGreater");
+ return true;
+ }
+
return false;
}
diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
index 2f98ac70d..da76e7db0 100644
--- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
+++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
@@ -125,7 +125,8 @@ namespace MediaBrowser.Controller.Entities
public DayOfWeek[] AirDays { get; set; }
public SeriesStatus[] SeriesStatuses { get; set; }
-
+ public string AlbumArtistStartsWithOrGreater { get; set; }
+
public InternalItemsQuery()
{
BlockUnratedItems = new UnratedItem[] { };
diff --git a/MediaBrowser.Controller/Entities/UserViewBuilder.cs b/MediaBrowser.Controller/Entities/UserViewBuilder.cs
index 645e6e37d..ccb842cf4 100644
--- a/MediaBrowser.Controller/Entities/UserViewBuilder.cs
+++ b/MediaBrowser.Controller/Entities/UserViewBuilder.cs
@@ -1752,6 +1752,17 @@ namespace MediaBrowser.Controller.Entities
}
}
+ if (!string.IsNullOrEmpty(query.AlbumArtistStartsWithOrGreater))
+ {
+ var ok = new[] { item }.OfType<IHasAlbumArtist>()
+ .Any(p => string.Compare(query.AlbumArtistStartsWithOrGreater, p.AlbumArtists.FirstOrDefault(), StringComparison.CurrentCultureIgnoreCase) < 1);
+
+ if (!ok)
+ {
+ return false;
+ }
+ }
+
return true;
}