Merge pull request #3434 from crobibero/api-unused

remove unused query parameters
pull/2976/head
Patrick Barron 5 years ago committed by GitHub
commit 7bd9172779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,17 +35,14 @@ namespace Jellyfin.Api.Controllers
/// <param name="startIndex">Optional. The record index to start at. All items with a lower index will be dropped from the results.</param> /// <param name="startIndex">Optional. The record index to start at. All items with a lower index will be dropped from the results.</param>
/// <param name="limit">Optional. The maximum number of records to return.</param> /// <param name="limit">Optional. The maximum number of records to return.</param>
/// <param name="minDate">Optional. The minimum date. Format = ISO.</param> /// <param name="minDate">Optional. The minimum date. Format = ISO.</param>
/// <param name="hasUserId">Optional. Only returns activities that have a user associated.</param>
/// <response code="200">Activity log returned.</response> /// <response code="200">Activity log returned.</response>
/// <returns>A <see cref="QueryResult{ActivityLogEntry}"/> containing the log entries.</returns> /// <returns>A <see cref="QueryResult{ActivityLogEntry}"/> containing the log entries.</returns>
[HttpGet("Entries")] [HttpGet("Entries")]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "hasUserId", Justification = "Imported from ServiceStack")]
public ActionResult<QueryResult<ActivityLogEntry>> GetLogEntries( public ActionResult<QueryResult<ActivityLogEntry>> GetLogEntries(
[FromQuery] int? startIndex, [FromQuery] int? startIndex,
[FromQuery] int? limit, [FromQuery] int? limit,
[FromQuery] DateTime? minDate, [FromQuery] DateTime? minDate)
bool? hasUserId)
{ {
var filterFunc = new Func<IQueryable<ActivityLog>, IQueryable<ActivityLog>>( var filterFunc = new Func<IQueryable<ActivityLog>, IQueryable<ActivityLog>>(
entries => entries.Where(entry => entry.DateCreated >= minDate)); entries => entries.Where(entry => entry.DateCreated >= minDate));

@ -178,14 +178,13 @@ namespace Jellyfin.Api.Controllers
[ApiExplorerSettings(IgnoreApi = true)] [ApiExplorerSettings(IgnoreApi = true)]
public ActionResult GetRobotsTxt() public ActionResult GetRobotsTxt()
{ {
return GetWebClientResource("robots.txt", string.Empty); return GetWebClientResource("robots.txt");
} }
/// <summary> /// <summary>
/// Gets a resource from the web client. /// Gets a resource from the web client.
/// </summary> /// </summary>
/// <param name="resourceName">The resource name.</param> /// <param name="resourceName">The resource name.</param>
/// <param name="v">The v.</param>
/// <response code="200">Web client returned.</response> /// <response code="200">Web client returned.</response>
/// <response code="404">Server does not host a web client.</response> /// <response code="404">Server does not host a web client.</response>
/// <returns>The resource.</returns> /// <returns>The resource.</returns>
@ -193,10 +192,7 @@ namespace Jellyfin.Api.Controllers
[ApiExplorerSettings(IgnoreApi = true)] [ApiExplorerSettings(IgnoreApi = true)]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)] [ProducesResponseType(StatusCodes.Status404NotFound)]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "v", Justification = "Imported from ServiceStack")] public ActionResult GetWebClientResource([FromRoute] string resourceName)
public ActionResult GetWebClientResource(
[FromRoute] string resourceName,
[FromQuery] string? v)
{ {
if (!_appConfig.HostWebClient() || WebClientUiPath == null) if (!_appConfig.HostWebClient() || WebClientUiPath == null)
{ {
@ -228,7 +224,7 @@ namespace Jellyfin.Api.Controllers
[ApiExplorerSettings(IgnoreApi = true)] [ApiExplorerSettings(IgnoreApi = true)]
public ActionResult GetFavIcon() public ActionResult GetFavIcon()
{ {
return GetWebClientResource("favicon.ico", string.Empty); return GetWebClientResource("favicon.ico");
} }
/// <summary> /// <summary>

@ -125,7 +125,6 @@ namespace Jellyfin.Api.Controllers
/// <param name="userId">Optional. User id.</param> /// <param name="userId">Optional. User id.</param>
/// <param name="parentId">Optional. Specify this to localize the search to a specific item or folder. Omit to use the root.</param> /// <param name="parentId">Optional. Specify this to localize the search to a specific item or folder. Omit to use the root.</param>
/// <param name="includeItemTypes">Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.</param> /// <param name="includeItemTypes">Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.</param>
/// <param name="mediaTypes">[Unused] Optional. Filter by MediaType. Allows multiple, comma delimited.</param>
/// <param name="isAiring">Optional. Is item airing.</param> /// <param name="isAiring">Optional. Is item airing.</param>
/// <param name="isMovie">Optional. Is item movie.</param> /// <param name="isMovie">Optional. Is item movie.</param>
/// <param name="isSports">Optional. Is item sports.</param> /// <param name="isSports">Optional. Is item sports.</param>
@ -137,12 +136,10 @@ namespace Jellyfin.Api.Controllers
/// <returns>Query filters.</returns> /// <returns>Query filters.</returns>
[HttpGet("/Items/Filters2")] [HttpGet("/Items/Filters2")]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "mediaTypes", Justification = "Imported from ServiceStack")]
public ActionResult<QueryFilters> GetQueryFilters( public ActionResult<QueryFilters> GetQueryFilters(
[FromQuery] Guid? userId, [FromQuery] Guid? userId,
[FromQuery] string? parentId, [FromQuery] string? parentId,
[FromQuery] string? includeItemTypes, [FromQuery] string? includeItemTypes,
[FromQuery] string? mediaTypes,
[FromQuery] bool? isAiring, [FromQuery] bool? isAiring,
[FromQuery] bool? isMovie, [FromQuery] bool? isMovie,
[FromQuery] bool? isSports, [FromQuery] bool? isSports,

@ -47,7 +47,6 @@ namespace Jellyfin.Api.Controllers
/// <param name="imageRefreshMode">(Optional) Specifies the image refresh mode.</param> /// <param name="imageRefreshMode">(Optional) Specifies the image refresh mode.</param>
/// <param name="replaceAllMetadata">(Optional) Determines if metadata should be replaced. Only applicable if mode is FullRefresh.</param> /// <param name="replaceAllMetadata">(Optional) Determines if metadata should be replaced. Only applicable if mode is FullRefresh.</param>
/// <param name="replaceAllImages">(Optional) Determines if images should be replaced. Only applicable if mode is FullRefresh.</param> /// <param name="replaceAllImages">(Optional) Determines if images should be replaced. Only applicable if mode is FullRefresh.</param>
/// <param name="recursive">(Unused) Indicates if the refresh should occur recursively.</param>
/// <response code="204">Item metadata refresh queued.</response> /// <response code="204">Item metadata refresh queued.</response>
/// <response code="404">Item to refresh not found.</response> /// <response code="404">Item to refresh not found.</response>
/// <returns>An <see cref="NoContentResult"/> on success, or a <see cref="NotFoundResult"/> if the item could not be found.</returns> /// <returns>An <see cref="NoContentResult"/> on success, or a <see cref="NotFoundResult"/> if the item could not be found.</returns>
@ -55,14 +54,12 @@ namespace Jellyfin.Api.Controllers
[Description("Refreshes metadata for an item.")] [Description("Refreshes metadata for an item.")]
[ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status404NotFound)] [ProducesResponseType(StatusCodes.Status404NotFound)]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "recursive", Justification = "Imported from ServiceStack")]
public ActionResult Post( public ActionResult Post(
[FromRoute] Guid itemId, [FromRoute] Guid itemId,
[FromQuery] MetadataRefreshMode metadataRefreshMode = MetadataRefreshMode.None, [FromQuery] MetadataRefreshMode metadataRefreshMode = MetadataRefreshMode.None,
[FromQuery] MetadataRefreshMode imageRefreshMode = MetadataRefreshMode.None, [FromQuery] MetadataRefreshMode imageRefreshMode = MetadataRefreshMode.None,
[FromQuery] bool replaceAllMetadata = false, [FromQuery] bool replaceAllMetadata = false,
[FromQuery] bool replaceAllImages = false, [FromQuery] bool replaceAllImages = false)
[FromQuery] bool recursive = false)
{ {
var item = _libraryManager.GetItemById(itemId); var item = _libraryManager.GetItemById(itemId);
if (item == null) if (item == null)

@ -120,22 +120,13 @@ namespace Jellyfin.Api.Controllers
/// <summary> /// <summary>
/// Gets critic review for an item. /// Gets critic review for an item.
/// </summary> /// </summary>
/// <param name="itemId">The item id.</param>
/// <param name="startIndex">Optional. The record index to start at. All items with a lower index will be dropped from the results.</param>
/// <param name="limit">Optional. The maximum number of records to return.</param>
/// <response code="200">Critic reviews returned.</response> /// <response code="200">Critic reviews returned.</response>
/// <returns>The list of critic reviews.</returns> /// <returns>The list of critic reviews.</returns>
[HttpGet("/Items/{itemId}/CriticReviews")] [HttpGet("/Items/{itemId}/CriticReviews")]
[Authorize(Policy = Policies.DefaultAuthorization)] [Authorize(Policy = Policies.DefaultAuthorization)]
[Obsolete("This endpoint is obsolete.")] [Obsolete("This endpoint is obsolete.")]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "itemId", Justification = "Imported from ServiceStack")]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "startIndex", Justification = "Imported from ServiceStack")]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "limit", Justification = "Imported from ServiceStack")]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
public ActionResult<QueryResult<BaseItemDto>> GetCriticReviews( public ActionResult<QueryResult<BaseItemDto>> GetCriticReviews()
[FromRoute] Guid itemId,
[FromQuery] int? startIndex,
[FromQuery] int? limit)
{ {
return new QueryResult<BaseItemDto>(); return new QueryResult<BaseItemDto>();
} }
@ -682,10 +673,6 @@ namespace Jellyfin.Api.Controllers
/// </summary> /// </summary>
/// <param name="itemId">The item id.</param> /// <param name="itemId">The item id.</param>
/// <param name="excludeArtistIds">Exclude artist ids.</param> /// <param name="excludeArtistIds">Exclude artist ids.</param>
/// <param name="enableImages">(Unused) Optional. include image information in output.</param>
/// <param name="enableUserData">(Unused) Optional. include user data.</param>
/// <param name="imageTypeLimit">(Unused) Optional. the max number of images to return, per image type.</param>
/// <param name="enableImageTypes">(Unused) Optional. The image types to include in the output.</param>
/// <param name="userId">Optional. Filter by user id, and attach user data.</param> /// <param name="userId">Optional. Filter by user id, and attach user data.</param>
/// <param name="limit">Optional. The maximum number of records to return.</param> /// <param name="limit">Optional. The maximum number of records to return.</param>
/// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.</param> /// <param name="fields">Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.</param>
@ -697,18 +684,10 @@ namespace Jellyfin.Api.Controllers
[HttpGet("/Shows/{itemId}/Similar")] [HttpGet("/Shows/{itemId}/Similar")]
[HttpGet("/Movies/{itemId}/Similar")] [HttpGet("/Movies/{itemId}/Similar")]
[HttpGet("/Trailers/{itemId}/Similar")] [HttpGet("/Trailers/{itemId}/Similar")]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "enableImages", Justification = "Imported from ServiceStack")]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "enableUserData", Justification = "Imported from ServiceStack")]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "imageTypeLimit", Justification = "Imported from ServiceStack")]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "enableImageTypes", Justification = "Imported from ServiceStack")]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
public ActionResult<QueryResult<BaseItemDto>> GetSimilarItems( public ActionResult<QueryResult<BaseItemDto>> GetSimilarItems(
[FromRoute] Guid itemId, [FromRoute] Guid itemId,
[FromQuery] string excludeArtistIds, [FromQuery] string excludeArtistIds,
[FromQuery] bool? enableImages,
[FromQuery] bool? enableUserData,
[FromQuery] int? imageTypeLimit,
[FromQuery] string enableImageTypes,
[FromQuery] Guid userId, [FromQuery] Guid userId,
[FromQuery] int? limit, [FromQuery] int? limit,
[FromQuery] string fields) [FromQuery] string fields)

