File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2222
2323def get_download_link (devicecode : str ) -> Optional [str ]:
2424 """Check if a lineageOS version for this device exists on download.lineageos.com and return the respective download link."""
25- url = f"https://download.lineageos.org/{ devicecode } "
25+ url = f"https://download.lineageos.org/api/v2/devices/ { devicecode } "
2626 try :
2727 logger .info (f"Checking { url } " )
2828 # Get Url
2929 res = requests .get (url , timeout = 5 )
3030 # if the request succeeds
3131 if res .status_code == 200 :
32- logger .info (f"{ url } exists." )
33- return url
32+ download_url = f"https://download.lineageos.org/devices/{ devicecode } /builds"
33+ logger .info (f"{ download_url } exists." )
34+ return download_url
3435 else :
3536 logger .info (f"{ url } doesn't exist, status_code: { res .status_code } " )
3637 return None
You can’t perform that action at this time.
0 commit comments