Fix wrong status at completed titles. (#3432)

This commit is contained in:
Alessandro Jean 2020-06-07 13:27:49 -03:00 committed by GitHub
parent 2f0e88d18c
commit 2d5e12b768
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 25 deletions

View File

@ -6,7 +6,7 @@ ext {
appName = 'Tachiyomi: MANGA Plus by SHUEISHA'
pkgNameSuffix = 'all.mangaplus'
extClass = '.MangaPlusFactory'
extVersionCode = 7
extVersionCode = 8
libVersion = '1.2'
}

View File

@ -193,12 +193,13 @@ abstract class MangaPlus(
val details = result.success.titleDetailView!!
val title = details.title
val isCompleted = details.nonAppearanceInfo.contains(COMPLETE_REGEX)
return SManga.create().apply {
author = title.author
artist = title.author
description = details.overview + "\n\n" + details.viewingPeriodDescription
status = SManga.ONGOING
status = if (isCompleted) SManga.COMPLETED else SManga.ONGOING
thumbnail_url = title.portraitImageUrl.toWeservUrl()
}
}
@ -445,5 +446,7 @@ abstract class MangaPlus(
private const val SPLIT_PREF_TITLE = "Split double pages"
private const val SPLIT_PREF_SUMMARY = "Not all titles support disabling this."
private const val SPLIT_PREF_DEFAULT_VALUE = true
private val COMPLETE_REGEX = "completado|complete".toRegex()
}
}

View File

@ -57,6 +57,7 @@ data class TitleDetailView(
@ProtoId(5) val nextTimeStamp: Int = 0,
@ProtoId(6) val updateTiming: UpdateTiming? = UpdateTiming.DAY,
@ProtoId(7) val viewingPeriodDescription: String = "",
@ProtoId(8) val nonAppearanceInfo: String = "",
@ProtoId(9) val firstChapterList: List<Chapter> = emptyList(),
@ProtoId(10) val lastChapterList: List<Chapter> = emptyList(),
@ProtoId(14) val isSimulReleased: Boolean = true,