|
|
@ -350,6 +350,18 @@ namespace MediaBrowser.Api.Reports
|
|
|
|
query.MaxParentalRating = _localization.GetRatingLevel(request.MinOfficialRating);
|
|
|
|
query.MaxParentalRating = _localization.GetRatingLevel(request.MinOfficialRating);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Artists
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(request.Artists))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
query.ArtistNames = request.Artists.Split('|');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Albums
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(request.Albums))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
query.AlbumNames = request.Albums.Split('|');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (request.HasQueryLimit == false)
|
|
|
|
if (request.HasQueryLimit == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
query.StartIndex = null;
|
|
|
|
query.StartIndex = null;
|
|
|
@ -378,57 +390,6 @@ namespace MediaBrowser.Api.Reports
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Artists
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(request.Artists))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var artists = request.Artists.Split('|');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var audio = i as IHasArtist;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!(audio != null && artists.Any(audio.HasAnyArtist)))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Albums
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(request.Albums))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var albums = request.Albums.Split('|');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var audio = i as Audio;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (audio != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!albums.Any(a => string.Equals(a, audio.Album, StringComparison.OrdinalIgnoreCase)))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var album = i as MusicAlbum;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (album != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!albums.Any(a => string.Equals(a, album.Name, StringComparison.OrdinalIgnoreCase)))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var musicVideo = i as MusicVideo;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (musicVideo != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!albums.Any(a => string.Equals(a, musicVideo.Album, StringComparison.OrdinalIgnoreCase)))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|