From afa7405fda28262b2417f42b4a8b41105e0996dc Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Mon, 7 Oct 2024 15:06:21 +0800 Subject: [PATCH] fix: resolve `bvid` **fix can not view charged video from rcmd --- lib/models/home/rcmd/result.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/models/home/rcmd/result.dart b/lib/models/home/rcmd/result.dart index 95e7b710..a5eb7ee9 100644 --- a/lib/models/home/rcmd/result.dart +++ b/lib/models/home/rcmd/result.dart @@ -56,9 +56,10 @@ class RecVideoItemAppModel { ? json['player_args']['aid'] : int.parse(json['param'] ?? '-1'); aid = json['player_args'] != null ? json['player_args']['aid'] : -1; - bvid = json['player_args'] != null - ? IdUtils.av2bv(json['player_args']['aid']) - : ''; + bvid = json['bvid'] ?? + (json['player_args'] != null + ? IdUtils.av2bv(json['player_args']['aid']) + : ''); cid = json['player_args'] != null ? json['player_args']['cid'] : -1; pic = json['cover']; stat = RcmdStat.fromJson(json);