mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-27 22:05:53 +08:00
precheck video dimension
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user