From db824681fd6a8d9b53df047315e169c9df5f33df Mon Sep 17 00:00:00 2001 From: guozhigq Date: Sun, 5 May 2024 21:00:12 +0800 Subject: [PATCH 01/10] =?UTF-8?q?fix:=20=E9=80=80=E5=87=BA=E5=85=A8?= =?UTF-8?q?=E5=B1=8F=E6=8C=89=E9=92=AE=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plugin/pl_player/view.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index 6a5f22ec..d359391e 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -334,7 +334,7 @@ class _PLVideoPlayerState extends State color: Colors.white, ), ), - fuc: () => _.triggerFullScreen(), + fuc: () => _.triggerFullScreen(status: !_.isFullScreen.value), ), }; final List list = []; From 0162b9614e278fabd83066f35823d259f28db733 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Mon, 6 May 2024 23:14:12 +0800 Subject: [PATCH 02/10] =?UTF-8?q?fix:=20=E8=AF=84=E8=AE=BA=E5=8C=BA?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/reply/widgets/reply_item.dart | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/lib/pages/video/detail/reply/widgets/reply_item.dart b/lib/pages/video/detail/reply/widgets/reply_item.dart index ef4cd15c..b5972ed8 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item.dart @@ -12,6 +12,7 @@ import 'package:pilipala/pages/preview/index.dart'; import 'package:pilipala/pages/video/detail/index.dart'; import 'package:pilipala/pages/video/detail/reply_new/index.dart'; import 'package:pilipala/utils/feed_back.dart'; +import 'package:pilipala/utils/id_utils.dart'; import 'package:pilipala/utils/storage.dart'; import 'package:pilipala/utils/url_utils.dart'; import 'package:pilipala/utils/utils.dart'; @@ -642,23 +643,25 @@ InlineSpan buildContent( '', ); } else { - final String redirectUrl = - await UrlUtils.parseRedirectUrl(matchStr); - if (redirectUrl == matchStr) { - Clipboard.setData(ClipboardData(text: matchStr)); - SmartDialog.showToast('地址可能有误'); - return; - } - final String pathSegment = Uri.parse(redirectUrl).path; - final String lastPathSegment = - pathSegment.split('/').last; - if (lastPathSegment.startsWith('BV')) { + final String pathSegment = Uri.parse(matchStr).path; + Map matchRes = IdUtils.matchAvorBv(input: pathSegment); + List matchKeys = matchRes.keys.toList(); + if (matchKeys.isNotEmpty) { UrlUtils.matchUrlPush( - lastPathSegment, + matchRes.containsKey('AV') + ? matchRes['AV']! as int + : matchRes['BV'], title, - redirectUrl, + matchStr, ); } else { + final String redirectUrl = + await UrlUtils.parseRedirectUrl(matchStr); + if (redirectUrl == matchStr) { + Clipboard.setData(ClipboardData(text: matchStr)); + SmartDialog.showToast('地址可能有误'); + return; + } Get.toNamed( '/webview', parameters: { From 2fefe325877f12bb99cbf29f0dcf9f334798b8de Mon Sep 17 00:00:00 2001 From: guozhigq Date: Mon, 6 May 2024 23:24:19 +0800 Subject: [PATCH 03/10] =?UTF-8?q?mod:=20=E9=BB=98=E8=AE=A4=E4=B8=8D?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=8D=87=E7=BA=A7=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/about/index.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/about/index.dart b/lib/pages/about/index.dart index b381691a..81d3c3f4 100644 --- a/lib/pages/about/index.dart +++ b/lib/pages/about/index.dart @@ -218,7 +218,7 @@ class AboutController extends GetxController { RxString currentVersion = ''.obs; RxString remoteVersion = ''.obs; late LatestDataModel remoteAppInfo; - RxBool isUpdate = true.obs; + RxBool isUpdate = false.obs; RxBool isLoading = true.obs; late LatestDataModel data; From 4f10e6a869d1d61ea10343a00721d259a30572e7 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Tue, 7 May 2024 00:01:44 +0800 Subject: [PATCH 04/10] =?UTF-8?q?fix:=20=E5=8A=A8=E6=80=81=E6=9C=AA?= =?UTF-8?q?=E8=AF=BB=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/main/controller.dart | 2 +- lib/pages/main/view.dart | 64 +++++++++++++++++----------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lib/pages/main/controller.dart b/lib/pages/main/controller.dart index a77d9304..2ef2bf7f 100644 --- a/lib/pages/main/controller.dart +++ b/lib/pages/main/controller.dart @@ -40,10 +40,10 @@ class MainController extends GetxController { dynamicBadgeType.value = DynamicBadgeMode.values[setting.get( SettingBoxKey.dynamicBadgeMode, defaultValue: DynamicBadgeMode.number.code)]; + setNavBarConfig(); if (dynamicBadgeType.value != DynamicBadgeMode.hidden) { getUnreadDynamic(); } - setNavBarConfig(); } void onBackPressed(BuildContext context) { diff --git a/lib/pages/main/view.dart b/lib/pages/main/view.dart index 617fcf83..29573501 100644 --- a/lib/pages/main/view.dart +++ b/lib/pages/main/view.dart @@ -138,14 +138,14 @@ class _MainAppState extends State with SingleTickerProviderStateMixin { duration: const Duration(milliseconds: 500), offset: Offset(0, snapshot.data ? 0 : 1), child: GlobalData().enableMYBar - ? NavigationBar( - onDestinationSelected: (value) => setIndex(value), - selectedIndex: _mainController.selectedIndex, - destinations: [ - ..._mainController.navigationBars.map((e) { - return NavigationDestination( - icon: Obx( - () => Badge( + ? Obx( + () => NavigationBar( + onDestinationSelected: (value) => setIndex(value), + selectedIndex: _mainController.selectedIndex, + destinations: [ + ..._mainController.navigationBars.map((e) { + return NavigationDestination( + icon: Badge( label: _mainController .dynamicBadgeType.value == DynamicBadgeMode.number @@ -159,25 +159,25 @@ class _MainAppState extends State with SingleTickerProviderStateMixin { e['count'] > 0, child: e['icon'], ), - ), - selectedIcon: e['selectIcon'], - label: e['label'], - ); - }).toList(), - ], + selectedIcon: e['selectIcon'], + label: e['label'], + ); + }).toList(), + ], + ), ) - : BottomNavigationBar( - currentIndex: _mainController.selectedIndex, - type: BottomNavigationBarType.fixed, - onTap: (value) => setIndex(value), - iconSize: 16, - selectedFontSize: 12, - unselectedFontSize: 12, - items: [ - ..._mainController.navigationBars.map((e) { - return BottomNavigationBarItem( - icon: Obx( - () => Badge( + : Obx( + () => BottomNavigationBar( + currentIndex: _mainController.selectedIndex, + type: BottomNavigationBarType.fixed, + onTap: (value) => setIndex(value), + iconSize: 16, + selectedFontSize: 12, + unselectedFontSize: 12, + items: [ + ..._mainController.navigationBars.map((e) { + return BottomNavigationBarItem( + icon: Badge( label: _mainController .dynamicBadgeType.value == DynamicBadgeMode.number @@ -191,12 +191,12 @@ class _MainAppState extends State with SingleTickerProviderStateMixin { e['count'] > 0, child: e['icon'], ), - ), - activeIcon: e['selectIcon'], - label: e['label'], - ); - }).toList(), - ], + activeIcon: e['selectIcon'], + label: e['label'], + ); + }).toList(), + ], + ), ), ); }, From 7ff6884342be8d0bd54feed50c8fd8f9c3410717 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Tue, 7 May 2024 23:10:27 +0800 Subject: [PATCH 05/10] =?UTF-8?q?fix:=20pathSegments=E8=B6=8A=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/webview/controller.dart | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/lib/pages/webview/controller.dart b/lib/pages/webview/controller.dart index f26f4284..40f84ff6 100644 --- a/lib/pages/webview/controller.dart +++ b/lib/pages/webview/controller.dart @@ -52,15 +52,19 @@ class WebviewController extends GetxController { loadProgress.value = progress; }, onPageStarted: (String url) { - final String str = Uri.parse(url).pathSegments[0]; - final Map matchRes = IdUtils.matchAvorBv(input: str); - final List matchKeys = matchRes.keys.toList(); - if (matchKeys.isNotEmpty) { - if (matchKeys.first == 'BV') { - Get.offAndToNamed( - '/searchResult', - parameters: {'keyword': matchRes['BV']}, - ); + final List pathSegments = Uri.parse(url).pathSegments; + if (pathSegments.isNotEmpty && + url != 'https://passport.bilibili.com/h5-app/passport/login') { + final String str = pathSegments[0]; + final Map matchRes = IdUtils.matchAvorBv(input: str); + final List matchKeys = matchRes.keys.toList(); + if (matchKeys.isNotEmpty) { + if (matchKeys.first == 'BV') { + Get.offAndToNamed( + '/searchResult', + parameters: {'keyword': matchRes['BV']}, + ); + } } } }, From c2a176ad2fd5d20e4ad4aed1f68102b5425b45c2 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Tue, 7 May 2024 23:53:31 +0800 Subject: [PATCH 06/10] fix: issues #718 --- lib/services/audio_handler.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/audio_handler.dart b/lib/services/audio_handler.dart index b0ca8cd7..bf98298b 100644 --- a/lib/services/audio_handler.dart +++ b/lib/services/audio_handler.dart @@ -26,7 +26,7 @@ class VideoPlayerServiceHandler extends BaseAudioHandler with SeekHandler { static final List _item = []; Box setting = GStrorage.setting; bool enableBackgroundPlay = false; - PlPlayerController player = PlPlayerController.getInstance(videoType: 'none'); + PlPlayerController player = PlPlayerController.getInstance(); VideoPlayerServiceHandler() { revalidateSetting(); From 250131d2b0925fef686eb4634657bd80eab085bb Mon Sep 17 00:00:00 2001 From: guozhigq Date: Wed, 8 May 2024 22:42:18 +0800 Subject: [PATCH 07/10] =?UTF-8?q?fix:=20=E5=88=86p=E5=AD=97=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/video/detail/introduction/controller.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pages/video/detail/introduction/controller.dart b/lib/pages/video/detail/introduction/controller.dart index 2ced79f0..9ed04870 100644 --- a/lib/pages/video/detail/introduction/controller.dart +++ b/lib/pages/video/detail/introduction/controller.dart @@ -450,6 +450,7 @@ class VideoIntroController extends GetxController { videoDetailCtr.danmakuCid.value = cid; videoDetailCtr.cover.value = cover; videoDetailCtr.queryVideoUrl(); + videoDetailCtr.getSubtitle(); // 重新请求评论 try { /// 未渲染回复组件时可能异常 From 6380c138e8f0e2c85f6ae73b8b24deccd6d78b33 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Wed, 8 May 2024 23:19:02 +0800 Subject: [PATCH 08/10] =?UTF-8?q?typo:=20=E5=8E=86=E5=8F=B2=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/http/interceptor.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http/interceptor.dart b/lib/http/interceptor.dart index a5359283..10b5aee5 100644 --- a/lib/http/interceptor.dart +++ b/lib/http/interceptor.dart @@ -46,7 +46,7 @@ class ApiInterceptor extends Interceptor { // 处理网络请求错误 // handler.next(err); String url = err.requestOptions.uri.toString(); - if (!url.contains('heartBeat')) { + if (!url.contains('heartbeat')) { SmartDialog.showToast( await dioError(err), displayType: SmartToastType.onlyRefresh, From 5807999296c0806309e3dd809c068764147ee9be Mon Sep 17 00:00:00 2001 From: guozhigq Date: Wed, 8 May 2024 23:19:29 +0800 Subject: [PATCH 09/10] =?UTF-8?q?mod:=20scheme=20BVAV=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils/app_scheme.dart | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/utils/app_scheme.dart b/lib/utils/app_scheme.dart index fff78b39..8502dc7f 100644 --- a/lib/utils/app_scheme.dart +++ b/lib/utils/app_scheme.dart @@ -4,7 +4,6 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:get/get.dart'; import 'package:pilipala/utils/route_push.dart'; import '../http/search.dart'; -import '../models/common/search_type.dart'; import 'id_utils.dart'; import 'url_utils.dart'; import 'utils.dart'; @@ -140,11 +139,13 @@ class PiliSchame { print('bilibili.com path: $path'); final String lastPathSegment = path!.split('/').last; if (path.startsWith('/video')) { - if (lastPathSegment.contains('BV')) { - _videoPush(null, lastPathSegment); - } - if (lastPathSegment.contains('av')) { - _videoPush(Utils.matchNum(lastPathSegment)[0], null); + Map matchRes = IdUtils.matchAvorBv(input: path); + if (matchRes.containsKey('AV')) { + _videoPush(matchRes['AV']! as int, null); + } else if (matchRes.containsKey('BV')) { + _videoPush(null, matchRes['BV'] as String); + } else { + SmartDialog.showToast('投稿匹配失败'); } } if (path.startsWith('/bangumi')) { From 37654c5eab465672eba646855431eba229ed7f2e Mon Sep 17 00:00:00 2001 From: guozhigq Date: Thu, 9 May 2024 00:00:59 +0800 Subject: [PATCH 10/10] =?UTF-8?q?fix:=20=E8=AF=84=E8=AE=BA=E5=8C=BA?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/video/detail/reply/widgets/reply_item.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/pages/video/detail/reply/widgets/reply_item.dart b/lib/pages/video/detail/reply/widgets/reply_item.dart index b5972ed8..4ff13065 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item.dart @@ -657,11 +657,11 @@ InlineSpan buildContent( } else { final String redirectUrl = await UrlUtils.parseRedirectUrl(matchStr); - if (redirectUrl == matchStr) { - Clipboard.setData(ClipboardData(text: matchStr)); - SmartDialog.showToast('地址可能有误'); - return; - } + // if (redirectUrl == matchStr) { + // Clipboard.setData(ClipboardData(text: matchStr)); + // SmartDialog.showToast('地址可能有误'); + // return; + // } Get.toNamed( '/webview', parameters: {