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 {
|
void onPushDetail(resultList) async {
|
||||||
// 匹配输入内容,如果是AV、BV号且有结果 直接跳转详情页
|
// 匹配输入内容,如果是AV、BV号且有结果 直接跳转详情页
|
||||||
Map matchRes = IdUtils.matchAvorBv(input: keyword);
|
if (RegExp(r'^(av\d+|bv[a-z\d]{10})$', caseSensitive: false)
|
||||||
if (matchRes.isNotEmpty) {
|
.hasMatch(keyword)) {
|
||||||
|
Map matchRes = IdUtils.matchAvorBv(input: keyword);
|
||||||
PiliScheme.videoPush(matchRes['AV'], matchRes['BV'], false);
|
PiliScheme.videoPush(matchRes['AV'], matchRes['BV'], false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keyword 可能输入纯数字
|
// keyword 可能输入纯数字
|
||||||
try {
|
try {
|
||||||
int? aid = int.tryParse(keyword);
|
int? aid = int.tryParse(keyword);
|
||||||
|
|||||||
Reference in New Issue
Block a user