mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 22:43:07 +03:00
update dlna genre views
This commit is contained in:
@@ -230,8 +230,8 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
Tags = request.GetTags(),
|
||||
OfficialRatings = request.GetOfficialRatings(),
|
||||
Genres = request.GetGenres(),
|
||||
ArtistIds = request.GetArtistIds(),
|
||||
GenreIds = request.GetGenreIds(),
|
||||
Studios = request.GetStudios(),
|
||||
StudioIds = request.GetStudioIds(),
|
||||
Person = request.Person,
|
||||
PersonIds = request.GetPersonIds(),
|
||||
@@ -338,19 +338,20 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
query.MaxParentalRating = _localization.GetRatingLevel(request.MaxOfficialRating);
|
||||
}
|
||||
|
||||
// Artists
|
||||
if (!string.IsNullOrEmpty(request.ArtistIds))
|
||||
{
|
||||
var artistIds = request.ArtistIds.Split(new[] { '|', ',' });
|
||||
|
||||
var artistItems = artistIds.Select(_libraryManager.GetItemById).Where(i => i != null).ToList();
|
||||
query.ArtistNames = artistItems.Select(i => i.Name).ToArray();
|
||||
}
|
||||
|
||||
// Artists
|
||||
if (!string.IsNullOrEmpty(request.Artists))
|
||||
{
|
||||
query.ArtistNames = request.Artists.Split('|');
|
||||
query.ArtistIds = request.Artists.Split('|').Select(i =>
|
||||
{
|
||||
try
|
||||
{
|
||||
return _libraryManager.GetArtist(i);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}).Where(i => i != null).Select(i => i.Id.ToString("N")).ToArray();
|
||||
}
|
||||
|
||||
// ExcludeArtistIds
|
||||
@@ -365,6 +366,22 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
query.AlbumNames = request.Albums.Split('|');
|
||||
}
|
||||
|
||||
// Studios
|
||||
if (!string.IsNullOrEmpty(request.Studios))
|
||||
{
|
||||
query.StudioIds = request.Studios.Split('|').Select(i =>
|
||||
{
|
||||
try
|
||||
{
|
||||
return _libraryManager.GetStudio(i);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}).Where(i => i != null).Select(i => i.Id.ToString("N")).ToArray();
|
||||
}
|
||||
|
||||
return query;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user