mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: 存在相同解码格式时的逻辑
This commit is contained in:
@@ -190,9 +190,11 @@ class VideoDetailController extends GetxController
|
|||||||
flag = 1;
|
flag = 1;
|
||||||
break;
|
break;
|
||||||
} else if (i.startsWith(defaultDecodeFormats.code)) {
|
} else if (i.startsWith(defaultDecodeFormats.code)) {
|
||||||
flag += 2;
|
flag = 2;
|
||||||
} else if (i.startsWith(secondDecodeFormats.code)) {
|
} else if (i.startsWith(secondDecodeFormats.code)) {
|
||||||
flag += 4;
|
if (flag == 0) {
|
||||||
|
flag = 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (flag == 1) {
|
if (flag == 1) {
|
||||||
@@ -203,7 +205,7 @@ class VideoDetailController extends GetxController
|
|||||||
currentDecodeFormats =
|
currentDecodeFormats =
|
||||||
VideoDecodeFormatsCode.fromString(videoList.first.codecs!)!;
|
VideoDecodeFormatsCode.fromString(videoList.first.codecs!)!;
|
||||||
firstVideo = videoList.first;
|
firstVideo = videoList.first;
|
||||||
} else if (flag == 2 || flag == 6) {
|
} else if (flag == 2) {
|
||||||
//defaultDecodeFormats
|
//defaultDecodeFormats
|
||||||
currentDecodeFormats = defaultDecodeFormats;
|
currentDecodeFormats = defaultDecodeFormats;
|
||||||
firstVideo = videoList.firstWhere(
|
firstVideo = videoList.firstWhere(
|
||||||
@@ -340,7 +342,7 @@ class VideoDetailController extends GetxController
|
|||||||
flag = 1;
|
flag = 1;
|
||||||
break;
|
break;
|
||||||
} else if (i.startsWith(secondDecodeFormats.code)) {
|
} else if (i.startsWith(secondDecodeFormats.code)) {
|
||||||
flag += 2;
|
flag = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (flag == 2) {
|
if (flag == 2) {
|
||||||
|
|||||||
Reference in New Issue
Block a user