fix sorting for boredom society (#683)
This commit is contained in:
parent
bac1926e29
commit
6f35fc4c60
@ -5,7 +5,7 @@ ext {
|
|||||||
appName = 'Tachiyomi: Boredom Society'
|
appName = 'Tachiyomi: Boredom Society'
|
||||||
pkgNameSuffix = 'en.boredomsociety'
|
pkgNameSuffix = 'en.boredomsociety'
|
||||||
extClass = '.BoredomSociety'
|
extClass = '.BoredomSociety'
|
||||||
extVersionCode = 1
|
extVersionCode = 2
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
src/en/boredsociety/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
src/en/boredsociety/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
src/en/boredsociety/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
src/en/boredsociety/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
src/en/boredsociety/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
src/en/boredsociety/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
BIN
src/en/boredsociety/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
src/en/boredsociety/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
BIN
src/en/boredsociety/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
src/en/boredsociety/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.3 KiB |
BIN
src/en/boredsociety/res/web_hi_res_512.png
Normal file
BIN
src/en/boredsociety/res/web_hi_res_512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
@ -63,7 +63,7 @@ class BoredomSociety : ParsedHttpSource() {
|
|||||||
|
|
||||||
override fun latestUpdatesParse(response: Response): MangasPage {
|
override fun latestUpdatesParse(response: Response): MangasPage {
|
||||||
val jsonArray = getJsonArray(response)
|
val jsonArray = getJsonArray(response)
|
||||||
val sortedJson = jsonArray.sortedBy { it["last_updated"].long }
|
val sortedJson = jsonArray.sortedBy { it["last_updated"].long }.asReversed()
|
||||||
val list = parseData(sortedJson)
|
val list = parseData(sortedJson)
|
||||||
return MangasPage(list, false)
|
return MangasPage(list, false)
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ class BoredomSociety : ParsedHttpSource() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun parseData(jsonArray: List<JsonElement>): List<SManga> {
|
private fun parseData(jsonArray: List<JsonElement>): List<SManga> {
|
||||||
var mutableList = mutableListOf<SManga>()
|
val mutableList = mutableListOf<SManga>()
|
||||||
jsonArray.forEach { json ->
|
jsonArray.forEach { json ->
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
manga.url = MANGA_URL + json["id"].string
|
manga.url = MANGA_URL + json["id"].string
|
||||||
@ -92,7 +92,6 @@ class BoredomSociety : ParsedHttpSource() {
|
|||||||
private fun parseChapter(jsonElement: JsonElement): SChapter {
|
private fun parseChapter(jsonElement: JsonElement): SChapter {
|
||||||
val sChapter = SChapter.create()
|
val sChapter = SChapter.create()
|
||||||
sChapter.url = CHAPTER_URL + jsonElement["id"].string
|
sChapter.url = CHAPTER_URL + jsonElement["id"].string
|
||||||
sChapter.date_upload = jsonElement["creation_timestamp"].long * 1000
|
|
||||||
val chapterName = mutableListOf<String>()
|
val chapterName = mutableListOf<String>()
|
||||||
|
|
||||||
if (!jsonElement["chapter_name"].string.startsWith("Chapter", true)) {
|
if (!jsonElement["chapter_name"].string.startsWith("Chapter", true)) {
|
||||||
@ -105,6 +104,7 @@ class BoredomSociety : ParsedHttpSource() {
|
|||||||
}
|
}
|
||||||
chapterName.add(jsonElement["chapter_name"].string)
|
chapterName.add(jsonElement["chapter_name"].string)
|
||||||
sChapter.name = cleanString(chapterName.joinToString(" "))
|
sChapter.name = cleanString(chapterName.joinToString(" "))
|
||||||
|
sChapter.date_upload = jsonElement["creation_timestamp"].long * 1000
|
||||||
return sChapter
|
return sChapter
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,6 +148,7 @@ class BoredomSociety : ParsedHttpSource() {
|
|||||||
json["chapters"].asJsonArray.forEach { it ->
|
json["chapters"].asJsonArray.forEach { it ->
|
||||||
mutableChapters.add(parseChapter(it))
|
mutableChapters.add(parseChapter(it))
|
||||||
}
|
}
|
||||||
|
mutableChapters.reverse()
|
||||||
return mutableChapters
|
return mutableChapters
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user