Fix wrong status at completed titles. (#3432)
This commit is contained in:
parent
2f0e88d18c
commit
2d5e12b768
|
@ -6,7 +6,7 @@ ext {
|
||||||
appName = 'Tachiyomi: MANGA Plus by SHUEISHA'
|
appName = 'Tachiyomi: MANGA Plus by SHUEISHA'
|
||||||
pkgNameSuffix = 'all.mangaplus'
|
pkgNameSuffix = 'all.mangaplus'
|
||||||
extClass = '.MangaPlusFactory'
|
extClass = '.MangaPlusFactory'
|
||||||
extVersionCode = 7
|
extVersionCode = 8
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -193,12 +193,13 @@ abstract class MangaPlus(
|
||||||
|
|
||||||
val details = result.success.titleDetailView!!
|
val details = result.success.titleDetailView!!
|
||||||
val title = details.title
|
val title = details.title
|
||||||
|
val isCompleted = details.nonAppearanceInfo.contains(COMPLETE_REGEX)
|
||||||
|
|
||||||
return SManga.create().apply {
|
return SManga.create().apply {
|
||||||
author = title.author
|
author = title.author
|
||||||
artist = title.author
|
artist = title.author
|
||||||
description = details.overview + "\n\n" + details.viewingPeriodDescription
|
description = details.overview + "\n\n" + details.viewingPeriodDescription
|
||||||
status = SManga.ONGOING
|
status = if (isCompleted) SManga.COMPLETED else SManga.ONGOING
|
||||||
thumbnail_url = title.portraitImageUrl.toWeservUrl()
|
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_TITLE = "Split double pages"
|
||||||
private const val SPLIT_PREF_SUMMARY = "Not all titles support disabling this."
|
private const val SPLIT_PREF_SUMMARY = "Not all titles support disabling this."
|
||||||
private const val SPLIT_PREF_DEFAULT_VALUE = true
|
private const val SPLIT_PREF_DEFAULT_VALUE = true
|
||||||
|
|
||||||
|
private val COMPLETE_REGEX = "completado|complete".toRegex()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,7 @@ data class TitleDetailView(
|
||||||
@ProtoId(5) val nextTimeStamp: Int = 0,
|
@ProtoId(5) val nextTimeStamp: Int = 0,
|
||||||
@ProtoId(6) val updateTiming: UpdateTiming? = UpdateTiming.DAY,
|
@ProtoId(6) val updateTiming: UpdateTiming? = UpdateTiming.DAY,
|
||||||
@ProtoId(7) val viewingPeriodDescription: String = "",
|
@ProtoId(7) val viewingPeriodDescription: String = "",
|
||||||
|
@ProtoId(8) val nonAppearanceInfo: String = "",
|
||||||
@ProtoId(9) val firstChapterList: List<Chapter> = emptyList(),
|
@ProtoId(9) val firstChapterList: List<Chapter> = emptyList(),
|
||||||
@ProtoId(10) val lastChapterList: List<Chapter> = emptyList(),
|
@ProtoId(10) val lastChapterList: List<Chapter> = emptyList(),
|
||||||
@ProtoId(14) val isSimulReleased: Boolean = true,
|
@ProtoId(14) val isSimulReleased: Boolean = true,
|
||||||
|
|
Loading…
Reference in New Issue