File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
readium/lcp/src/main/java/org/readium/r2/lcp Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ import org.readium.r2.shared.util.Try
29
29
import org.readium.r2.shared.util.asset.Asset
30
30
import org.readium.r2.shared.util.asset.AssetRetriever
31
31
import org.readium.r2.shared.util.format.Format
32
- import org.readium.r2.shared.util.mediatype.MediaType
33
32
34
33
/* *
35
34
* Service used to acquire and open publications protected with LCP.
@@ -126,8 +125,7 @@ public interface LcpService {
126
125
*/
127
126
public suspend fun injectLicenseDocument (
128
127
licenseDocument : LicenseDocument ,
129
- publicationFile : File ,
130
- mediaType : MediaType ? = null
128
+ publicationFile : File
131
129
): Try <Unit , LcpError >
132
130
133
131
/* *
Original file line number Diff line number Diff line change @@ -68,9 +68,9 @@ internal class LicensesService(
68
68
69
69
override suspend fun injectLicenseDocument (
70
70
licenseDocument : LicenseDocument ,
71
- publicationFile : File ,
72
- mediaType : MediaType ?
71
+ publicationFile : File
73
72
): Try <Unit , LcpError > {
73
+ val mediaType = licenseDocument.publicationLink.mediaType
74
74
val format = assetRetriever.sniffFormat(publicationFile, FormatHints (mediaType))
75
75
.getOrElse {
76
76
Format (
You can’t perform that action at this time.
0 commit comments