mod: 字符替换、跳转播放

This commit is contained in:
guozhigq
2023-06-24 16:54:39 +08:00
parent f522886dc2
commit 7174eef890
8 changed files with 43 additions and 26 deletions

View File

@ -1,4 +1,5 @@
import 'package:pilipala/utils/em.dart';
import 'package:pilipala/utils/utils.dart';
class SearchVideoModel {
SearchVideoModel({this.list});
@ -86,25 +87,12 @@ class SearchVideoItemModel {
videoReview = json['video_review'];
pubdate = json['pubdate'];
senddate = json['senddate'];
duration = _dutation(json['duration']);
duration = Utils.duration(json['duration']);
owner = Owner.fromJson(json);
stat = Stat.fromJson(json);
}
}
_dutation(String duration) {
List timeList = duration.split(':');
int len = timeList.length;
if (len == 2) {
return int.parse(timeList[0]) * 60 + int.parse(timeList[1]);
}
if (len == 3) {
return int.parse(timeList[0]) * 3600 +
int.parse(timeList[1]) * 60 +
timeList[2];
}
}
class Stat {
Stat({
this.view,