From b78a52148c8274f18c0c471fa681b401253557f8 Mon Sep 17 00:00:00 2001 From: orz12 Date: Fri, 8 Mar 2024 03:45:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AD=98=E5=9C=A8=E7=9B=B8=E5=90=8C?= =?UTF-8?q?=E8=A7=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E6=97=B6=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/video/detail/controller.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/pages/video/detail/controller.dart b/lib/pages/video/detail/controller.dart index 39088db3..7fed9a1b 100644 --- a/lib/pages/video/detail/controller.dart +++ b/lib/pages/video/detail/controller.dart @@ -190,9 +190,11 @@ class VideoDetailController extends GetxController flag = 1; break; } else if (i.startsWith(defaultDecodeFormats.code)) { - flag += 2; + flag = 2; } else if (i.startsWith(secondDecodeFormats.code)) { - flag += 4; + if (flag == 0) { + flag = 4; + } } } if (flag == 1) { @@ -203,7 +205,7 @@ class VideoDetailController extends GetxController currentDecodeFormats = VideoDecodeFormatsCode.fromString(videoList.first.codecs!)!; firstVideo = videoList.first; - } else if (flag == 2 || flag == 6) { + } else if (flag == 2) { //defaultDecodeFormats currentDecodeFormats = defaultDecodeFormats; firstVideo = videoList.firstWhere( @@ -340,7 +342,7 @@ class VideoDetailController extends GetxController flag = 1; break; } else if (i.startsWith(secondDecodeFormats.code)) { - flag += 2; + flag = 2; } } if (flag == 2) {