mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: check av/bv search
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user