Unofficial YouTube Music / Spotify Premium client for Android, built in Liquid Glass. Audio effects, Spotify Connect, listening history, 8 languages. Rust core on librespot.
Kotlin alternativeandroidandroid-applicationclientglassmorphisminnertubelibrespotliquid-glassspotifyspotify-connectspotifyapiyoutube-musicyoutube-playerytdlnis
The final icon artwork
Lelonio4c752b1df2f3
diff --git a/.claude/settings.local.json b/.claude/settings.local.jsonindex fbd3725..4e13a67 100644--- a/.claude/settings.local.json+++ b/.claude/settings.local.json@@ -136,7 +136,8 @@"Bash(python3 tools/icon.py)","Bash(git commit -q -m 'Regenerate icons from source, sized by the wave *)","Bash(git commit -q -m 'New light icon artwork *)",- "Bash(git commit -q -m 'Fall back to the Web API when rootlist is down *)"+ "Bash(git commit -q -m 'Fall back to the Web API when rootlist is down *)",+ "Bash(git commit -q -m 'The final icon artwork *)"]}}diff --git a/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.bin b/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.binindex c7eacc3..cf1587d 100644--- a/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.bin+++ b/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.bin@@ -2,27 +2,27 @@ C/C++ Structured Logljh/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/additional_project_files.txtCA-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint �����3 ����3i+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint �����3 ����3ig-e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build.json �����3� ����3n+e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build.json �����3� ����3nl-j/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build_mini.json �����3� �����3[+j/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/android_gradle_build_mini.json �����3� �����3[Y-W/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja �����3�� ����3_+W/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja �����3�� ����3_]-[/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja.txt �����3d+[/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build.ninja.txt �����3db-`/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build_file_index.txt �����3 @ ����3e+`/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/build_file_index.txt �����3 @ ����3ec-a/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json �����3�� ����3i+a/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json �����3�� ����3ig-e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json.bin �����3 �" ����3o+e/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/compile_commands.json.bin �����3 �" ����3om-k/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/metadata_generation_command.txt �����3+k/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/metadata_generation_command.txt �����3� ����3b`-^/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/prefab_config.json �����3 ( ����3g+^/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/prefab_config.json �����3 ( ����3ge-c/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/symbol_folder_index.txt �����3 b ����3D+c/Users/emanuele/Progetto Spotify/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/symbol_folder_index.txt �����3 b ����3DB-@/Users/emanuele/Progetto Spotify/app/src/main/cpp/CMakeLists.txt �����3 � �Ȅ��3\ No newline at end of file+@/Users/emanuele/Progetto Spotify/app/src/main/cpp/CMakeLists.txt �����3 � �Ȅ��3\ No newline at end of filediff --git a/app/icon-src/icona.png b/app/icon-src/icona.pngnew file mode 100644index 0000000..0506135Binary files /dev/null and b/app/icon-src/icona.png differdiff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.pngindex e121283..a7d2a17 100644Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differdiff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.pngindex 356f905..8d1c08e 100644Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differdiff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.pngindex e121283..a7d2a17 100644Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differdiff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.pngindex 1021d17..2babc9e 100644Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differdiff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.pngindex febb2ed..bc472b2 100644Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differdiff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.pngindex 1021d17..2babc9e 100644Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differdiff --git a/app/src/main/res/mipmap-night-hdpi/ic_launcher.png b/app/src/main/res/mipmap-night-hdpi/ic_launcher.pngdeleted file mode 100644index d70317b..0000000Binary files a/app/src/main/res/mipmap-night-hdpi/ic_launcher.png and /dev/null differdiff --git a/app/src/main/res/mipmap-night-hdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-night-hdpi/ic_launcher_foreground.pngdeleted file mode 100644index c306865..0000000Binary files a/app/src/main/res/mipmap-night-hdpi/ic_launcher_foreground.png and /dev/null differdiff --git a/app/src/main/res/mipmap-night-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-night-hdpi/ic_launcher_round.pngdeleted file mode 100644index d70317b..0000000Binary files a/app/src/main/res/mipmap-night-hdpi/ic_launcher_round.png and /dev/null differdiff --git a/app/src/main/res/mipmap-night-mdpi/ic_launcher.png b/app/src/main/res/mipmap-night-mdpi/ic_launcher.pngdeleted file mode 100644index 0854327..0000000Binary files a/app/src/main/res/mipmap-night-mdpi/ic_launcher.png and /dev/null differdiff --git a/app/src/main/res/mipmap-night-mdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-night-mdpi/ic_launcher_foreground.pngdeleted file mode 100644index 553af2f..0000000Binary files a/app/src/main/res/mipmap-night-mdpi/ic_launcher_foreground.png and /dev/null differdiff --git a/app/src/main/res/mipmap-night-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-night-mdpi/ic_launcher_round.pngdeleted file mode 100644index 0854327..0000000Binary files a/app/src/main/res/mipmap-night-mdpi/ic_launcher_round.png and /dev/null differdiff --git a/app/src/main/res/mipmap-night-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-night-xhdpi/ic_launcher.pngdeleted file mode 100644index 247bede..0000000Binary files a/app/src/main/res/mipmap-night-xhdpi/ic_launcher.png and /dev/null differdiff --git a/app/src/main/res/mipmap-night-xhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-night-xhdpi/ic_launcher_foreground.pngdeleted file mode 100644index 8e7c42e..0000000Binary files a/app/src/main/res/mipmap-night-xhdpi/ic_launcher_foreground.png and /dev/null differdiff --git a/app/src/main/res/mipmap-night-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-night-xhdpi/ic_launcher_round.pngdeleted file mode 100644index 247bede..0000000Binary files a/app/src/main/res/mipmap-night-xhdpi/ic_launcher_round.png and /dev/null differdiff --git a/app/src/main/res/mipmap-night-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-night-xxhdpi/ic_launcher.pngdeleted file mode 100644index b873013..0000000Binary files a/app/src/main/res/mipmap-night-xxhdpi/ic_launcher.png and /dev/null differdiff --git a/app/src/main/res/mipmap-night-xxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-night-xxhdpi/ic_launcher_foreground.pngdeleted file mode 100644index e321fdc..0000000Binary files a/app/src/main/res/mipmap-night-xxhdpi/ic_launcher_foreground.png and /dev/null differdiff --git a/app/src/main/res/mipmap-night-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-night-xxhdpi/ic_launcher_round.pngdeleted file mode 100644index b873013..0000000Binary files a/app/src/main/res/mipmap-night-xxhdpi/ic_launcher_round.png and /dev/null differdiff --git a/app/src/main/res/mipmap-night-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-night-xxxhdpi/ic_launcher.pngdeleted file mode 100644index 882a78a..0000000Binary files a/app/src/main/res/mipmap-night-xxxhdpi/ic_launcher.png and /dev/null differdiff --git a/app/src/main/res/mipmap-night-xxxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-night-xxxhdpi/ic_launcher_foreground.pngdeleted file mode 100644index 28b9f24..0000000Binary files a/app/src/main/res/mipmap-night-xxxhdpi/ic_launcher_foreground.png and /dev/null differdiff --git a/app/src/main/res/mipmap-night-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-night-xxxhdpi/ic_launcher_round.pngdeleted file mode 100644index 882a78a..0000000Binary files a/app/src/main/res/mipmap-night-xxxhdpi/ic_launcher_round.png and /dev/null differdiff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.pngindex 68212b0..2311e18 100644Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differdiff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.pngindex 4d4f0b5..e8ce665 100644Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differdiff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.pngindex 68212b0..2311e18 100644Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differdiff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.pngindex 94b29b9..945e1b1 100644Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differdiff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.pngindex 0b213cb..b5401b6 100644Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differdiff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.pngindex 94b29b9..945e1b1 100644Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differdiff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.pngindex d1d37e7..36ce402 100644Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differdiff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.pngindex c024317..c392818 100644Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differdiff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.pngindex d1d37e7..36ce402 100644Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differdiff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xmldeleted file mode 100644index 1c06a1f..0000000--- a/app/src/main/res/values-night/colors.xml+++ /dev/null@@ -1,6 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<resources>- <!-- Sampled from the icon's own plate by tools/icon.py, so the- adaptive icon's background and its artwork meet invisibly. -->- <color name="ic_launcher_background">#1C1C1E</color>-</resources>diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xmlindex 88c660c..15fd073 100644--- a/app/src/main/res/values/colors.xml+++ b/app/src/main/res/values/colors.xml@@ -2,5 +2,5 @@<resources><!-- Sampled from the icon's own plate by tools/icon.py, so theadaptive icon's background and its artwork meet invisibly. -->- <color name="ic_launcher_background">#C8C8CD</color>+ <color name="ic_launcher_background">#222222</color></resources>diff --git a/tools/icon.py b/tools/icon.pyindex e8ad009..213d8b3 100644--- a/tools/icon.py+++ b/tools/icon.py@@ -1,53 +1,91 @@-"""Turns app/icon-src/{light,dark}.png into every icon resource the app ships.+"""Turns the icon source into every icon resource the app ships.-Run it after changing either source:+Run it after changing the artwork:python3 tools/icon.py-The one thing this does that a plain resize would not is size the artwork by-*the wave*, not by the image. An adaptive icon is 108 units wide, of which the-launcher shows 72 and guarantees only the middle 66; the sources fill their-canvas to different extents, so scaling them alike would leave one cropped and-the other adrift. The wave's bounding box is measured and scaled to the safe-zone, and the rest of the canvas is filled with the plate's own colour, so-whatever mask the launcher applies cuts into flat colour rather than into the-mark.+Source: app/icon-src/icona.png. Light and dark launchers get the same icon —+it is a dark plate with a bright mark, which is legible either way, and two+variants of one design would only drift apart.++Two things here are not a plain resize.++The artwork is sized by *the mark*, not by the image. An adaptive icon is 108+units wide, of which the launcher shows 72 and guarantees only the middle 66;+sizing by the image left the wave's ends outside that window and the launcher+cut them off.++And the plate's own colour fills the rest of the canvas — sampled from the+artwork, and also written into colors.xml as the adaptive background. Whatever+mask the launcher applies then cuts into flat colour instead of into the mark."""from PIL import Imageimport os+SOURCE = "app/icon-src/icona.png"+RES = "app/src/main/res"+DENSITIES = {"mdpi": 1, "hdpi": 1.5, "xhdpi": 2, "xxhdpi": 3, "xxxhdpi": 4}FOREGROUND_DP = 108SAFE_DP = 66LEGACY_DP = 48-RES = "app/src/main/res"+def opaque_only(img):+ """Drops the source's own backdrop, keeping the plate.-def plate_colour(img):- """The plate's colour, read where the mark never reaches.+ The artwork is a plate over a half-transparent grey field — a checkerboard+ stand-in that reads as nothing on its own and as a grey square the moment it+ is composited onto anything. Everything below full opacity goes; the edge is+ then softened by a pixel so the plate keeps its antialiasing.+ """+ from PIL import ImageFilter- The corner is tried first and is right for a source that fills its canvas.- One drawn as a rounded plate on transparency has nothing there, so the- fallback reads just inside the top edge instead.+ alpha = img.getchannel("A").point(lambda value: 255 if value > 200 else 0)+ alpha = alpha.filter(ImageFilter.GaussianBlur(0.8))+ out = img.copy()+ out.putalpha(alpha)+ return out+++def plate_colour(img):+ """The plate's colour where it meets the background.++ Read around a ring just inside the plate's edge, and taken as a median.+ Not a corner — this artwork is a circle on transparency, so the corners are+ empty — and not a single point either: the plate is shaded, so one sample+ picks up whatever the gradient happens to be doing there and the seam shows.+ The edge is what the adaptive background butts against, so the edge is what+ it should match."""- corner = img.getpixel((4, 4))- if corner[3] >= 8:- return corner- return img.getpixel((img.width // 2, round(img.height * 0.08)))+ import math++ radius = min(img.width, img.height) * 0.46+ centre = (img.width / 2, img.height / 2)+ samples = []+ for step in range(24):+ angle = step / 24 * 2 * math.pi+ x = round(centre[0] + radius * math.cos(angle))+ y = round(centre[1] + radius * math.sin(angle))+ r, g, b, a = img.getpixel((x, y))+ if a > 200:+ samples.append((r, g, b))+ channels = [sorted(channel)[len(channel) // 2] for channel in zip(*samples)]+ return (channels[0], channels[1], channels[2], 255)-def wave_bounds(img, plate):- """The mark's bounding box: everything that is not the plate colour."""++def mark_bounds(img, plate):+ """The wave's bounding box: what differs from the plate and is opaque."""pixels = img.load()- tolerance = 30+ tolerance = 40left, top, right, bottom = img.width, img.height, 0, 0for y in range(0, img.height, 2):for x in range(0, img.width, 2):r, g, b, a = pixels[x, y]- if a < 8:+ if a < 200:continueif abs(r - plate[0]) + abs(g - plate[1]) + abs(b - plate[2]) < tolerance:continue@@ -56,29 +94,28 @@ def wave_bounds(img, plate):return left, top, right, bottom-def build(variant, suffix):- src = Image.open(f"app/icon-src/{variant}.png").convert("RGBA")+def build(suffix):+ src = opaque_only(Image.open(SOURCE).convert("RGBA"))plate = plate_colour(src)- left, top, right, bottom = wave_bounds(src, plate)+ left, top, right, bottom = mark_bounds(src, plate)mark = max(right - left, bottom - top)for density, density_scale in DENSITIES.items():canvas_px = round(FOREGROUND_DP * density_scale)safe_px = round(SAFE_DP * density_scale)- # Scale the whole image by what the *mark* needs, then centre the image- # on the mark rather than on itself: the sources are not all centred.scale = safe_px / markart = src.resize((max(1, round(src.width * scale)), max(1, round(src.height * scale))),Image.LANCZOS,)- mark_centre = ((left + right) / 2 * scale, (top + bottom) / 2 * scale)+ # Centred on the mark rather than on the image: the two need not agree.+ centre = ((left + right) / 2 * scale, (top + bottom) / 2 * scale)canvas = Image.new("RGBA", (canvas_px, canvas_px), plate)canvas.paste(art,- (round(canvas_px / 2 - mark_centre[0]), round(canvas_px / 2 - mark_centre[1])),+ (round(canvas_px / 2 - centre[0]), round(canvas_px / 2 - centre[1])),art,)@@ -86,9 +123,13 @@ def build(variant, suffix):os.makedirs(out, exist_ok=True)canvas.save(f"{out}/ic_launcher_foreground.png")- # The whole icon, for launchers older than adaptive icons.+ # The whole icon, for launchers older than adaptive icons. Composited+ # onto the plate: those do not mask, so transparency would show the+ # home screen through the artwork's edges.legacy_px = round(LEGACY_DP * density_scale)- legacy = src.resize((legacy_px, legacy_px), Image.LANCZOS)+ legacy = Image.new("RGBA", (legacy_px, legacy_px), plate)+ scaled = src.resize((legacy_px, legacy_px), Image.LANCZOS)+ legacy.paste(scaled, (0, 0), scaled)legacy.save(f"{out}/ic_launcher.png")legacy.save(f"{out}/ic_launcher_round.png")@@ -106,11 +147,6 @@ def colours_xml(colour):)-light = build("light", "")-dark = build("dark", "-night")--open(f"{RES}/values/colors.xml", "w").write(colours_xml(light))-os.makedirs(f"{RES}/values-night", exist_ok=True)-open(f"{RES}/values-night/colors.xml", "w").write(colours_xml(dark))--print("light plate", light, "dark plate", dark)+plate = build("")+open(f"{RES}/values/colors.xml", "w").write(colours_xml(plate))+print("plate", plate)