mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
aa73349099
@ -311,6 +311,7 @@ class EpubFile(var book: Book) {
|
|||||||
) {
|
) {
|
||||||
val contents = epubBook?.contents
|
val contents = epubBook?.contents
|
||||||
if (epubBook == null || contents == null || refs == null) return
|
if (epubBook == null || contents == null || refs == null) return
|
||||||
|
val firstRef = refs.firstOrNull { it.resource != null } ?: return
|
||||||
var i = 0
|
var i = 0
|
||||||
durIndex = 0
|
durIndex = 0
|
||||||
while (i < contents.size) {
|
while (i < contents.size) {
|
||||||
@ -321,7 +322,7 @@ class EpubFile(var book: Book) {
|
|||||||
* completeHref可能有fragment(#id) 必须去除
|
* completeHref可能有fragment(#id) 必须去除
|
||||||
* fix https://github.com/gedoor/legado/issues/1932
|
* fix https://github.com/gedoor/legado/issues/1932
|
||||||
*/
|
*/
|
||||||
if (refs[0].completeHref.substringBeforeLast("#") == content.href) break
|
if (firstRef.completeHref.substringBeforeLast("#") == content.href) break
|
||||||
val chapter = BookChapter()
|
val chapter = BookChapter()
|
||||||
var title = content.title
|
var title = content.title
|
||||||
if (TextUtils.isEmpty(title)) {
|
if (TextUtils.isEmpty(title)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user