feat: 特定视频链接解析

This commit is contained in:
orz12
2024-05-20 14:37:28 +08:00
parent c492992eb1
commit fd51cddeca

View File

@@ -268,6 +268,12 @@ class PiliSchame {
Get.toNamed('/member?mid=$area', arguments: {'face': ''});
break;
default:
var res = IdUtils.matchAvorBv(input: area.split('?').first);
if (res.containsKey('AV')) {
_videoPush(res['AV']! as int, null);
} else if (res.containsKey('BV')) {
_videoPush(null, res['BV'] as String);
} else {
SmartDialog.showToast('未知路径或匹配错误:${value.dataString},先采用浏览器打开');
Get.toNamed(
'/webview',
@@ -280,6 +286,7 @@ class PiliSchame {
}
}
}
}
static List<int> matchNum(String str) {
final RegExp regExp = RegExp(r'\d+');