feat: 免登录观看1080P视频(默认开启) issues #149

This commit is contained in:
guozhigq
2023-10-01 15:53:27 +08:00
parent 52ee5b36be
commit 1061ffca3d
3 changed files with 14 additions and 0 deletions

View File

@ -22,6 +22,7 @@ class VideoHttp {
static Box setting = GStrorage.setting;
static bool enableRcmdDynamic =
setting.get(SettingBoxKey.enableRcmdDynamic, defaultValue: true);
static Box userInfoCache = GStrorage.userInfo;
// 首页推荐视频
static Future rcmdVideoList({required int ps, required int freshIdx}) async {
@ -133,6 +134,11 @@ class VideoHttp {
// 'platform': '',
// 'high_quality': ''
};
// 免登录查看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: data);
if (res.data['code'] == 0) {