diff --git a/custom-metadata-provider-specification.yaml b/custom-metadata-provider-specification.yaml index 71cbba23a..a0ec172ae 100644 --- a/custom-metadata-provider-specification.yaml +++ b/custom-metadata-provider-specification.yaml @@ -127,7 +127,7 @@ components: duration: type: integer format: int64 - description: Duration in seconds + description: Duration in minutes SeriesMetadata: type: object diff --git a/server/models/User.js b/server/models/User.js index 36b2eca98..936efde13 100644 --- a/server/models/User.js +++ b/server/models/User.js @@ -782,7 +782,14 @@ class User extends Model { error: 'Library item not found', statusCode: 404 } + } else if (libraryItem.mediaType !== 'book') { + Logger.error(`[User] createUpdateMediaProgress: library item ${progressPayload.libraryItemId} is not a book`) + return { + error: 'Library item is not a book', + statusCode: 400 + } } + mediaItemId = libraryItem.media.id mediaProgress = libraryItem.media.mediaProgresses?.[0] }