mod: check av/bv search

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-10 13:31:50 +08:00
parent abd01e1a27
commit 3c2ccf7d40

View File

@@ -64,11 +64,13 @@ class SearchPanelController extends CommonController {
void onPushDetail(resultList) async {
// 匹配输入内容如果是AV、BV号且有结果 直接跳转详情页
if (RegExp(r'^(av\d+|bv[a-z\d]{10})$', caseSensitive: false)
.hasMatch(keyword)) {
Map matchRes = IdUtils.matchAvorBv(input: keyword);
if (matchRes.isNotEmpty) {
PiliScheme.videoPush(matchRes['AV'], matchRes['BV'], false);
return;
}
// keyword 可能输入纯数字
try {
int? aid = int.tryParse(keyword);