From 6d9651070efaf1f44f6d7b0c75e57151f9e34c64 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Thu, 9 Jan 2025 13:04:10 +0800 Subject: [PATCH] opt: view pgc Signed-off-by: bggRGjQaUbCoE --- lib/common/widgets/video_card_h.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/common/widgets/video_card_h.dart b/lib/common/widgets/video_card_h.dart index 4ee6fe14..129bfcfb 100644 --- a/lib/common/widgets/video_card_h.dart +++ b/lib/common/widgets/video_card_h.dart @@ -79,16 +79,17 @@ class VideoCardH extends StatelessWidget { return; } if (videoItem is HotVideoItemModel && - videoItem.pgcLabel?.isNotEmpty == true && + // videoItem.pgcLabel?.isNotEmpty == true && videoItem.redirectUrl?.isNotEmpty == true) { String? id = RegExp(r'(ep|ss)\d+') .firstMatch(videoItem.redirectUrl) ?.group(0); if (id != null) { + bool isSeason = id.startsWith('ss'); + id = id.substring(2); Utils.viewBangumi( - seasonId: - id.startsWith('ss') ? id.replaceFirst('ss', '') : null, - epId: id.startsWith('ep') ? id.replaceFirst('ep', '') : null, + seasonId: isSeason ? id : null, + epId: isSeason ? null : id, ); } return;