mirror of
https://github.com/gotson/komga.git
synced 2025-12-06 08:32:25 +01:00
refactor: simplify condition
This commit is contained in:
parent
c955f2da0f
commit
b84a958732
1 changed files with 1 additions and 1 deletions
|
|
@ -324,7 +324,7 @@ class EpubExtractor(
|
||||||
file.fileName to
|
file.fileName to
|
||||||
doc?.select("span.koboSpan")?.mapNotNull { koboSpan ->
|
doc?.select("span.koboSpan")?.mapNotNull { koboSpan ->
|
||||||
val id = koboSpan.id()
|
val id = koboSpan.id()
|
||||||
if (!id.isNullOrBlank()) {
|
if (id.isNotBlank()) {
|
||||||
// progression is built from the position in the file of each koboSpan, divided by the file size
|
// progression is built from the position in the file of each koboSpan, divided by the file size
|
||||||
val progression = koboSpan.sourceRange().endPos().toFloat() / file.fileSize!!.toFloat()
|
val progression = koboSpan.sourceRange().endPos().toFloat() / file.fileSize!!.toFloat()
|
||||||
Pair(id, progression)
|
Pair(id, progression)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue