From 4cfb61f7859bc2edbea64fed0bae9592f6c4aca0 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Sun, 13 Oct 2019 17:10:38 +0800 Subject: [PATCH] Revert "mark OPDS mediaType as application/octet-stream unless it's a pdf file (should fix some OPDS clients not seeing archives)" This doesn't solve issues on OPDS readers :( This reverts commit 2c642fdd --- .../kotlin/org/gotson/komga/interfaces/web/opds/dto/OpdsLink.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/web/opds/dto/OpdsLink.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/web/opds/dto/OpdsLink.kt index 8835ff6ba..af2830dee 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/web/opds/dto/OpdsLink.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/web/opds/dto/OpdsLink.kt @@ -44,7 +44,7 @@ class OpdsLinkImageThumbnail(mediaType: String, href: String) : OpdsLink( @JsonSerialize(`as` = OpdsLink::class) class OpdsLinkFileAcquisition(mediaType: String?, href: String) : OpdsLink( - type = if (mediaType == "application/pdf") mediaType else "application/octet-stream", + type = mediaType ?: "application/octet-stream", rel = "http://opds-spec.org/acquisition", href = href )