Skip to content

Commit

Permalink
better workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Predidit committed May 17, 2024
1 parent f26a049 commit 99ac43e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,6 @@
java-version: '18'
- run: flutter pub get
- run: flutter build windows
- name: Download OpenCC Assets
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'Predidit/open_chinese_convert_bridge'
version: 'tags/1.0.0'
file: 'opencc_windows.zip'
token: ${{ secrets.GITHUB_TOKEN }}
- run: Expand-Archive -LiteralPath opencc_windows.zip -DestinationPath build/windows/x64/runner/Release
- run: Compress-Archive build/windows/x64/runner/Release/* Kazumi_windows_${env:tag}.zip
- name: Upload windows outputs
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/init_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class _InitPageState extends State<InitPage> {
builder: (context) {
return AlertDialog(
title: const Text('插件管理'),
content: const Text('当前规则数为0, 是否加载默认规则'),
content: const Text('当前规则数为0, 是否加载示例规则'),
actions: [
TextButton(
onPressed: () {
Expand Down
18 changes: 16 additions & 2 deletions lib/plugins/plugins.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,14 @@ class Plugin {

querychapterRoads(String url) async {
List<Road> roadList = [];
String queryURL = baseUrl + url;
// 预处理
url = url.replaceAll('http', 'https');
String queryURL = '';
if (url.contains(baseUrl)) {
queryURL = url;
} else {
queryURL = baseUrl + url;
}
var httpHeaders = {
'referer': baseUrl + '/',
};
Expand Down Expand Up @@ -160,7 +167,14 @@ class Plugin {
}

Future<String> queryVideoUrl(String url) async {
String queryURL = baseUrl + url;
String queryURL = '';
// 预处理
url = url.replaceAll('http', 'https');
if (url.contains(baseUrl)) {
queryURL = url;
} else {
queryURL = baseUrl + url;
}
String videoUrl = '';
var httpHeaders = {
'referer': baseUrl + '/',
Expand Down

0 comments on commit 99ac43e

Please sign in to comment.