mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2025-02-05 14:12:34 -06:00
fix: Use the new api
This commit is contained in:
parent
3fa866b90e
commit
2890da4f76
2 changed files with 5 additions and 2 deletions
|
@ -71,7 +71,8 @@ def get_apks(appstate):
|
|||
|
||||
# Get latest patches using the ReVanced API
|
||||
try:
|
||||
patches = req.get('https://releases.revanced.app/patches').json()
|
||||
patches_json = next(filter(lambda x: x['repository'] == 'revanced/revanced-patches', appstate['tools'])) # Get the first result
|
||||
patches = req.get(patches_json['browser_download_url']).json()
|
||||
except req.exceptions.RequestException as e:
|
||||
err_exit(f"Error fetching patches, {e}", appstate)
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ from ReVancedBuilder.Cleanup import move_apps, err_exit
|
|||
def update_tools(appstate):
|
||||
for item in ['revanced-cli', 'revanced-integrations', 'revanced-patches']:
|
||||
print(f"Checking updates for {item}...")
|
||||
tools = appstate['tools']
|
||||
*_, tool = filter(lambda x: x['repository'] == 'revanced/'+item, tools) # Get the last result
|
||||
latest_ver = Version(tool['version'])
|
||||
|
||||
|
@ -146,7 +147,8 @@ appstate['notification_config'].read('notification_config')
|
|||
|
||||
# Pull the latest information using the ReVanced API
|
||||
try:
|
||||
tools = req.get('https://releases.revanced.app/tools').json()['tools']
|
||||
tools = req.get('https://api.revanced.app/tools').json()['tools']
|
||||
appstate['tools'] = tools
|
||||
except req.exceptions.RequestException as e:
|
||||
err_exit(f"Error fetching patch list, {e}", appstate)
|
||||
|
||||
|
|
Loading…
Reference in a new issue