mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-11 04:27:47 +08:00
fix get video part dimension
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -248,13 +248,15 @@ class VideoDetailController extends GetxController
|
||||
if (width == null || height == null) {
|
||||
if (isUgc && !isFileSource) {
|
||||
final ugcIntroCtr = Get.find<UgcIntroController>(tag: heroTag);
|
||||
final data = ugcIntroCtr.videoDetail.value;
|
||||
if (data.cid == cid.value) {
|
||||
final dimension = data.dimension!;
|
||||
final cid = this.cid.value;
|
||||
final part = ugcIntroCtr.videoDetail.value.pages?.firstWhereOrNull(
|
||||
(e) => e.cid == cid,
|
||||
);
|
||||
if (part != null) {
|
||||
final dimension = part.dimension!;
|
||||
width = dimension.width!;
|
||||
height = dimension.height!;
|
||||
} else {
|
||||
ugcIntroCtr.queryVideoIntro().whenComplete(_setVideoHeight);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user