|
@@ -87,7 +87,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// Creates an instant playlist based on a given song.
|
|
|
+ /// Creates an instant playlist based on a given album.
|
|
|
/// </summary>
|
|
|
/// <param name="id">The item id.</param>
|
|
|
/// <param name="userId">Optional. Filter by user id, and attach user data.</param>
|
|
@@ -123,7 +123,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// Creates an instant playlist based on a given song.
|
|
|
+ /// Creates an instant playlist based on a given playlist.
|
|
|
/// </summary>
|
|
|
/// <param name="id">The item id.</param>
|
|
|
/// <param name="userId">Optional. Filter by user id, and attach user data.</param>
|
|
@@ -159,7 +159,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// Creates an instant playlist based on a given song.
|
|
|
+ /// Creates an instant playlist based on a given genre.
|
|
|
/// </summary>
|
|
|
/// <param name="name">The genre name.</param>
|
|
|
/// <param name="userId">Optional. Filter by user id, and attach user data.</param>
|
|
@@ -173,7 +173,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
/// <returns>A <see cref="QueryResult{BaseItemDto}"/> with the playlist items.</returns>
|
|
|
[HttpGet("MusicGenres/{name}/InstantMix")]
|
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
|
- public ActionResult<QueryResult<BaseItemDto>> GetInstantMixFromMusicGenre(
|
|
|
+ public ActionResult<QueryResult<BaseItemDto>> GetInstantMixFromMusicGenreByName(
|
|
|
[FromRoute, Required] string name,
|
|
|
[FromQuery] Guid? userId,
|
|
|
[FromQuery] int? limit,
|
|
@@ -194,7 +194,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// Creates an instant playlist based on a given song.
|
|
|
+ /// Creates an instant playlist based on a given artist.
|
|
|
/// </summary>
|
|
|
/// <param name="id">The item id.</param>
|
|
|
/// <param name="userId">Optional. Filter by user id, and attach user data.</param>
|
|
@@ -230,7 +230,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// Creates an instant playlist based on a given song.
|
|
|
+ /// Creates an instant playlist based on a given genre.
|
|
|
/// </summary>
|
|
|
/// <param name="id">The item id.</param>
|
|
|
/// <param name="userId">Optional. Filter by user id, and attach user data.</param>
|
|
@@ -244,7 +244,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
/// <returns>A <see cref="QueryResult{BaseItemDto}"/> with the playlist items.</returns>
|
|
|
[HttpGet("MusicGenres/{id}/InstantMix")]
|
|
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
|
- public ActionResult<QueryResult<BaseItemDto>> GetInstantMixFromMusicGenres(
|
|
|
+ public ActionResult<QueryResult<BaseItemDto>> GetInstantMixFromMusicGenreById(
|
|
|
[FromRoute, Required] Guid id,
|
|
|
[FromQuery] Guid? userId,
|
|
|
[FromQuery] int? limit,
|
|
@@ -266,7 +266,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// Creates an instant playlist based on a given song.
|
|
|
+ /// Creates an instant playlist based on a given item.
|
|
|
/// </summary>
|
|
|
/// <param name="id">The item id.</param>
|
|
|
/// <param name="userId">Optional. Filter by user id, and attach user data.</param>
|
|
@@ -301,6 +301,80 @@ namespace Jellyfin.Api.Controllers
|
|
|
return GetResult(items, user, limit, dtoOptions);
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// Creates an instant playlist based on a given artist.
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="id">The item id.</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="fields">Optional. Specify additional fields of information to return in the output.</param>
|
|
|
+ /// <param name="enableImages">Optional. Include image information in output.</param>
|
|
|
+ /// <param name="enableUserData">Optional. Include user data.</param>
|
|
|
+ /// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>
|
|
|
+ /// <param name="enableImageTypes">Optional. The image types to include in the output.</param>
|
|
|
+ /// <response code="200">Instant playlist returned.</response>
|
|
|
+ /// <returns>A <see cref="QueryResult{BaseItemDto}"/> with the playlist items.</returns>
|
|
|
+ [HttpGet("Artists/InstantMix")]
|
|
|
+ [ProducesResponseType(StatusCodes.Status200OK)]
|
|
|
+ [Obsolete("Use GetInstantMixFromArtists")]
|
|
|
+ public ActionResult<QueryResult<BaseItemDto>> GetInstantMixFromArtists2(
|
|
|
+ [FromQuery, Required] Guid id,
|
|
|
+ [FromQuery] Guid? userId,
|
|
|
+ [FromQuery] int? limit,
|
|
|
+ [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ItemFields[] fields,
|
|
|
+ [FromQuery] bool? enableImages,
|
|
|
+ [FromQuery] bool? enableUserData,
|
|
|
+ [FromQuery] int? imageTypeLimit,
|
|
|
+ [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ImageType[] enableImageTypes)
|
|
|
+ {
|
|
|
+ return GetInstantMixFromArtists(
|
|
|
+ id,
|
|
|
+ userId,
|
|
|
+ limit,
|
|
|
+ fields,
|
|
|
+ enableImages,
|
|
|
+ enableUserData,
|
|
|
+ imageTypeLimit,
|
|
|
+ enableImageTypes);
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// Creates an instant playlist based on a given genre.
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="id">The item id.</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="fields">Optional. Specify additional fields of information to return in the output.</param>
|
|
|
+ /// <param name="enableImages">Optional. Include image information in output.</param>
|
|
|
+ /// <param name="enableUserData">Optional. Include user data.</param>
|
|
|
+ /// <param name="imageTypeLimit">Optional. The max number of images to return, per image type.</param>
|
|
|
+ /// <param name="enableImageTypes">Optional. The image types to include in the output.</param>
|
|
|
+ /// <response code="200">Instant playlist returned.</response>
|
|
|
+ /// <returns>A <see cref="QueryResult{BaseItemDto}"/> with the playlist items.</returns>
|
|
|
+ [HttpGet("MusicGenres/InstantMix")]
|
|
|
+ [ProducesResponseType(StatusCodes.Status200OK)]
|
|
|
+ [Obsolete("Use GetInstantMixFromMusicGenres instead")]
|
|
|
+ public ActionResult<QueryResult<BaseItemDto>> GetInstantMixFromMusicGenreById2(
|
|
|
+ [FromQuery, Required] Guid id,
|
|
|
+ [FromQuery] Guid? userId,
|
|
|
+ [FromQuery] int? limit,
|
|
|
+ [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ItemFields[] fields,
|
|
|
+ [FromQuery] bool? enableImages,
|
|
|
+ [FromQuery] bool? enableUserData,
|
|
|
+ [FromQuery] int? imageTypeLimit,
|
|
|
+ [FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ImageType[] enableImageTypes)
|
|
|
+ {
|
|
|
+ return GetInstantMixFromMusicGenreById(
|
|
|
+ id,
|
|
|
+ userId,
|
|
|
+ limit,
|
|
|
+ fields,
|
|
|
+ enableImages,
|
|
|
+ enableUserData,
|
|
|
+ imageTypeLimit,
|
|
|
+ enableImageTypes);
|
|
|
+ }
|
|
|
+
|
|
|
private QueryResult<BaseItemDto> GetResult(List<BaseItem> items, User? user, int? limit, DtoOptions dtoOptions)
|
|
|
{
|
|
|
var list = items;
|