Merge pull request #431 from orz12/fix-notlogin-1080p

fix: 免登录看1080p
This commit is contained in:
guozhigq
2024-01-20 11:45:42 +08:00
committed by GitHub

View File

@ -140,6 +140,12 @@ class VideoHttp {
data['bvid'] = bvid;
}
// 免登录查看1080p
if (userInfoCache.get('userInfoCache') == null &&
setting.get(SettingBoxKey.p1080, defaultValue: true)) {
data['try_look'] = 1;
}
Map params = await WbiSign().makSign({
...data,
'fourk': 1,
@ -148,11 +154,6 @@ class VideoHttp {
'web_location': 1550101,
});
// 免登录查看1080p
if (userInfoCache.get('userInfoCache') == null &&
setting.get(SettingBoxKey.p1080, defaultValue: true)) {
data['try_look'] = 1;
}
try {
var res = await Request().get(Api.videoUrl, data: params);
if (res.data['code'] == 0) {