migrate Crunchyroll.objects() to new v2 endpoint

fixes #71
This commit is contained in:
2023-07-21 11:39:48 +02:00
parent c89ae54929
commit 3549a3d2a7
4 changed files with 19 additions and 11 deletions

View File

@ -42,6 +42,12 @@ fun Collection<Item>.toItemMediaList(): List<ItemMedia> {
}
}
fun Collection2<Item>.toItemMediaList(): List<ItemMedia> {
return this.data.map {
ItemMedia(it.id, it.title, it.images.poster_wide[0][0].source)
}
}
@JvmName("toItemMediaListItem")
fun List<Item>.toItemMediaList(): List<ItemMedia> {
return this.map {