From 35940199643ac359d6e4bf3deb2080ba3d7ae5f3 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Wed, 1 May 2024 23:41:18 +0800 Subject: [PATCH] =?UTF-8?q?opt:=20=E7=B3=BB=E7=BB=9F=E7=BA=A7=E8=B7=B3?= =?UTF-8?q?=E8=BD=ACav=E3=80=81bangumi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils/app_scheme.dart | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/utils/app_scheme.dart b/lib/utils/app_scheme.dart index 69fa717d..5bfb955c 100644 --- a/lib/utils/app_scheme.dart +++ b/lib/utils/app_scheme.dart @@ -167,8 +167,21 @@ class PiliSchame { print('bilibili.com host: $host'); print('bilibili.com path: $path'); final String lastPathSegment = path!.split('/').last; - if (lastPathSegment.contains('BV')) { - _videoPush(null, lastPathSegment); + if (path.startsWith('/video')) { + if (lastPathSegment.contains('BV')) { + _videoPush(null, lastPathSegment); + } + if (lastPathSegment.contains('av')) { + _videoPush(matchNum(lastPathSegment)[0], null); + } + } + if (path.startsWith('/bangumi')) { + if (lastPathSegment.contains('ss')) { + _bangumiPush(matchNum(lastPathSegment).first, null); + } + if (lastPathSegment.contains('ep')) { + _bangumiPush(null, matchNum(lastPathSegment).first); + } } } else if (host.contains('live')) { int roomId = int.parse(path!.split('/').last);