mod: 历史记录跳转番剧播放

This commit is contained in:
guozhigq
2023-08-04 18:29:38 +08:00
parent c961dc6cf5
commit 01829ad965
5 changed files with 330 additions and 250 deletions

View File

@ -66,6 +66,7 @@ class VideoDetailData {
HonorReply? honorReply;
String? likeIcon;
bool? needJumpBv;
String? epId;
VideoDetailData({
this.bvid,
@ -101,6 +102,7 @@ class VideoDetailData {
this.honorReply,
this.likeIcon,
this.needJumpBv,
this.epId,
});
VideoDetailData.fromJson(Map<String, dynamic> json) {
@ -150,6 +152,15 @@ class VideoDetailData {
: HonorReply.fromJson(json["honor_reply"]);
likeIcon = json["like_icon"];
needJumpBv = json["need_jump_bv"];
if (json['redirect_url'] != null) {
RegExp regex = RegExp(r'\d+');
Iterable<Match> matches = regex.allMatches(json['redirect_url']);
List<String> numbers = [];
for (Match match in matches) {
numbers.add(match.group(0)!);
}
epId = numbers[0];
}
}
Map<String, dynamic> toJson() => {