mirror of
https://github.com/ikunshare/Onekey.git
synced 2026-01-13 00:27:32 +08:00
fix: 少个参数
This commit is contained in:
@@ -60,7 +60,7 @@ async def main(app_id, repos):
|
||||
collected_depots.extend(result)
|
||||
if collected_depots:
|
||||
if isSteamTools:
|
||||
migrate(st_use=True)
|
||||
await migrate(st_use=True, session=session)
|
||||
await stool_add(collected_depots, app_id)
|
||||
log.info(' ✅ 找到SteamTools,已添加解锁文件')
|
||||
if isGreenLuma:
|
||||
|
||||
@@ -35,20 +35,20 @@ async def migrate(st_use, session):
|
||||
|
||||
async with session.get(down_url, stream=True) as r:
|
||||
if r.status == 200:
|
||||
total_size = int(r.headers.get('Content-Length', 0))
|
||||
total_size = int(await r.headers.get('Content-Length', 0))
|
||||
chunk_size = 8192
|
||||
progress = tqdm(total=total_size, unit='B', unit_scale=True)
|
||||
|
||||
async with aiofiles.open(out_path, mode='wb') as f:
|
||||
async for chunk in r.content.iter_chunked(chunk_size=chunk_size):
|
||||
await f.write(chunk)
|
||||
progress.update(len(chunk))
|
||||
await progress.update(len(chunk))
|
||||
|
||||
progress.close()
|
||||
await progress.close()
|
||||
else:
|
||||
log.error('⚠ 网络错误')
|
||||
|
||||
subprocess.run(str(out_path))
|
||||
os.rmdir(temp_path)
|
||||
else:
|
||||
log.info('✅ 未使用SteamTools,停止迁移')
|
||||
log.info('✅ 未使用SteamTools,停止迁移')
|
||||
Reference in New Issue
Block a user