From f47c500c5be170936a2e03c754b5730c6ade2054 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Sun, 5 Jan 2025 15:25:47 +0800 Subject: [PATCH] fix: pgclabel data Signed-off-by: bggRGjQaUbCoE --- lib/common/widgets/video_card_h.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/common/widgets/video_card_h.dart b/lib/common/widgets/video_card_h.dart index 5113169de..ca7a3671b 100644 --- a/lib/common/widgets/video_card_h.dart +++ b/lib/common/widgets/video_card_h.dart @@ -1,4 +1,5 @@ import 'package:PiliPalaX/common/widgets/image_save.dart'; +import 'package:PiliPalaX/models/model_hot_video_item.dart'; import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:get/get.dart'; @@ -77,7 +78,8 @@ class VideoCardH extends StatelessWidget { SmartDialog.showToast('课堂视频暂不支持播放'); return; } - if (videoItem.pgcLabel?.isNotEmpty == true && + if (videoItem is HotVideoItemModel && + videoItem.pgcLabel?.isNotEmpty == true && videoItem.redirectUrl?.isNotEmpty == true) { String? id = RegExp(r'(ep|ss)\d+') .firstMatch(videoItem.redirectUrl) @@ -128,7 +130,8 @@ class VideoCardH extends StatelessWidget { width: maxWidth, height: maxHeight, ), - if (videoItem.pgcLabel?.isNotEmpty == true) + if (videoItem is HotVideoItemModel && + videoItem.pgcLabel?.isNotEmpty == true) PBadge( text: videoItem.pgcLabel, top: 6.0,