precheck video dimension

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-04-23 17:08:51 +08:00
parent efc202c10f
commit 5b5983ed50
32 changed files with 237 additions and 81 deletions

View File

@@ -617,11 +617,13 @@ abstract final class PiliScheme {
IdUtils.bvRegex.firstMatch(path)?.group(0);
if (bvid != null) {
if (mediaId != null) {
final int? cid = await SearchHttp.ab2c(bvid: bvid);
final res = await SearchHttp.ab2cWithDimension(bvid: bvid);
final cid = res?.cid;
if (cid != null) {
PageUtils.toVideoPage(
bvid: bvid,
cid: cid,
dimension: res!.dimension,
extraArguments: {
'sourceType': SourceType.playlist,
'favTitle': '播放列表',
@@ -877,11 +879,12 @@ abstract final class PiliScheme {
if (showDialog) {
SmartDialog.showLoading<dynamic>(msg: '获取中...');
}
final int? cid = await SearchHttp.ab2c(
final res = await SearchHttp.ab2cWithDimension(
bvid: bvid,
aid: aid,
part: part != null ? int.tryParse(part) : null,
);
final cid = res?.cid;
if (showDialog) {
SmartDialog.dismiss();
}
@@ -892,6 +895,7 @@ abstract final class PiliScheme {
cid: cid,
progress: progress,
off: off,
dimension: res!.dimension,
);
}
} catch (e) {