mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 03:48:06 +02:00
Remove check for non-existent "emby rt" client in UserViewsController (#7470)
This commit is contained in:
parent
5cf0c1b8f8
commit
46798cb918
1 changed files with 1 additions and 7 deletions
|
@ -65,7 +65,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// <returns>An <see cref="OkResult"/> containing the user views.</returns>
|
/// <returns>An <see cref="OkResult"/> containing the user views.</returns>
|
||||||
[HttpGet("Users/{userId}/Views")]
|
[HttpGet("Users/{userId}/Views")]
|
||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
public async Task<ActionResult<QueryResult<BaseItemDto>>> GetUserViews(
|
public QueryResult<BaseItemDto> GetUserViews(
|
||||||
[FromRoute, Required] Guid userId,
|
[FromRoute, Required] Guid userId,
|
||||||
[FromQuery] bool? includeExternalContent,
|
[FromQuery] bool? includeExternalContent,
|
||||||
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] string[] presetViews,
|
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] string[] presetViews,
|
||||||
|
@ -87,12 +87,6 @@ namespace Jellyfin.Api.Controllers
|
||||||
query.PresetViews = presetViews;
|
query.PresetViews = presetViews;
|
||||||
}
|
}
|
||||||
|
|
||||||
var app = (await _authContext.GetAuthorizationInfo(Request).ConfigureAwait(false)).Client ?? string.Empty;
|
|
||||||
if (app.IndexOf("emby rt", StringComparison.OrdinalIgnoreCase) != -1)
|
|
||||||
{
|
|
||||||
query.PresetViews = new[] { CollectionType.Movies, CollectionType.TvShows };
|
|
||||||
}
|
|
||||||
|
|
||||||
var folders = _userViewManager.GetUserViews(query);
|
var folders = _userViewManager.GetUserViews(query);
|
||||||
|
|
||||||
var dtoOptions = new DtoOptions().AddClientFields(Request);
|
var dtoOptions = new DtoOptions().AddClientFields(Request);
|
||||||
|
|
Loading…
Reference in a new issue