mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2025-12-23 18:29:19 -05:00
fix(musicapi): fixed similar and discography api endpoints
This commit is contained in:
123
seerr-api.yml
123
seerr-api.yml
@@ -7605,6 +7605,129 @@ paths:
|
||||
type: integer
|
||||
message:
|
||||
type: string
|
||||
/music/{mbId}/artist-discography:
|
||||
get:
|
||||
summary: Get artist discography
|
||||
description: Returns a paginated list of release groups for the album's primary artist.
|
||||
tags:
|
||||
- music
|
||||
parameters:
|
||||
- in: path
|
||||
name: mbId
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: page
|
||||
schema:
|
||||
type: number
|
||||
default: 1
|
||||
- in: query
|
||||
name: pageSize
|
||||
schema:
|
||||
type: number
|
||||
default: 20
|
||||
- in: query
|
||||
name: slider
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
responses:
|
||||
'200':
|
||||
description: Artist discography
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
page:
|
||||
type: number
|
||||
totalPages:
|
||||
type: number
|
||||
totalResults:
|
||||
type: number
|
||||
results:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
title:
|
||||
type: string
|
||||
primary-type:
|
||||
type: string
|
||||
posterPath:
|
||||
type: string
|
||||
nullable: true
|
||||
needsCoverArt:
|
||||
type: boolean
|
||||
mediaInfo:
|
||||
type: object
|
||||
nullable: true
|
||||
'404':
|
||||
description: Artist not found
|
||||
'500':
|
||||
description: Internal server error
|
||||
/music/{mbId}/artist-similar:
|
||||
get:
|
||||
summary: Get similar artists
|
||||
description: Returns a paginated list of similar artists for the album's primary artist.
|
||||
tags:
|
||||
- music
|
||||
parameters:
|
||||
- in: path
|
||||
name: mbId
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: page
|
||||
schema:
|
||||
type: number
|
||||
default: 1
|
||||
- in: query
|
||||
name: pageSize
|
||||
schema:
|
||||
type: number
|
||||
default: 20
|
||||
responses:
|
||||
'200':
|
||||
description: Similar artists
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
results:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
artistThumb:
|
||||
type: string
|
||||
nullable: true
|
||||
score:
|
||||
type: number
|
||||
tmdbPersonId:
|
||||
type: number
|
||||
nullable: true
|
||||
page:
|
||||
type: number
|
||||
totalPages:
|
||||
type: number
|
||||
totalResults:
|
||||
type: number
|
||||
'404':
|
||||
description: Artist not found
|
||||
'500':
|
||||
description: Internal server error
|
||||
/media:
|
||||
get:
|
||||
summary: Get media
|
||||
|
||||
@@ -351,13 +351,10 @@ musicRoutes.get('/:id/artist-discography', async (req, res, next) => {
|
||||
);
|
||||
|
||||
return res.status(200).json({
|
||||
releaseGroups: transformedReleaseGroups,
|
||||
pagination: {
|
||||
page,
|
||||
pageSize,
|
||||
totalItems: totalReleaseGroups,
|
||||
totalPages: Math.ceil(totalReleaseGroups / pageSize),
|
||||
},
|
||||
page,
|
||||
totalPages: Math.ceil(totalReleaseGroups / pageSize),
|
||||
totalResults: totalReleaseGroups,
|
||||
results: transformedReleaseGroups,
|
||||
});
|
||||
} catch (error) {
|
||||
logger.error('Something went wrong retrieving artist discography', {
|
||||
|
||||
Reference in New Issue
Block a user