opt: view pgc

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-09 18:37:47 +08:00
parent ff00ade786
commit dc75d59ccd
5 changed files with 36 additions and 22 deletions

View File

@@ -79,18 +79,8 @@ class VideoCardH extends StatelessWidget {
return;
}
if (videoItem is HotVideoItemModel &&
// 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: isSeason ? id : null,
epId: isSeason ? null : id,
);
if (Utils.viewPgcFromUri(videoItem.redirectUrl!)) {
return;
}
}