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
Lyrics centre stage over a blurred Canvas; fix the card blur artefact
Lelonio4218c9a95037
diff --git a/.claude/settings.local.json b/.claude/settings.local.jsonindex feb4880..e3c0549 100644--- a/.claude/settings.local.json+++ b/.claude/settings.local.json@@ -61,7 +61,8 @@"Bash(git -c user.name=Emanuele -c [email protected] commit -qm 'Turn the home page into a feed *)","Bash(git -c user.name=Emanuele -c [email protected] commit -qm 'Rewrite the home page on the glass material *)","Bash(git -c user.name=Emanuele -c [email protected] commit -qm 'Home: profile header, recency-ordered playlists, plainer cards *)",- "Bash(git -c user.name=Emanuele -c [email protected] commit -qm 'Collapsing home header, sharper cards, library rewrite *)"+ "Bash(git -c user.name=Emanuele -c [email protected] commit -qm 'Collapsing home header, sharper cards, library rewrite *)",+ "Bash(git -c user.name=Emanuele -c [email protected] commit -qm 'Lyrics centre stage over a blurred Canvas; fix the card blur artefact *)"]}}diff --git a/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.bin b/app/.cxx/RelWithDebInfo/151m4dr6/arm64-v8a/configure_fingerprint.binindex 57a01c2..1e16389 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/src/main/java/dev/emanuele/spot/ui/home/HomeScreen.kt b/app/src/main/java/dev/emanuele/spot/ui/home/HomeScreen.ktindex 336e736..c2ec679 100644--- a/app/src/main/java/dev/emanuele/spot/ui/home/HomeScreen.kt+++ b/app/src/main/java/dev/emanuele/spot/ui/home/HomeScreen.kt@@ -31,7 +31,6 @@ import androidx.compose.runtime.rememberimport androidx.compose.runtime.setValueimport androidx.compose.ui.Alignmentimport androidx.compose.ui.Modifier-import androidx.compose.ui.draw.blurimport androidx.compose.ui.draw.clipimport androidx.compose.ui.graphics.Brushimport androidx.compose.ui.graphics.Color@@ -257,6 +256,14 @@ private fun Header(Column(Modifier.fillMaxWidth()+ // Seats the header on the page instead of leaving it floating over+ // whatever the list has scrolled underneath it.+ .background(+ Brush.verticalGradient(+ 0f to Color.Black.copy(alpha = 0.45f),+ 1f to Color.Transparent,+ ),+ ).padding(top = topPadding),) {Row(@@ -265,7 +272,7 @@ private fun Header(.padding(start = 24.dp,end = 24.dp,- top = lerp(20.dp, 6.dp, collapse),+ top = lerp(18.dp, 2.dp, collapse),),verticalAlignment = Alignment.CenterVertically,) {@@ -323,7 +330,7 @@ private fun FilterRow(selected: Feed, backdrop: Backdrop, onSelect: (Feed) -> UnLazyRow(contentPadding = PaddingValues(horizontal = 20.dp),horizontalArrangement = Arrangement.spacedBy(8.dp),- modifier = Modifier.padding(top = 22.dp),+ modifier = Modifier.padding(top = 14.dp, bottom = 10.dp),) {items(Feed.entries.toList(), key = { it.name }) { entry ->val isSelected = entry == selected@@ -371,17 +378,20 @@ private fun FeedCard(item: SearchItem, onClick: () -> Unit) {//// Spotify serves album art at 640px and no larger, so a cover stretched// across a 1080px-wide card is upscaled by nearly two and looks soft —- // which is exactly the "low quality covers" this replaced. Blurred, that- // upscaling is invisible, so the background can be full width while the- // cover that has to be sharp is displayed well under its native size.+ // which is exactly the "low quality covers" this replaced. The+ // background is allowed to be soft, so it takes the full width; the copy+ // that has to be sharp is drawn well under its native size.+ //+ // Softened by decoding it tiny and letting the upscale blur it, rather+ // than by `Modifier.blur`. That modifier renders into a layer of its own+ // which is not bound by this box's clip, so it painted a hard black+ // rectangle past the card's rounded corners and up into the header.Artwork(url = item.artworkUrl,title = item.title,- modifier = Modifier- .matchParentSize()- .blur(36.dp),+ modifier = Modifier.matchParentSize(),corner = 0.dp,- decodeSize = 200.dp,+ decodeSize = 24.dp,)Box(Modifier.matchParentSize().background(Color.Black.copy(alpha = 0.42f)))diff --git a/app/src/main/java/dev/emanuele/spot/ui/player/LyricsView.kt b/app/src/main/java/dev/emanuele/spot/ui/player/LyricsView.ktindex 47a2ec5..61aa72b 100644--- a/app/src/main/java/dev/emanuele/spot/ui/player/LyricsView.kt+++ b/app/src/main/java/dev/emanuele/spot/ui/player/LyricsView.kt@@ -114,7 +114,7 @@ private fun LyricRow()val scale by animateFloatAsState(- targetValue = if (isActive) 1f else 0.88f,+ targetValue = if (isActive) 1f else 0.90f,animationSpec = springSpec,label = "lyricScale",)@@ -135,7 +135,7 @@ private fun LyricRow(// it (API 31+); below that it is a no-op and the alpha ramp carries it.val blurRadius = when {unsynced || distance <= 1 -> 0.dp- else -> ((distance - 1) * 0.9f).coerceAtMost(3.5f).dp+ else -> ((distance - 1) * 1.1f).coerceAtMost(4.5f).dp}Box(@@ -147,13 +147,12 @@ private fun LyricRow() {Text(text = text,- style = MaterialTheme.typography.titleLarge.copy(fontSize = 21.sp, lineHeight = 26.sp),- fontWeight = if (isActive) FontWeight.Bold else FontWeight.SemiBold,- color = if (isActive) {- MaterialTheme.colorScheme.primary- } else {- MaterialTheme.colorScheme.onSurface- },+ style = MaterialTheme.typography.titleLarge.copy(fontSize = 27.sp, lineHeight = 33.sp),+ fontWeight = FontWeight.Bold,+ // White rather than the artwork accent. These sit over a Canvas now,+ // and an accent pulled from the cover can land anywhere — including+ // on the clip's own colours.+ color = Color.White,textAlign = TextAlign.Start,modifier = Modifier.then(if (blurRadius > 0.dp) Modifier.blur(blurRadius) else Modifier)diff --git a/app/src/main/java/dev/emanuele/spot/ui/player/PlayerPanel.kt b/app/src/main/java/dev/emanuele/spot/ui/player/PlayerPanel.ktindex a324c6d..beec506 100644--- a/app/src/main/java/dev/emanuele/spot/ui/player/PlayerPanel.kt+++ b/app/src/main/java/dev/emanuele/spot/ui/player/PlayerPanel.kt@@ -91,7 +91,12 @@ fun PlayerPanelSection(}}- AnimatedVisibility(visible = panel != PlayerPanel.NONE) {+ // Lyrics are not in here any more: they are drawn in the middle of the+ // player, over the blurred Canvas. The tab stays because it is still+ // what turns them on — it just no longer opens a sheet.+ AnimatedVisibility(+ visible = panel != PlayerPanel.NONE && panel != PlayerPanel.LYRICS,+ ) {GlassSurface(backdrop = backdrop,shape = RoundedCornerShape(26.dp),diff --git a/app/src/main/java/dev/emanuele/spot/ui/player/PlayerScreen.kt b/app/src/main/java/dev/emanuele/spot/ui/player/PlayerScreen.ktindex 52f3bf0..0371282 100644--- a/app/src/main/java/dev/emanuele/spot/ui/player/PlayerScreen.kt+++ b/app/src/main/java/dev/emanuele/spot/ui/player/PlayerScreen.kt@@ -13,6 +13,7 @@ import androidx.compose.animation.togetherWithimport androidx.compose.animation.core.Springimport androidx.compose.animation.core.animateFloatAsStateimport androidx.compose.animation.core.spring+import androidx.compose.animation.core.animateDpAsStateimport androidx.compose.animation.core.tweenimport androidx.compose.foundation.backgroundimport androidx.compose.foundation.clickable@@ -56,6 +57,7 @@ import androidx.compose.runtime.rememberimport androidx.compose.runtime.setValueimport androidx.compose.ui.Alignmentimport androidx.compose.ui.Modifier+import androidx.compose.ui.draw.blurimport androidx.compose.ui.draw.clipimport androidx.compose.ui.graphics.Brushimport androidx.compose.ui.graphics.Color@@ -131,10 +133,22 @@ fun PlayerScreen(val canvasBackdrop = rememberLayerBackdrop()val glassBackdrop = rememberCombinedBackdrop(backdrop, canvasBackdrop)+ // Lyrics take over the middle of the screen rather than opening a panel at+ // the bottom, and the Canvas goes out of focus behind them: a clip is+ // motion, and reading over motion is the one thing that does not work. Blur+ // keeps it present as light and colour without competing for attention.+ val lyricsOpen = panel == PlayerPanel.LYRICS+ val canvasBlur by animateDpAsState(+ targetValue = if (lyricsOpen) 26.dp else 0.dp,+ animationSpec = tween(320),+ label = "canvasBlur",+ )+Box(Modifier.fillMaxSize()) {Box(Modifier.fillMaxSize()+ .then(if (canvasBlur > 0.dp) Modifier.blur(canvasBlur) else Modifier).layerBackdrop(canvasBackdrop),) {Crossfade(@@ -228,7 +242,7 @@ fun PlayerScreen(// column arranged from the bottom, "as much space as it// wants" is nothing once the controls have taken theirs.AnimatedVisibility(- visible = canvas == null,+ visible = canvas == null && !lyricsOpen,enter = fadeIn(tween(400)) + scaleIn(tween(400), initialScale = 0.92f),exit = fadeOut(tween(250)) + scaleOut(tween(250), targetScale = 0.92f),modifier = Modifier.weight(1f),@@ -238,6 +252,22 @@ fun PlayerScreen(}}+ // The lyrics get the same space, whether or not there is+ // a Canvas behind them.+ AnimatedVisibility(+ visible = lyricsOpen,+ enter = fadeIn(tween(400)),+ exit = fadeOut(tween(220)),+ modifier = Modifier.weight(1f),+ ) {+ LyricsStage(+ lyrics = lyrics,+ loading = lyricsLoading,+ positionMs = positionMs,+ onSeek = onSeek,+ )+ }+Spacer(Modifier.height(20.dp))// Title and artist on their own capsule, with the two@@ -647,3 +677,40 @@ internal val GlassInkDim = Color.White.copy(alpha = 0.68f)* player and the search button beside it.*/internal val GlassFilm = Color.White.copy(alpha = 0.12f)++/**+ * The lyrics, centre stage.+ *+ * Its own composable only so the empty and loading cases stay out of the layout+ * above: this sits where the cover would, so "no lyrics" has to occupy the same+ * space rather than collapsing the screen around it.+ */+@Composable+private fun LyricsStage(+ lyrics: dev.emanuele.spot.data.Lyrics?,+ loading: Boolean,+ positionMs: State<Long>,+ onSeek: (Long) -> Unit,+) {+ Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {+ when {+ loading -> androidx.compose.material3.CircularProgressIndicator(+ color = GlassInkDim,+ strokeWidth = 2.dp,+ )++ lyrics == null -> Text(+ "Nessun testo per questo brano",+ style = MaterialTheme.typography.bodyMedium,+ color = GlassInkDim,+ )++ else -> LyricsView(+ lyrics = lyrics,+ positionMs = positionMs,+ onSeek = onSeek,+ modifier = Modifier.fillMaxSize(),+ )+ }+ }+}