@ -50,13 +50,11 @@ namespace Jellyfin.Api.Controllers
/// <summary> /// <summary>
/// Gets all virtual folders. /// Gets all virtual folders.
/// </summary> /// </summary>
/// <param name="userId">The user id.</param>
/// <response code="200">Virtual folders retrieved.</response> /// <response code="200">Virtual folders retrieved.</response>
/// <returns>An <see cref="IEnumerable{VirtualFolderInfo}"/> with the virtual folders.</returns> /// <returns>An <see cref="IEnumerable{VirtualFolderInfo}"/> with the virtual folders.</returns>
[HttpGet] [HttpGet]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "userId", Justification = "Imported from ServiceStack")] public ActionResult<IEnumerable<VirtualFolderInfo>> GetVirtualFolders()
public ActionResult<IEnumerable<VirtualFolderInfo>> GetVirtualFolders([FromQuery] string userId)
{ {
return _libraryManager.GetVirtualFolders(true); return _libraryManager.GetVirtualFolders(true);
} }

@ -36,23 +36,11 @@ namespace Jellyfin.Api.Controllers
/// <summary> /// <summary>
/// Gets a user's notifications. /// Gets a user's notifications.
/// </summary> /// </summary>
/// <param name="userId">The user's ID.</param>
/// <param name="isRead">An optional filter by notification read state.</param>
/// <param name="startIndex">The optional index to start at. All notifications with a lower index will be omitted from the results.</param>
/// <param name="limit">An optional limit on the number of notifications returned.</param>
/// <response code="200">Notifications returned.</response> /// <response code="200">Notifications returned.</response>
/// <returns>An <see cref="OkResult"/> containing a list of notifications.</returns> /// <returns>An <see cref="OkResult"/> containing a list of notifications.</returns>
[HttpGet("{userId}")] [HttpGet("{userId}")]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "userId", Justification = "Imported from ServiceStack")] public ActionResult<NotificationResultDto> GetNotifications()
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "isRead", Justification = "Imported from ServiceStack")]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "startIndex", Justification = "Imported from ServiceStack")]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "limit", Justification = "Imported from ServiceStack")]
public ActionResult<NotificationResultDto> GetNotifications(
[FromRoute] string userId,
[FromQuery] bool? isRead,
[FromQuery] int? startIndex,
[FromQuery] int? limit)
{ {
return new NotificationResultDto(); return new NotificationResultDto();
} }
@ -60,14 +48,11 @@ namespace Jellyfin.Api.Controllers
/// <summary> /// <summary>
/// Gets a user's notification summary. /// Gets a user's notification summary.
/// </summary> /// </summary>
/// <param name="userId">The user's ID.</param>
/// <response code="200">Summary of user's notifications returned.</response> /// <response code="200">Summary of user's notifications returned.</response>
/// <returns>An <cref see="OkResult"/> containing a summary of the users notifications.</returns> /// <returns>An <cref see="OkResult"/> containing a summary of the users notifications.</returns>
[HttpGet("{userId}/Summary")] [HttpGet("{userId}/Summary")]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "userId", Justification = "Imported from ServiceStack")] public ActionResult<NotificationsSummaryDto> GetNotificationsSummary()
public ActionResult<NotificationsSummaryDto> GetNotificationsSummary(
[FromRoute] string userId)
{ {
return new NotificationsSummaryDto(); return new NotificationsSummaryDto();
} }
@ -134,17 +119,11 @@ namespace Jellyfin.Api.Controllers
/// <summary> /// <summary>
/// Sets notifications as read. /// Sets notifications as read.
/// </summary> /// </summary>
/// <param name="userId">The userID.</param>
/// <param name="ids">A comma-separated list of the IDs of notifications which should be set as read.</param>
/// <response code="204">Notifications set as read.</response> /// <response code="204">Notifications set as read.</response>
/// <returns>A <cref see="NoContentResult"/>.</returns> /// <returns>A <cref see="NoContentResult"/>.</returns>
[HttpPost("{userId}/Read")] [HttpPost("{userId}/Read")]
[ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status204NoContent)]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "userId", Justification = "Imported from ServiceStack")] public ActionResult SetRead()
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "ids", Justification = "Imported from ServiceStack")]
public ActionResult SetRead(
[FromRoute] string userId,
[FromQuery] string ids)
{ {
return NoContent(); return NoContent();
} }
@ -152,17 +131,11 @@ namespace Jellyfin.Api.Controllers
/// <summary> /// <summary>
/// Sets notifications as unread. /// Sets notifications as unread.
/// </summary> /// </summary>
/// <param name="userId">The userID.</param>
/// <param name="ids">A comma-separated list of the IDs of notifications which should be set as unread.</param>
/// <response code="204">Notifications set as unread.</response> /// <response code="204">Notifications set as unread.</response>
/// <returns>A <cref see="NoContentResult"/>.</returns> /// <returns>A <cref see="NoContentResult"/>.</returns>
[HttpPost("{userId}/Unread")] [HttpPost("{userId}/Unread")]
[ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status204NoContent)]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "userId", Justification = "Imported from ServiceStack")] public ActionResult SetUnread()
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "ids", Justification = "Imported from ServiceStack")]
public ActionResult SetUnread(
[FromRoute] string userId,
[FromQuery] string ids)
{ {
return NoContent(); return NoContent();
} }

