Skip to content

Commit

Permalink
Fix sniffing media types when acquiring an LCP publication (readium#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
mickael-menu authored May 15, 2024
1 parent 5ee94a2 commit a91e76f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ internal class LicensesService(

Timber.i("LCP destination $destination")

val mediaType = network.download(
val serverMediaType = network.download(
url,
destination,
mediaType = link.mediaType,
Expand All @@ -173,8 +173,7 @@ internal class LicensesService(
destination,
FormatHints(
mediaTypes = listOfNotNull(
license.publicationLink.mediaType,
mediaType
license.publicationLink.mediaType ?: serverMediaType
)
)
).getOrElse {
Expand Down

0 comments on commit a91e76f

Please sign in to comment.