Minor fixes for MangaPlus extension (#3534)

* Minor fixes for MangaPlus extension.

* Change the id overriding to the factory.

* Remove unnecessary id overriding.

* Remove outdated comment.
This commit is contained in:
Alessandro Jean 2020-06-14 15:25:59 -03:00 committed by GitHub
parent e5a55452d2
commit d9309d4b08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 6 deletions

View File

@ -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 = 8 extVersionCode = 9
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -40,7 +40,7 @@ abstract class MangaPlus(
private val langCode: Language private val langCode: Language
) : HttpSource(), ConfigurableSource { ) : HttpSource(), ConfigurableSource {
override val name = "Manga Plus by Shueisha" override val name = "MANGA Plus by SHUEISHA"
override val baseUrl = "https://mangaplus.shueisha.co.jp" override val baseUrl = "https://mangaplus.shueisha.co.jp"
@ -196,8 +196,8 @@ abstract class MangaPlus(
val isCompleted = details.nonAppearanceInfo.contains(COMPLETE_REGEX) val isCompleted = details.nonAppearanceInfo.contains(COMPLETE_REGEX)
return SManga.create().apply { return SManga.create().apply {
author = title.author author = title.author.replace(" / ", ", ")
artist = title.author artist = author
description = details.overview + "\n\n" + details.viewingPeriodDescription description = details.overview + "\n\n" + details.viewingPeriodDescription
status = if (isCompleted) SManga.COMPLETED else SManga.ONGOING status = if (isCompleted) SManga.COMPLETED else SManga.ONGOING
thumbnail_url = title.portraitImageUrl.toWeservUrl() thumbnail_url = title.portraitImageUrl.toWeservUrl()

View File

@ -76,7 +76,7 @@ data class Title(
@ProtoId(3) val author: String, @ProtoId(3) val author: String,
@ProtoId(4) val portraitImageUrl: String, @ProtoId(4) val portraitImageUrl: String,
@ProtoId(5) val landscapeImageUrl: String, @ProtoId(5) val landscapeImageUrl: String,
@ProtoId(6) val viewCount: Int, @ProtoId(6) val viewCount: Int = 0,
@ProtoId(7) val language: Language? = Language.ENGLISH @ProtoId(7) val language: Language? = Language.ENGLISH
) )
@ -189,6 +189,7 @@ const val DECODE_SCRIPT: String = """
.add(new Field("nextTimeStamp", 5, "uint32")) .add(new Field("nextTimeStamp", 5, "uint32"))
.add(new Field("updateTiming", 6, "UpdateTiming")) .add(new Field("updateTiming", 6, "UpdateTiming"))
.add(new Field("viewingPeriodDescription", 7, "string")) .add(new Field("viewingPeriodDescription", 7, "string"))
.add(new Field("nonAppearanceInfo", 8, "string", {"default": ""}))
.add(new Field("firstChapterList", 9, "Chapter", "repeated")) .add(new Field("firstChapterList", 9, "Chapter", "repeated"))
.add(new Field("lastChapterList", 10, "Chapter", "repeated")) .add(new Field("lastChapterList", 10, "Chapter", "repeated"))
.add(new Field("isSimulReleased", 14, "bool")) .add(new Field("isSimulReleased", 14, "bool"))
@ -214,7 +215,7 @@ const val DECODE_SCRIPT: String = """
.add(new Field("author", 3, "string")) .add(new Field("author", 3, "string"))
.add(new Field("portraitImageUrl", 4, "string")) .add(new Field("portraitImageUrl", 4, "string"))
.add(new Field("landscapeImageUrl", 5, "string")) .add(new Field("landscapeImageUrl", 5, "string"))
.add(new Field("viewCount", 6, "uint32")) .add(new Field("viewCount", 6, "uint32", {"default": 0}))
.add(new Field("language", 7, "Language", {"default": 0})); .add(new Field("language", 7, "Language", {"default": 0}));
var Language = new Enum("Language") var Language = new Enum("Language")