We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c985726 commit 21a7981Copy full SHA for 21a7981
1 file changed
openandroidinstaller/utils.py
@@ -22,15 +22,16 @@
22
23
def get_download_link(devicecode: str) -> Optional[str]:
24
"""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}"
+ url = f"https://download.lineageos.org/api/v2/devices/{devicecode}"
26
try:
27
logger.info(f"Checking {url}")
28
# Get Url
29
res = requests.get(url, timeout=5)
30
# if the request succeeds
31
if res.status_code == 200:
32
- logger.info(f"{url} exists.")
33
- return url
+ download_url = f"https://download.lineageos.org/devices/{devicecode}/builds"
+ logger.info(f"{download_url} exists.")
34
+ return download_url
35
else:
36
logger.info(f"{url} doesn't exist, status_code: {res.status_code}")
37
return None
0 commit comments