Merge pull request #2520 from qianfanguojin/master

fix: fix: 尝试使用文件名是否带 cover 来解决某些epub封面的读取问题
pull/2533/head
kunfei 2 years ago committed by GitHub
commit e75273f8dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/src/main/java/io/legado/app/model/localBook/EpubFile.kt

@ -119,9 +119,10 @@ class EpubFile(var book: Book) {
/** /**
* <image width="1038" height="670" xlink:href="..."/> * <image width="1038" height="670" xlink:href="..."/>
* ...titlepage.xhtml * ...titlepage.xhtml
* 大多数epub文件的封面页都会带有cover可以一定程度上解决封面读取问题
*/ */
if (chapter.url.contains("titlepage.xhtml") || if (chapter.url.contains("titlepage.xhtml") ||
chapter.url.contains("cover.xhtml") chapter.url.contains("cover")
) { ) {
return "<img src=\"cover.jpeg\" />" return "<img src=\"cover.jpeg\" />"
} }

Loading…
Cancel
Save