Nicovideo: Adding early access prefix to chapters (#5196)
Adding prefix on early access
This commit is contained in:
parent
dd882e091b
commit
cddbfcfc1a
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'Nicovideo Seiga'
|
extName = 'Nicovideo Seiga'
|
||||||
extClass = '.NicovideoSeiga'
|
extClass = '.NicovideoSeiga'
|
||||||
extVersionCode = 4
|
extVersionCode = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -114,8 +114,12 @@ class NicovideoSeiga : HttpSource() {
|
||||||
.filter { it.ownership.sellStatus != "publication_finished" }
|
.filter { it.ownership.sellStatus != "publication_finished" }
|
||||||
.map { chapter ->
|
.map { chapter ->
|
||||||
SChapter.create().apply {
|
SChapter.create().apply {
|
||||||
val isPaid = chapter.ownership.sellStatus == "selling"
|
val prefix = when (chapter.ownership.sellStatus) {
|
||||||
name = (if (isPaid) "\uD83D\uDCB4 " else "") + chapter.meta.title
|
"selling" -> "\uD83D\uDCB4 "
|
||||||
|
"pre_selling" -> "\u23F3\uD83D\uDCB4 "
|
||||||
|
else -> ""
|
||||||
|
}
|
||||||
|
name = prefix + chapter.meta.title
|
||||||
// Timestamp is in seconds, convert to milliseconds
|
// Timestamp is in seconds, convert to milliseconds
|
||||||
date_upload = chapter.meta.createdAt * 1000
|
date_upload = chapter.meta.createdAt * 1000
|
||||||
// While chapters are properly sorted, authors often add promotional material as "chapters" which breaks trackers
|
// While chapters are properly sorted, authors often add promotional material as "chapters" which breaks trackers
|
||||||
|
|
Loading…
Reference in New Issue