add several extensions to ResultData: authors, froms, charactersList, titles

This commit is contained in:
2021-09-21 14:47:40 +06:00
parent 64109735f8
commit b5ceff32bd
2 changed files with 13 additions and 0 deletions

View File

@@ -159,3 +159,15 @@ data class ResultData(
@SerialName("ext_urls")
val extUrls: List<String> = emptyList()
)
val ResultData.froms: List<String>
get() = material ?.split(", ") ?: emptyList()
val ResultData.authors: List<String>
get() = creator ?.split(", ") ?: emptyList()
val ResultData.charactersList: List<String>
get() = characters ?.split(", ") ?: emptyList()
val ResultData.titles: List<String>
get() = title ?.split(", ") ?: emptyList()