diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 1ccec78a..286a5510 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -1386,6 +1386,13 @@ def extract_apk_icons(icon_filename, apk, apkzip, repo_dir): icon_dest = os.path.join(icon_dir, icon_filename) # Extract the icon files per density + if icon_src.endswith('.xml'): + png = os.path.basename(icon_src)[:-4] + '.png' + for f in apkzip.namelist(): + if f.endswith(png): + m = re.match(r'res/drawable-(x*[hlm]dpi).*/', f) + if m and screen_resolutions[m.group(1)] == density: + icon_src = f try: with open(icon_dest, 'wb') as f: f.write(get_icon_bytes(apkzip, icon_src))