opt: view pgc

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-09 13:04:10 +08:00
parent c8ad94343a
commit 6d9651070e

View File

@@ -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;