diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index 1b91fa8..65ad24d 100644 Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ diff --git a/README.md b/README.md index cb35a38..1cf227a 100644 --- a/README.md +++ b/README.md @@ -3,17 +3,18 @@ 风月读书,一款开源、无广告的小说阅读软件。 成品下载(v1.8.0):[https://fycz.lanzous.com/i4pMekkx9zc](https://fycz.lanzous.com/i4pMekkx9zc) +[更新日志](./app/src/main/assets/updatelog.fy) #### 一、关于书源 * 软件内置了25个书源如下: - * 23个网络小说书源:天籁小说、笔趣阁44、品书网、笔趣阁、 + * 23个网络小说书源:天籁小说、笔趣阁44、~~品书网~~、笔趣阁、 全本小说、米趣小说、九桃小说、云中书库、 - 搜小说网、全小说网、奇奇小说、妙笔阁、 + 搜小说网、全小说网、~~奇奇小说~~、妙笔阁、 丹书铁券、小说旗、读一读网、飘天文学、 老幺小说、星星小说、时光小说、峡谷文学、 - 红尘小说、热血小说、传奇小说 + 红尘小说、~~热血小说~~、传奇小说 * 4个实体书书源:超星图书·实体、作品集·实体、99藏书·实体、100本·实体 * 如何自行制作并添加书源. diff --git a/app/build.gradle b/app/build.gradle index b397ea2..159c27d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,6 @@ apply plugin: 'com.android.application' apply plugin: 'org.greenrobot.greendao'//greendao插件dependencies apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' def releaseTime() { return new Date().format("yy.MMddHH", TimeZone.getTimeZone("GMT+08:00")) @@ -52,7 +51,7 @@ def versionN = getVersionName() android { compileSdkVersion 29 - buildToolsVersion '30.0.3' + buildToolsVersion '29.0.3' defaultConfig { applicationId "xyz.fycz.myreader" minSdkVersion 21 @@ -78,6 +77,7 @@ android { ndk { abiFilters "x86", "armeabi", "armeabi-v7a" } + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } android.applicationVariants.all { variant -> variant.outputs.all { @@ -195,6 +195,9 @@ dependencies { implementation "com.afollestad.material-dialogs:input:$dialog_version" implementation "com.afollestad.material-dialogs:files:$dialog_version" implementation "com.afollestad.material-dialogs:bottomsheets:$dialog_version"*/ + + //kongzueDialog + //implementation 'com.kongzue.dialog_v3:dialog:3.2.5' } greendao { diff --git a/app/src/main/assets/updatelog.fy b/app/src/main/assets/updatelog.fy index 8f90662..34189c5 100644 --- a/app/src/main/assets/updatelog.fy +++ b/app/src/main/assets/updatelog.fy @@ -1,6 +1,8 @@ 风月读书v1.8.1 1、内容替换规则支持备份与恢复 2、优化规则列表左滑菜单交互 +3、修复书源搜小说网 +4、删除失效书源:品书网、奇奇小说、热血小说 2021.01.19 风月读书v1.8.0 diff --git a/app/src/main/java/xyz/fycz/myreader/application/SysManager.java b/app/src/main/java/xyz/fycz/myreader/application/SysManager.java index 819b331..a4b713b 100644 --- a/app/src/main/java/xyz/fycz/myreader/application/SysManager.java +++ b/app/src/main/java/xyz/fycz/myreader/application/SysManager.java @@ -116,12 +116,15 @@ public class SysManager { ReadCrawlerUtil.addReadCrawler(BookSource.laoyao, BookSource.xingxing, BookSource.shiguang, BookSource.xiagu, BookSource.hongchen); Log.d("SourceVersion", "" + 1); case 2: - ReadCrawlerUtil.addReadCrawler(BookSource.rexue, BookSource.chuanqi); + //ReadCrawlerUtil.addReadCrawler(BookSource.rexue, BookSource.chuanqi); + ReadCrawlerUtil.addReadCrawler(BookSource.chuanqi); Log.d("SourceVersion", "" + 2); case 3: ReadCrawlerUtil.resetReadCrawlers(); Log.d("SourceVersion", "" + 3); - + case 4: + ReadCrawlerUtil.removeReadCrawler("qiqi", "rexue", "pinshu"); + Log.d("SourceVersion", "" + 4); } setting.setSourceVersion(APPCONST.SOURCE_VERSION); saveSetting(setting); diff --git a/app/src/main/java/xyz/fycz/myreader/common/APPCONST.java b/app/src/main/java/xyz/fycz/myreader/common/APPCONST.java index e11b55c..5ae4a77 100644 --- a/app/src/main/java/xyz/fycz/myreader/common/APPCONST.java +++ b/app/src/main/java/xyz/fycz/myreader/common/APPCONST.java @@ -83,7 +83,7 @@ public class APPCONST { //设置版本号 public static final int SETTING_VERSION = 11; - public static final int SOURCE_VERSION = 4; + public static final int SOURCE_VERSION = 5; public static final String FORMAT_FILE_DATE = "yyyy-MM-dd"; diff --git a/app/src/main/java/xyz/fycz/myreader/enums/BookSource.java b/app/src/main/java/xyz/fycz/myreader/enums/BookSource.java index 10445b3..cd3eb1f 100644 --- a/app/src/main/java/xyz/fycz/myreader/enums/BookSource.java +++ b/app/src/main/java/xyz/fycz/myreader/enums/BookSource.java @@ -13,7 +13,7 @@ public enum BookSource { fynovel("风月小说"), tianlai(MyApplication.getApplication().getString(R.string.read_tianlai)), biquge44(MyApplication.getApplication().getString(R.string.read_biquge44)), - pinshu(MyApplication.getApplication().getString(R.string.read_pinshu)), + //pinshu(MyApplication.getApplication().getString(R.string.read_pinshu)), biquge(MyApplication.getApplication().getString(R.string.read_biquge)), qb5(MyApplication.getApplication().getString(R.string.read_qb5)), miqu(MyApplication.getApplication().getString(R.string.read_miqu)), @@ -23,14 +23,14 @@ public enum BookSource { yunzhong(MyApplication.getApplication().getString(R.string.read_yunzhong)), sonovel(MyApplication.getApplication().getString(R.string.read_sonovel)), quannovel(MyApplication.getApplication().getString(R.string.read_quannovel)), - qiqi(MyApplication.getApplication().getString(R.string.read_qiqi)), + //qiqi(MyApplication.getApplication().getString(R.string.read_qiqi)), xs7(MyApplication.getApplication().getString(R.string.read_xs7)), du1du(MyApplication.getApplication().getString(R.string.read_du1du)), paiotian(MyApplication.getApplication().getString(R.string.read_paiotian)), laoyao(MyApplication.getApplication().getString(R.string.read_laoyao)), xingxing(MyApplication.getApplication().getString(R.string.read_xingxing)), shiguang(MyApplication.getApplication().getString(R.string.read_shiguang)), - rexue(MyApplication.getApplication().getString(R.string.read_rexue)), + //rexue(MyApplication.getApplication().getString(R.string.read_rexue)), chuanqi(MyApplication.getApplication().getString(R.string.read_chuanqi)), xiagu(MyApplication.getApplication().getString(R.string.read_xiagu)), hongchen(MyApplication.getApplication().getString(R.string.read_hongchen)), diff --git a/app/src/main/java/xyz/fycz/myreader/ui/activity/ReadActivity.java b/app/src/main/java/xyz/fycz/myreader/ui/activity/ReadActivity.java index f4cb2ab..b5b2f5a 100644 --- a/app/src/main/java/xyz/fycz/myreader/ui/activity/ReadActivity.java +++ b/app/src/main/java/xyz/fycz/myreader/ui/activity/ReadActivity.java @@ -483,6 +483,8 @@ public class ReadActivity extends BaseActivity implements ColorPickerDialogListe } }); + initBottomMenuClick(); + mSourceDialog.setOnSourceChangeListener((bean, pos) -> { Book bookTem = (Book) mBook.clone(); bookTem.setChapterUrl(bean.getChapterUrl()); @@ -1219,10 +1221,10 @@ public class ReadActivity extends BaseActivity implements ColorPickerDialogListe binding.readAblTopMenu.setPadding(0, statusBarHeight, 0, 0); if (mSetting.isNoMenuChTitle()) { binding.llChapterView.setVisibility(GONE); - binding.toolbar.getLayoutParams().height = ScreenUtils.dpToPx(60) + ImmersionBar.getStatusBarHeight(this); + binding.toolbar.getLayoutParams().height = 60 + ImmersionBar.getStatusBarHeight(this); } else { binding.llChapterView.setVisibility(VISIBLE); - binding.toolbar.getLayoutParams().height = ScreenUtils.dpToPx(45) + ImmersionBar.getStatusBarHeight(this); + binding.toolbar.getLayoutParams().height = 45 + ImmersionBar.getStatusBarHeight(this); } } diff --git a/app/src/main/java/xyz/fycz/myreader/ui/presenter/BookcasePresenter.java b/app/src/main/java/xyz/fycz/myreader/ui/presenter/BookcasePresenter.java index a8d4acb..0494857 100644 --- a/app/src/main/java/xyz/fycz/myreader/ui/presenter/BookcasePresenter.java +++ b/app/src/main/java/xyz/fycz/myreader/ui/presenter/BookcasePresenter.java @@ -653,7 +653,8 @@ public class BookcasePresenter implements BasePresenter { MyApplication.getApplication().newThread(() -> { ArrayList needDownloadBooks = new ArrayList<>(); for (Book book : mBooks) { - if (!BookSource.pinshu.toString().equals(book.getSource()) && !"本地书籍".equals(book.getType()) + //if (!BookSource.pinshu.toString().equals(book.getSource()) && !"本地书籍".equals(book.getType()) + if (!"本地书籍".equals(book.getType()) && book.getIsDownLoadAll()) { needDownloadBooks.add(book); } diff --git a/app/src/main/java/xyz/fycz/myreader/webapi/crawler/find/XS7Rank.java b/app/src/main/java/xyz/fycz/myreader/webapi/crawler/find/XS7Rank.java index 42f77e8..c602765 100644 --- a/app/src/main/java/xyz/fycz/myreader/webapi/crawler/find/XS7Rank.java +++ b/app/src/main/java/xyz/fycz/myreader/webapi/crawler/find/XS7Rank.java @@ -16,7 +16,9 @@ import xyz.fycz.myreader.webapi.crawler.read.XS7ReadCrawler; /** * @author fengyue * @date 2020/11/28 22:43 + * 已失效 */ +@Deprecated public class XS7Rank extends FindCrawler { private FindCrawler xs7 = new XS7ReadCrawler(); public static final String CHARSET = "GBK"; diff --git a/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/PinShuReadCrawler.java b/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/PinShuReadCrawler.java index 5334323..bb34efe 100644 --- a/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/PinShuReadCrawler.java +++ b/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/PinShuReadCrawler.java @@ -19,7 +19,9 @@ import java.util.ArrayList; /** * @author fengyue * @date 2020/5/19 19:50 + * 已失效 */ +@Deprecated public class PinShuReadCrawler implements ReadCrawler, BookInfoCrawler { public static final String NAME_SPACE = "https://www.vodtw.com"; public static final String NOVEL_SEARCH = "https://www.vodtw.com/Book/Search.aspx?SearchKey={key}&SearchClass=1"; @@ -119,7 +121,7 @@ public class PinShuReadCrawler implements ReadCrawler, BookInfoCrawler { book.setAuthor(info.get(1).text()); book.setType(info.get(3).text()); book.setNewestChapterTitle(info.get(4).text()); - book.setSource(BookSource.pinshu.toString()); + book.setSource("pinshu"); SearchBookBean sbb = new SearchBookBean(book.getName(), book.getAuthor()); books.add(sbb, book); } diff --git a/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/PinShuReadCrawler2.java b/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/PinShuReadCrawler2.java index 2b22ecb..f128787 100644 --- a/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/PinShuReadCrawler2.java +++ b/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/PinShuReadCrawler2.java @@ -118,7 +118,7 @@ public class PinShuReadCrawler2 implements ReadCrawler, BookInfoCrawler { Elements info = element.getElementsByTag("a"); book.setName(info.get(1).text()); book.setChapterUrl(NAME_SPACE + info.get(0).attr("href")); - book.setSource(BookSource.pinshu.toString()); + book.setSource("pinshu"); SearchBookBean sbb = new SearchBookBean(book.getName(), book.getAuthor()); books.add(sbb, book); } diff --git a/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/QiQiReadCrawler.java b/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/QiQiReadCrawler.java index 7b4440c..62acb9e 100644 --- a/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/QiQiReadCrawler.java +++ b/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/QiQiReadCrawler.java @@ -15,7 +15,10 @@ import xyz.fycz.myreader.webapi.crawler.base.ReadCrawler; import java.util.ArrayList; - +/** + * 已失效 + */ +@Deprecated public class QiQiReadCrawler implements ReadCrawler { public static final String NAME_SPACE = "https://www.qq717.com"; public static final String NOVEL_SEARCH = "https://www.qq717.com/search.php?keyword={key}"; @@ -120,7 +123,7 @@ public class QiQiReadCrawler implements ReadCrawler { book.setNewestChapterTitle(element.getElementsByTag("p").get(4).getElementsByTag("a").first().text()); book.setImgUrl(element.getElementsByTag("img").first().attr("src")); book.setDesc(element.getElementsByClass("result-game-item-desc").text()); - book.setSource(BookSource.qiqi.toString()); + book.setSource("qiqi"); SearchBookBean sbb = new SearchBookBean(book.getName(), book.getAuthor()); books.add(sbb, book); } diff --git a/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/ReXueReadCrawler.java b/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/ReXueReadCrawler.java index 9fd16b0..53b1138 100644 --- a/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/ReXueReadCrawler.java +++ b/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/ReXueReadCrawler.java @@ -17,7 +17,10 @@ import xyz.fycz.myreader.greendao.entity.Chapter; import xyz.fycz.myreader.model.mulvalmap.ConcurrentMultiValueMap; import xyz.fycz.myreader.webapi.crawler.base.ReadCrawler; - +/** + * 已失效 + */ +@Deprecated public class ReXueReadCrawler implements ReadCrawler { public static final String NAME_SPACE = "https://www.rexue.org"; public static final String NOVEL_SEARCH = "https://www.rexue.org/search.php?key={key}"; @@ -155,7 +158,7 @@ public class ReXueReadCrawler implements ReadCrawler { String imgUrl = li.getElementsByTag("img").attr("data-original"); book.setImgUrl(!imgUrl.contains("http") ? "https:" + imgUrl : imgUrl); book.setChapterUrl(NAME_SPACE + as.get(1).attr("href")); - book.setSource(BookSource.rexue.toString()); + book.setSource("rexue"); SearchBookBean sbb = new SearchBookBean(book.getName(), book.getAuthor()); books.add(sbb, book); } @@ -168,7 +171,7 @@ public class ReXueReadCrawler implements ReadCrawler { public Book getBookInfo(Document doc, Book book) { //小说源 - book.setSource(BookSource.rexue.toString()); + book.setSource("rexue"); //图片url String imgUrl = doc.select("meta[property=og:image]").attr("content"); book.setImgUrl(imgUrl); diff --git a/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/SoNovelReadCrawler.java b/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/SoNovelReadCrawler.java index 33206c6..be76f5d 100644 --- a/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/SoNovelReadCrawler.java +++ b/app/src/main/java/xyz/fycz/myreader/webapi/crawler/read/SoNovelReadCrawler.java @@ -19,8 +19,8 @@ import java.util.List; public class SoNovelReadCrawler implements ReadCrawler, BookInfoCrawler { - public static final String NAME_SPACE = "https://www.soxscc.com"; - public static final String NOVEL_SEARCH = "https://www.soxscc.com/search.html,searchtype=all&searchkey={key}&action=search&submit= 搜 索 "; + public static final String NAME_SPACE = "https://www.soxs.cc"; + public static final String NOVEL_SEARCH = "https://www.soxs.cc/search.html,searchtype=all&searchkey={key}&action=search&submit= 搜 索 "; public static final String CHARSET = "UTF-8"; public static final String SEARCH_CHARSET = "UTF-8"; diff --git a/build.gradle b/build.gradle index 8edf102..a084155 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ ext { support_library_version = '28.0.0' } buildscript { - ext.kotlin_version = '1.3.72' + ext.kotlin_version = '1.4.20' repositories { jcenter() mavenCentral() @@ -15,7 +15,6 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.2' classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0' - classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/fy.jks b/fy.jks deleted file mode 100644 index ea6b9f1..0000000 Binary files a/fy.jks and /dev/null differ