diff --git a/seerr-api.yml b/seerr-api.yml index 46584df1..ffc6fe77 100644 --- a/seerr-api.yml +++ b/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 diff --git a/server/routes/music.ts b/server/routes/music.ts index 28aefcb5..def8616c 100644 --- a/server/routes/music.ts +++ b/server/routes/music.ts @@ -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', {