Add Batoto Scanlator to Chapter view (#789)

* Added scanlator for Batoto on chapter list

* adjusted item_chapter layout for scanlator
adjusted so db chapters get updated if scanlator does not match source scanlator

* adjusted item_chapter layout for scanlator
adjusted chapter holder to dynamically set title max lines depending on if scanlator exists

* fixed excess blank line

* changed scanlator to be instantiated instead lateint to prevent toast message erro when viewing chapters by catalog

* changed item_chapter.xml to constraint layout

* removed accidental changes to catalog

* cleaned up code.

* fixed issue where long title was running into 3 dot menu
fixed issue where no scanlator for manga was causing date to not be bottom lined
fixed general chapter layout to be more similar to existing

* allow scanlator to be null

* fixed merge issue

* fixed merge issue

* attempt to fix whitespace carriage return issue

* attempt to fix whitespace carriage return issue

* attempt to fix whitespace carriage return issue
This commit is contained in:
Carlos
2017-08-15 09:05:41 -04:00
committed by inorichi
parent b79855c01d
commit a12a34e3bb
9 changed files with 124 additions and 92 deletions

View File

@@ -12,11 +12,14 @@ interface SChapter : Serializable {
var chapter_number: Float
var scanlator: String?
fun copyFrom(other: SChapter) {
name = other.name
url = other.url
date_upload = other.date_upload
chapter_number = other.chapter_number
scanlator = other.scanlator
}
companion object {

View File

@@ -10,4 +10,6 @@ class SChapterImpl : SChapter {
override var chapter_number: Float = -1f
override var scanlator: String? = null
}

View File

@@ -197,6 +197,7 @@ class Batoto : ParsedHttpSource(), LoginSource {
chapter.date_upload = element.select("td").getOrNull(4)?.let {
parseDateFromElement(it)
} ?: 0
chapter.scanlator = element.select("td").getOrNull(2)?.text()
return chapter
}