mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: check cellular
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1013,18 +1013,18 @@ class VideoDetailController extends GetxController
|
||||
// 视频链接
|
||||
Future queryVideoUrl() async {
|
||||
if (cacheVideoQa == null) {
|
||||
await Utils.checkConnectivity().then((res) {
|
||||
cacheVideoQa = res == ConnectivityResult.mobile
|
||||
? setting.get(SettingBoxKey.defaultVideoQaCellular,
|
||||
defaultValue: VideoQuality.high1080.code)
|
||||
: setting.get(SettingBoxKey.defaultVideoQa,
|
||||
defaultValue: VideoQuality.values.last.code);
|
||||
await Connectivity().checkConnectivity().then((res) {
|
||||
cacheVideoQa = res.contains(ConnectivityResult.wifi)
|
||||
? setting.get(SettingBoxKey.defaultVideoQa,
|
||||
defaultValue: VideoQuality.values.last.code)
|
||||
: setting.get(SettingBoxKey.defaultVideoQaCellular,
|
||||
defaultValue: VideoQuality.high1080.code);
|
||||
|
||||
cacheAudioQa = res == ConnectivityResult.mobile
|
||||
? setting.get(SettingBoxKey.defaultAudioQaCellular,
|
||||
defaultValue: AudioQuality.k192.code)
|
||||
: setting.get(SettingBoxKey.defaultAudioQa,
|
||||
defaultValue: AudioQuality.hiRes.code);
|
||||
cacheAudioQa = res.contains(ConnectivityResult.wifi)
|
||||
? setting.get(SettingBoxKey.defaultAudioQa,
|
||||
defaultValue: AudioQuality.hiRes.code)
|
||||
: setting.get(SettingBoxKey.defaultAudioQaCellular,
|
||||
defaultValue: AudioQuality.k192.code);
|
||||
});
|
||||
}
|
||||
var result = await VideoHttp.videoUrl(cid: cid.value, bvid: bvid);
|
||||
|
||||
Reference in New Issue
Block a user