fix: app端model bvid null issues #546
This commit is contained in:
@ -1,3 +1,5 @@
|
|||||||
|
import 'package:pilipala/utils/id_utils.dart';
|
||||||
|
|
||||||
class RecVideoItemAppModel {
|
class RecVideoItemAppModel {
|
||||||
RecVideoItemAppModel({
|
RecVideoItemAppModel({
|
||||||
this.id,
|
this.id,
|
||||||
@ -50,14 +52,15 @@ class RecVideoItemAppModel {
|
|||||||
? json['player_args']['aid']
|
? json['player_args']['aid']
|
||||||
: int.parse(json['param'] ?? '-1');
|
: int.parse(json['param'] ?? '-1');
|
||||||
aid = json['player_args'] != null ? json['player_args']['aid'] : -1;
|
aid = json['player_args'] != null ? json['player_args']['aid'] : -1;
|
||||||
bvid = null;
|
bvid = json['player_args'] != null
|
||||||
|
? IdUtils.av2bv(json['player_args']['aid'])
|
||||||
|
: '';
|
||||||
cid = json['player_args'] != null ? json['player_args']['cid'] : -1;
|
cid = json['player_args'] != null ? json['player_args']['cid'] : -1;
|
||||||
pic = json['cover'];
|
pic = json['cover'];
|
||||||
stat = RcmdStat.fromJson(json);
|
stat = RcmdStat.fromJson(json);
|
||||||
// 改用player_args中的duration作为原始数据(秒数)
|
// 改用player_args中的duration作为原始数据(秒数)
|
||||||
duration = json['player_args'] != null
|
duration =
|
||||||
? json['player_args']['duration']
|
json['player_args'] != null ? json['player_args']['duration'] : -1;
|
||||||
: -1;
|
|
||||||
//duration = json['cover_right_text'];
|
//duration = json['cover_right_text'];
|
||||||
title = json['title'];
|
title = json['title'];
|
||||||
owner = RcmdOwner.fromJson(json);
|
owner = RcmdOwner.fromJson(json);
|
||||||
|
Reference in New Issue
Block a user