opt: jump url (#246)

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
dom
2025-02-13 16:53:40 +08:00
committed by GitHub
parent ba74cb8c01
commit 54c7fef217
17 changed files with 594 additions and 656 deletions

View File

@@ -67,18 +67,22 @@ class SearchPanelController extends CommonController {
void jump2Video() {
if (RegExp(r'^av\d+$', caseSensitive: false).hasMatch(keyword)) {
hasJump2Video = true;
PiliScheme.videoPush(int.parse(keyword.substring(2)), null, false);
PiliScheme.videoPush(
int.parse(keyword.substring(2)),
null,
showDialog: false,
);
} else if (RegExp(r'^bv[a-z\d]{10}$', caseSensitive: false)
.hasMatch(keyword)) {
hasJump2Video = true;
PiliScheme.videoPush(null, keyword, false);
PiliScheme.videoPush(null, keyword, showDialog: false);
}
}
void onPushDetail(resultList) async {
int? aid = int.tryParse(keyword);
if (aid != null && resultList.first.aid == aid) {
PiliScheme.videoPush(aid, null, false);
PiliScheme.videoPush(aid, null, showDialog: false);
}
}