opt: webview to video

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-08 22:56:43 +08:00
parent 9a3766e7b7
commit 7cfebcb6ed
7 changed files with 68 additions and 54 deletions

View File

@@ -68,10 +68,11 @@ class IdUtils {
if (input == null || input.isEmpty) {
return result;
}
final RegExp bvRegex = RegExp(r'bv([0-9A-Za-z]+)', caseSensitive: false);
final RegExp bvRegex =
RegExp(r'^bv([0-9A-Za-z]{10})', caseSensitive: false);
String? bvid = bvRegex.firstMatch(input)?.group(1);
late final RegExp avRegex = RegExp(r'av(\d+)', caseSensitive: false);
late final RegExp avRegex = RegExp(r'^av(\d+)', caseSensitive: false);
late String? aid = avRegex.firstMatch(input)?.group(1);
if (bvid != null) {