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