Skip to content

Commit

Permalink
feat: 特定视频链接解析
Browse files Browse the repository at this point in the history
  • Loading branch information
orz12 committed May 20, 2024
1 parent c492992 commit fd51cdd
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions lib/utils/app_scheme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,22 @@ class PiliSchame {
Get.toNamed('/member?mid=$area', arguments: {'face': ''});
break;
default:
SmartDialog.showToast('未知路径或匹配错误:${value.dataString},先采用浏览器打开');
Get.toNamed(
'/webview',
parameters: {
'url': value.dataString ?? "",
'type': 'url',
'pageTitle': ''
},
);
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',
parameters: {
'url': value.dataString ?? "",
'type': 'url',
'pageTitle': ''
},
);
}
}
}
}
Expand Down

0 comments on commit fd51cdd

Please sign in to comment.