Skip to content

Rename archive Link property #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this project will be documented in this file. Take a look

* All the APIs using or returning a `Date` objects are now using a custom `Instant` type.

#### Shared

* The `Link` property key for archive-based publication assets (e.g. an EPUB/ZIP) is now `https://readium.org/webpub-manifest/properties#archive` instead of `archive`.

#### LCP

* [#493](https://github.com/readium/kotlin-toolkit/discussions/493) The LCP module does not require the Bluetooth permissions anymore to derive the device name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public data class ArchiveProperties(
}
}

private const val ARCHIVE_KEY = "archive"
private const val ARCHIVE_KEY = "https://readium.org/webpub-manifest/properties#archive"

public val Resource.Properties.archive: ArchiveProperties?
get() = (this[ARCHIVE_KEY] as? Map<*, *>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PropertiesTest {
ArchiveProperties(entryLength = 8273, isEntryCompressed = true),
Resource.Properties(
mapOf(
"archive" to mapOf(
"https://readium.org/webpub-manifest/properties#archive" to mapOf(
"entryLength" to 8273,
"isEntryCompressed" to true
)
Expand All @@ -38,7 +38,7 @@ class PropertiesTest {
assertNull(
Resource.Properties(
mapOf(
"archive" to mapOf(
"https://readium.org/webpub-manifest/properties#archive" to mapOf(
"foo" to "bar"
)
)
Expand All @@ -51,7 +51,7 @@ class PropertiesTest {
assertNull(
Resource.Properties(
mapOf(
"archive" to mapOf(
"https://readium.org/webpub-manifest/properties#archive" to mapOf(
"isEntryCompressed" to true
)
)
Expand All @@ -61,7 +61,7 @@ class PropertiesTest {
assertNull(
Resource.Properties(
mapOf(
"archive" to mapOf(
"https://readium.org/webpub-manifest/properties#archive" to mapOf(
"entryLength" to 8273
)
)
Expand Down
Loading