Show AniList publishing type based on country of origin (#3100)
This commit is contained in:
@@ -160,6 +160,7 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) {
|
||||
|large
|
||||
|}
|
||||
|format
|
||||
|countryOfOrigin
|
||||
|status
|
||||
|chapters
|
||||
|description
|
||||
|
||||
@@ -9,6 +9,7 @@ data class ALSearchItem(
|
||||
val coverImage: ItemCover,
|
||||
val description: String?,
|
||||
val format: String,
|
||||
val countryOfOrigin: String,
|
||||
val status: String?,
|
||||
val startDate: ALFuzzyDate,
|
||||
val chapters: Long?,
|
||||
@@ -20,7 +21,15 @@ data class ALSearchItem(
|
||||
title = title.userPreferred,
|
||||
imageUrl = coverImage.large,
|
||||
description = description,
|
||||
format = format.replace("_", "-"),
|
||||
format = if (format != "MANGA") {
|
||||
format.replace("_", "-")
|
||||
} else {
|
||||
when (countryOfOrigin) {
|
||||
"KR" -> "Manhwa"
|
||||
"CN", "TW" -> "Manhua"
|
||||
else -> "Manga"
|
||||
}
|
||||
},
|
||||
publishingStatus = status ?: "",
|
||||
startDateFuzzy = startDate.toEpochMilli(),
|
||||
totalChapters = chapters ?: 0,
|
||||
|
||||
Reference in New Issue
Block a user