优化搜索、修复bug

pull/5/head v1.9.2
fengyuecanzhu 4 years ago
parent 2846daff3d
commit 92cfe5dc49
  1. 2
      README.md
  2. 4
      app/src/main/assets/updatelog.fy
  3. 1
      app/src/main/java/xyz/fycz/myreader/model/source/BookSourceManager.java
  4. 2
      app/src/main/java/xyz/fycz/myreader/ui/activity/SourceDebugActivity.java
  5. 5
      app/src/main/java/xyz/fycz/myreader/webapi/crawler/ReadCrawlerUtil.java
  6. 4
      app/version_code.properties

@ -2,7 +2,7 @@
风月读书,一款开源、无广告的小说阅读软件。 风月读书,一款开源、无广告的小说阅读软件。
成品下载(v1.9.1 支持自定义书源):[https://fycz.lanzous.com/ijJsnmcfwja](https://fycz.lanzous.com/ijJsnmcfwja) 成品下载(v1.9.2 支持自定义书源):[https://fycz.lanzous.com/iMpIkmcv9dc](https://fycz.lanzous.com/iMpIkmcv9dc)
[更新日志](./app/src/main/assets/updatelog.fy) [更新日志](./app/src/main/assets/updatelog.fy)

@ -1,5 +1,5 @@
2021.03.01 2021.03.02
风月读书v1.9.1 风月读书v1.9.2
更新内容: 更新内容:
1、优化搜索 1、优化搜索
2、修复已知bug 2、修复已知bug

@ -109,6 +109,7 @@ public class BookSourceManager {
*/ */
@Nullable @Nullable
public static BookSource getBookSourceByEName(String ename) { public static BookSource getBookSourceByEName(String ename) {
if (ename == null) return getDefaultSource();
if ("local".equals(ename)) return getLocalSource(); if ("local".equals(ename)) return getLocalSource();
BookSource source = GreenDaoManager.getDaoSession().getBookSourceDao(). BookSource source = GreenDaoManager.getDaoSession().getBookSourceDao().
queryBuilder() queryBuilder()

@ -82,7 +82,7 @@ public class SourceDebugActivity extends BaseActivity {
protected void initData(Bundle savedInstanceState) { protected void initData(Bundle savedInstanceState) {
super.initData(savedInstanceState); super.initData(savedInstanceState);
debugEntity = getIntent().getParcelableExtra("debugEntity"); debugEntity = getIntent().getParcelableExtra("debugEntity");
rc = ReadCrawlerUtil.getReadCrawler(debugEntity.getBookSource()); rc = ReadCrawlerUtil.getReadCrawler(debugEntity.getBookSource(), true);
} }
@Override @Override

@ -174,6 +174,9 @@ public class ReadCrawlerUtil {
} }
public static ReadCrawler getReadCrawler(BookSource source) { public static ReadCrawler getReadCrawler(BookSource source) {
return getReadCrawler(source, false);
}
public static ReadCrawler getReadCrawler(BookSource source, boolean isInfo) {
try { try {
if (StringHelper.isEmpty(source.getSourceEName())) { if (StringHelper.isEmpty(source.getSourceEName())) {
BaseSourceCrawler crawler; BaseSourceCrawler crawler;
@ -190,7 +193,7 @@ public class ReadCrawlerUtil {
crawler = new JsonPathCrawler(source); crawler = new JsonPathCrawler(source);
break; break;
} }
if (source.getSearchRule().isRelatedWithInfo()) { if (source.getSearchRule().isRelatedWithInfo() || isInfo) {
return crawler; return crawler;
} else { } else {
return new BaseSourceCrawlerNoInfo(crawler); return new BaseSourceCrawlerNoInfo(crawler);

@ -1,2 +1,2 @@
#Mon Mar 01 20:09:11 CST 2021 #Tue Mar 02 08:12:15 CST 2021
VERSION_CODE=191 VERSION_CODE=192

Loading…
Cancel
Save