Fix the token for the action and add comics support in Reading Lists
This commit is contained in:
2
.github/workflows/build_push.yml
vendored
2
.github/workflows/build_push.yml
vendored
@@ -146,7 +146,7 @@ jobs:
|
|||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
repository: Kareadita/tach-extension
|
repository: Kareadita/tach-extension
|
||||||
token: ${{ secrets.BOT_PAT }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
ref: repo
|
ref: repo
|
||||||
path: repo
|
path: repo
|
||||||
|
|
||||||
|
|||||||
@@ -350,17 +350,22 @@ class Kavita(private val suffix: String = "") : ConfigurableSource, UnmeteredSou
|
|||||||
}
|
}
|
||||||
name = buildString {
|
name = buildString {
|
||||||
append("${item.order + 1}. ")
|
append("${item.order + 1}. ")
|
||||||
if (item.chapterId != null && item.chapterId > 0) {
|
when {
|
||||||
if (item.chapterTitleName.isNullOrBlank()) {
|
!item.chapterTitleName.isNullOrBlank() && !item.chapterTitleName.matches(Regex("^\\d+\$")) -> {
|
||||||
item.chapterNumber
|
append(item.chapterTitleName)
|
||||||
?.takeIf { it.isNotBlank() && it != "-100000" }
|
}
|
||||||
?.let { append(" Chapter $it") }
|
!item.volumeNumber.isNullOrBlank() && item.volumeNumber != "-100000" -> {
|
||||||
|
append("Volume ${item.volumeNumber.padStart(2, '0')}")
|
||||||
|
}
|
||||||
|
!item.chapterNumber.isNullOrBlank() && item.chapterNumber != "-100000" -> {
|
||||||
|
val libraryType = getLibraryType(item.seriesId)
|
||||||
|
when (libraryType) {
|
||||||
|
LibraryTypeEnum.Comic, LibraryTypeEnum.ComicVine ->
|
||||||
|
append("Issue #${item.chapterNumber.padStart(3, '0')}")
|
||||||
|
else ->
|
||||||
|
append("Chapter ${item.chapterNumber.padStart(2, '0')}")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
item.chapterTitleName
|
|
||||||
?.takeIf { it.isNotBlank() }
|
|
||||||
?.let { append(it) }
|
|
||||||
} else if (!item.volumeNumber.isNullOrBlank()) {
|
|
||||||
append(" (Vol.${item.volumeNumber})")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
date_upload = if (preferences.RdDate && !item.releaseDate.isNullOrBlank()) {
|
date_upload = if (preferences.RdDate && !item.releaseDate.isNullOrBlank()) {
|
||||||
@@ -369,7 +374,7 @@ class Kavita(private val suffix: String = "") : ConfigurableSource, UnmeteredSou
|
|||||||
0L // Explicitly unset the date
|
0L // Explicitly unset the date
|
||||||
}
|
}
|
||||||
chapter_number = item.order.toFloat()
|
chapter_number = item.order.toFloat()
|
||||||
scanlator = item.seriesName + " #" + (item.chapterNumber?.padStart(3, '0') ?: "") // For Comics #000
|
scanlator = item.seriesName
|
||||||
}
|
}
|
||||||
}.sortedBy { it.chapter_number }
|
}.sortedBy { it.chapter_number }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user