@ -42,13 +42,11 @@ namespace Jellyfin.Api.Controllers
/// <summary> /// <summary>
/// Gets a list of currently installed plugins. /// Gets a list of currently installed plugins.
/// </summary> /// </summary>
/// <param name="isAppStoreEnabled">Optional. Unused.</param>
/// <response code="200">Installed plugins returned.</response> /// <response code="200">Installed plugins returned.</response>
/// <returns>List of currently installed plugins.</returns> /// <returns>List of currently installed plugins.</returns>
[HttpGet] [HttpGet]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "isAppStoreEnabled", Justification = "Imported from ServiceStack")] public ActionResult<IEnumerable<PluginInfo>> GetPlugins()
public ActionResult<IEnumerable<PluginInfo>> GetPlugins([FromRoute] bool? isAppStoreEnabled)
{ {
return Ok(_appHost.Plugins.OrderBy(p => p.Name).Select(p => p.GetPluginInfo())); return Ok(_appHost.Plugins.OrderBy(p => p.Name).Select(p => p.GetPluginInfo()));
} }

@ -185,12 +185,10 @@ namespace Jellyfin.Api.Controllers
/// <param name="enableImageTypes">Optional. The image types to include in the output.</param> /// <param name="enableImageTypes">Optional. The image types to include in the output.</param>
/// <param name="enableUserData">Optional. Include user data.</param> /// <param name="enableUserData">Optional. Include user data.</param>
/// <param name="sortBy">Optional. Specify one or more sort orders, comma delimeted. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.</param> /// <param name="sortBy">Optional. Specify one or more sort orders, comma delimeted. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.</param>
/// <param name="sortOrder">Optional. Sort order: Ascending,Descending.</param>
/// <returns>A <see cref="QueryResult{BaseItemDto}"/> with the episodes on success or a <see cref="NotFoundResult"/> if the series was not found.</returns> /// <returns>A <see cref="QueryResult{BaseItemDto}"/> with the episodes on success or a <see cref="NotFoundResult"/> if the series was not found.</returns>
[HttpGet("{seriesId}/Episodes")] [HttpGet("{seriesId}/Episodes")]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)] [ProducesResponseType(StatusCodes.Status404NotFound)]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "sortOrder", Justification = "Imported from ServiceStack")]
public ActionResult<QueryResult<BaseItemDto>> GetEpisodes( public ActionResult<QueryResult<BaseItemDto>> GetEpisodes(
[FromRoute] string seriesId, [FromRoute] string seriesId,
[FromQuery] Guid userId, [FromQuery] Guid userId,
@ -206,8 +204,7 @@ namespace Jellyfin.Api.Controllers
[FromQuery] int? imageTypeLimit, [FromQuery] int? imageTypeLimit,
[FromQuery] string? enableImageTypes, [FromQuery] string? enableImageTypes,
[FromQuery] bool? enableUserData, [FromQuery] bool? enableUserData,
[FromQuery] string? sortBy, [FromQuery] string? sortBy)
[FromQuery] SortOrder? sortOrder)
{ {
var user = _userManager.GetUserById(userId); var user = _userManager.GetUserById(userId);

@ -68,17 +68,14 @@ namespace Jellyfin.Api.Controllers
/// </summary> /// </summary>
/// <param name="isHidden">Optional filter by IsHidden=true or false.</param> /// <param name="isHidden">Optional filter by IsHidden=true or false.</param>
/// <param name="isDisabled">Optional filter by IsDisabled=true or false.</param> /// <param name="isDisabled">Optional filter by IsDisabled=true or false.</param>
/// <param name="isGuest">Optional filter by IsGuest=true or false.</param>
/// <response code="200">Users returned.</response> /// <response code="200">Users returned.</response>
/// <returns>An <see cref="IEnumerable{UserDto}"/> containing the users.</returns> /// <returns>An <see cref="IEnumerable{UserDto}"/> containing the users.</returns>
[HttpGet] [HttpGet]
[Authorize(Policy = Policies.DefaultAuthorization)] [Authorize(Policy = Policies.DefaultAuthorization)]
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "isGuest", Justification = "Imported from ServiceStack")]
public ActionResult<IEnumerable<UserDto>> GetUsers( public ActionResult<IEnumerable<UserDto>> GetUsers(
[FromQuery] bool? isHidden, [FromQuery] bool? isHidden,
[FromQuery] bool? isDisabled, [FromQuery] bool? isDisabled)
[FromQuery] bool? isGuest)
{ {
var users = Get(isHidden, isDisabled, false, false); var users = Get(isHidden, isDisabled, false, false);
return Ok(users); return Ok(users);

Loading…
Cancel
Save