mirror of
https://github.com/revanced/revanced-releases-api.git
synced 2025-05-08 01:24:25 +02:00
refactor: better way to download patches.json
This commit is contained in:
parent
1826cab3d8
commit
b57366b854
@ -130,9 +130,9 @@ class Releases:
|
||||
"""
|
||||
|
||||
release_dict = await self.get_tag_release(repository, tag)
|
||||
tag_name = release_dict['tag_name']
|
||||
|
||||
return await self.httpx_client.get(f"https://github.com/{repository}/releases/download/{tag_name}/patches.json").json()
|
||||
for asset in release_dict['assets']:
|
||||
if asset['name'] == "patches.json":
|
||||
return await self.httpx_client.get(asset['browser_download_url']).json()
|
||||
|
||||
async def get_patches_json(self, repository: str, tag: str = "latest") -> dict:
|
||||
"""Get patches.json from revanced-patches repository.
|
||||
|
Loading…
x
Reference in New Issue
Block a user