redirect ugc to pgc

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-03-08 11:25:20 +08:00
parent a1f15b5da5
commit 01a74e191a
6 changed files with 34 additions and 12 deletions

View File

@@ -585,6 +585,7 @@ abstract final class PageUtils {
bool isPgc = true,
int? progress, // milliseconds
int? aid,
bool off = false,
}) {
RegExpMatch? match = _pgcRegex.firstMatch(uri);
if (match != null) {
@@ -595,12 +596,14 @@ abstract final class PageUtils {
seasonId: isSeason ? id : null,
epId: isSeason ? null : id,
progress: progress,
off: off,
);
} else {
viewPugv(
seasonId: isSeason ? id : null,
epId: isSeason ? null : id,
aid: aid,
off: off,
);
}
return true;
@@ -628,6 +631,7 @@ abstract final class PageUtils {
dynamic seasonId,
dynamic epId,
int? progress, // milliseconds
bool off = false,
}) async {
try {
SmartDialog.showLoading(msg: '资源获取中');
@@ -652,6 +656,7 @@ abstract final class PageUtils {
'pgcApi': true,
'pgcItem': response,
},
off: off,
);
}
@@ -700,6 +705,7 @@ abstract final class PageUtils {
extraArguments: {
'pgcItem': response,
},
off: off,
);
return;
} else {
@@ -725,6 +731,7 @@ abstract final class PageUtils {
dynamic seasonId,
dynamic epId,
int? aid,
bool off = false,
}) async {
try {
SmartDialog.showLoading(msg: '资源获取中');
@@ -752,6 +759,7 @@ abstract final class PageUtils {
extraArguments: {
'pgcItem': response,
},
off: off,
);
} else {
SmartDialog.showToast('资源加载失败');

View File

@@ -0,0 +1,4 @@
String? noneNullOrEmptyString(String? value) {
if (value == null || value.isEmpty) return null;
return value;
}