This commit is contained in:
jxxghp 2024-06-19 13:14:02 +08:00
parent 41d347bcef
commit b93c97938c
2 changed files with 2 additions and 14 deletions

View File

@ -222,7 +222,7 @@ class AliyunHelper:
return '类 Unix 操作系统' return '类 Unix 操作系统'
res = RequestUtils(headers=headers, timeout=5).post_res(self.create_session_url, json={ res = RequestUtils(headers=headers, timeout=5).post_res(self.create_session_url, json={
'deviceName': f'MoviePilot Web', 'deviceName': f'MoviePilot {SystemUtils.platform}',
'modelName': __os_name(), 'modelName': __os_name(),
'pubKey': self._X_PUBLIC_KEY, 'pubKey': self._X_PUBLIC_KEY,
}) })

View File

@ -66,21 +66,9 @@ class U115Helper(metaclass=Singleton):
""" """
生成二维码 生成二维码
""" """
def __get_os():
"""
获取操作系统名称
"""
if SystemUtils.is_windows():
return LoginTarget.Windows
elif SystemUtils.is_macos():
return LoginTarget.Mac
else:
return LoginTarget.Linux
try: try:
self.cloud = py115.connect() self.cloud = py115.connect()
self._session = self.cloud.qrcode_login(__get_os()) self._session = self.cloud.qrcode_login(LoginTarget.Web)
image_bin = self._session.image_data image_bin = self._session.image_data
if not image_bin: if not image_bin:
logger.warn("115生成二维码失败未获取到二维码数据") logger.warn("115生成二维码失败未获取到二维码数据")