✨ 优先查找 arm64 apk 文件
This commit is contained in:
parent
e8a79dd15d
commit
568a0eb9ef
@ -65,8 +65,13 @@ async def download(url: str, name: str, pack_name: str) -> (str, str):
|
||||
data = Module(content)
|
||||
url = None
|
||||
if data.releases and data.releases[0].releaseAssets:
|
||||
url = data.releases[0].releaseAssets[0].url
|
||||
mime = data.releases[0].releaseAssets[0].name.split(".")[-1:][0]
|
||||
# find arm64 or universal first
|
||||
asset = next(
|
||||
(i for i in data.releases[0].releaseAssets if "arm64" in i.name or "universal" in i.name),
|
||||
data.releases[0].releaseAssets[0],
|
||||
)
|
||||
url = asset.url
|
||||
mime = asset.name.split(".")[-1:][0]
|
||||
name = data.name.replace('.', '_') + "-" + data.latestRelease + "." + mime
|
||||
if not url:
|
||||
raise FileNotFoundError
|
||||
|
@ -1,5 +1,5 @@
|
||||
Pyrogram>=2.0.59
|
||||
Tgcrypto>=1.2.4
|
||||
Pyrogram==2.0.97
|
||||
Tgcrypto==1.2.5
|
||||
httpx>=0.22.0
|
||||
apscheduler>=3.8.1
|
||||
sqlitedict>=2.0.0
|
||||
|
Loading…
Reference in New Issue
Block a user