Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Commit

Permalink
优化搜索、修复bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuecanzhu committed Mar 2, 2021
1 parent 2846daf commit 92cfe5d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/assets/updatelog.fy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
2021.03.01
风月读书v1.9.1
2021.03.02
风月读书v1.9.2
更新内容:
1、优化搜索
2、修复已知bug
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public static BookSource getBookSourceByUrl(String url) {
*/
@Nullable
public static BookSource getBookSourceByEName(String ename) {
if (ename == null) return getDefaultSource();
if ("local".equals(ename)) return getLocalSource();
BookSource source = GreenDaoManager.getDaoSession().getBookSourceDao().
queryBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected void setUpToolbar(Toolbar toolbar) {
protected void initData(Bundle savedInstanceState) {
super.initData(savedInstanceState);
debugEntity = getIntent().getParcelableExtra("debugEntity");
rc = ReadCrawlerUtil.getReadCrawler(debugEntity.getBookSource());
rc = ReadCrawlerUtil.getReadCrawler(debugEntity.getBookSource(), true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ public static ReadCrawler getReadCrawler(String bookSource) {
}

public static ReadCrawler getReadCrawler(BookSource source) {
return getReadCrawler(source, false);
}
public static ReadCrawler getReadCrawler(BookSource source, boolean isInfo) {
try {
if (StringHelper.isEmpty(source.getSourceEName())) {
BaseSourceCrawler crawler;
Expand All @@ -190,7 +193,7 @@ public static ReadCrawler getReadCrawler(BookSource source) {
crawler = new JsonPathCrawler(source);
break;
}
if (source.getSearchRule().isRelatedWithInfo()) {
if (source.getSearchRule().isRelatedWithInfo() || isInfo) {
return crawler;
} else {
return new BaseSourceCrawlerNoInfo(crawler);
Expand Down
4 changes: 2 additions & 2 deletions app/version_code.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Mon Mar 01 20:09:11 CST 2021
VERSION_CODE=191
#Tue Mar 02 08:12:15 CST 2021
VERSION_CODE=192

0 comments on commit 92cfe5d

Please sign in to comment.