SDK 5.0 took copy away from its classes and the book reader's own classes out of the SDK, so later SDK releases can add properties without breaking the extensions built before them. Katari no longer loads extensions built with SDK 4.x. Every extension needs a rebuild, and one that copies the SDK's values needs a code change.
The SDK's value classes, such as VideoStream, PlaybackSelection, EntryMedia.Book,
BookSourceResource and EntryFilter.Sort.Selection, are no longer data classes. They still compare by
their properties and print them, but have no copy. Build a new one with the constructor instead, and pass every
property you want to keep: one you leave out takes its default. More in
Links found later.
Kotlin
return stream.copy( request = VideoRequest(playlist), type = VideoStreamType.HLS,)return VideoStream( request = VideoRequest(playlist), label = stream.label, type = VideoStreamType.HLS,)
No destructuring
They have no component1() and so on either, so read the properties by name.
Kotlin
val (index, ascending) = filter.state ?: returnval selection = filter.state ?: returnval index = selection.indexval ascending = selection.ascending
The book reader's classes left the SDK
The packages app.katari.book.api.document and app.katari.book.api.model are gone, and so are
BookLocator, BookPublication, BookFailure, BookContentResource and the classes
that went with them. They were Katari's own book reader model, and no SDK call takes or returns them. A book source still hands
Katari HTML or EPUB, and BookContentDescriptor, BookResourceAvailability and
BookCatalogCoverage stay in app.katari.book.api. More in
Books.