From d06da572b64caca6fbed00606c6aae73fa8c40f8 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Fri, 20 Mar 2020 21:17:27 +0800 Subject: [PATCH] fix(opds): display book metadata title instead of name --- .../kotlin/org/gotson/komga/interfaces/opds/OpdsController.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/OpdsController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/OpdsController.kt index 275c2b684..aef1a74f8 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/OpdsController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/opds/OpdsController.kt @@ -251,10 +251,10 @@ class OpdsController( private fun Book.toOpdsEntry() = OpdsEntryAcquisition( - title = name, + title = metadata.title, updated = lastModifiedDate?.atZone(ZoneId.systemDefault()) ?: ZonedDateTime.now(), id = id.toString(), - content = "$name (${fileExtension().toUpperCase()}) (${fileSizeHumanReadable()})", + content = "${metadata.title} (${fileExtension().toUpperCase()}) (${fileSizeHumanReadable()})", links = listOf( OpdsLinkImageThumbnail("image/jpeg", "${ROUTE_BASE}books/$id/thumbnail"), OpdsLinkImage(media.pages[0].mediaType, "${ROUTE_BASE}books/$id/pages/1"),