Show AniList publishing type based on country of origin (#3100)

This commit is contained in:
Ananda Umamil
2026-04-09 08:45:59 +07:00
committed by GitHub
parent ed3b5305f1
commit 378e734eed
3 changed files with 12 additions and 1 deletions
@@ -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,