Show AniList publishing type based on country of origin (#3100)
This commit is contained in:
@@ -17,6 +17,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
|
||||
|
||||
### Improved
|
||||
- Show informative error when trying to add unapproved titles to list on MAL ([@MajorTanya](https://github.com/MajorTanya)) ([#3155](https://github.com/mihonapp/mihon/pull/3155))
|
||||
- Show AniList publishing type based on country of origin ([@zweimach](https://github.com/zweimach)) ([#3100](https://github.com/mihonapp/mihon/pull/3100))
|
||||
|
||||
### Fixed
|
||||
- Fix app trying to split long strip when not needed ([@leodyversemilla07](https://github.com/leodyversemilla07)) ([#3121](https://github.com/mihonapp/mihon/pull/3121))
|
||||
|
||||
@@ -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