Skip to content

Unofficial YouTube Music / Spotify Premium client for Android, built in Liquid Glass. Audio effects, Spotify Connect, listening history, 8 languages. Rust core on librespot.

Open the phone's own music, and ask before reading it

Leloniod172e6653d19
diff --git a/app/src/main/java/dev/lelonio/square/ui/MainViewModel.kt b/app/src/main/java/dev/lelonio/square/ui/MainViewModel.kt
index 2ff3e97..a04ac45 100644
--- a/app/src/main/java/dev/lelonio/square/ui/MainViewModel.kt
+++ b/app/src/main/java/dev/lelonio/square/ui/MainViewModel.kt
@@ -21,6 +21,7 @@ import dev.lelonio.square.data.SpotifyHome
import dev.lelonio.square.data.CatalogTrack
import dev.lelonio.square.data.ContextCacheStore
import dev.lelonio.square.data.GatewayPage
+import dev.lelonio.square.data.LocalLibrary
import dev.lelonio.square.data.SearchItem
import dev.lelonio.square.data.TransferRequestDto
import dev.lelonio.square.data.SearchResults
@@ -146,6 +147,13 @@ class MainViewModel(app: Application) : AndroidViewModel(app) {
* and then corrects itself in front of the reader.
*/
val following: Boolean? = null,
+ /**
+ * Empty because nobody has been allowed to look, rather than because
+ * there is nothing there.
+ *
+ * Only the phone's own music can be in this state; see openLocalFiles.
+ */
+ val needsPermission: Boolean = false,
)
private val container get() = getApplication<SquareApplication>()
@@ -986,6 +994,80 @@ class MainViewModel(app: Application) : AndroidViewModel(app) {
.onFailure { android.util.Log.w(TAG, "friend activity unavailable: ${describe(it)}") }
}
+ /**
+ * How adding a friend is going, for the panel that asks for one.
+ *
+ * Idle until somebody types; a message afterwards, kept until the panel is
+ * closed. Following somebody is a write to the account, and a write with no
+ * answer is a button people press twice.
+ */
+ enum class AddFriend { IDLE, WORKING, DONE, FAILED, UNSUPPORTED }
+
+ private val _addFriend = MutableStateFlow(AddFriend.IDLE)
+ val addFriendState: StateFlow<AddFriend> = _addFriend.asStateFlow()
+
+ fun clearAddFriend() {
+ _addFriend.value = AddFriend.IDLE
+ }
+
+ /**
+ * Follows a Spotify listener, which is what "adding a friend" is here.
+ *
+ * By link or username, and only by those: Spotify's search covers tracks,
+ * albums, artists and playlists, and has never covered people. So there is
+ * nobody to look up — what can be done is take the profile the listener was
+ * given, in any of the shapes it arrives in, and follow it.
+ *
+ * Appearing in the activity list afterwards is a separate matter and not
+ * this app's to promise: that list is only ever people who both are
+ * followed and have chosen to share what they play.
+ */
+ fun addFriend(input: String) = viewModelScope.launch {
+ val id = friendIdOf(input)
+ if (id == null) {
+ _addFriend.value = AddFriend.FAILED
+ return@launch
+ }
+ if (!container.webApi.isReady) {
+ _addFriend.value = AddFriend.UNSUPPORTED
+ return@launch
+ }
+ _addFriend.value = AddFriend.WORKING
+ runCatching { container.api.followArtists(type = "user", ids = id) }
+ .onSuccess {
+ _addFriend.value = AddFriend.DONE
+ loadFriends()
+ }
+ .onFailure {
+ android.util.Log.w(TAG, "could not follow $id: ${describe(it)}")
+ _addFriend.value = AddFriend.FAILED
+ }
+ }
+
+ /**
+ * The account id inside whatever was pasted.
+ *
+ * A profile link, a `spotify:user:` uri, or the username on its own — the
+ * three shapes somebody's profile arrives in, from a browser, from the
+ * share sheet, and from being read out.
+ */
+ private fun friendIdOf(input: String): String? {
+ val trimmed = input.trim()
+ if (trimmed.isEmpty()) return null
+ val raw = when {
+ trimmed.startsWith("spotify:user:") -> trimmed.removePrefix("spotify:user:")
+ "open.spotify.com/user/" in trimmed ->
+ trimmed.substringAfter("open.spotify.com/user/")
+ // Some links carry the locale: /intl-it/user/<id>
+ "spotify.com" in trimmed && "/user/" in trimmed -> trimmed.substringAfter("/user/")
+ else -> trimmed
+ }
+ val id = raw.substringBefore('?').substringBefore('/').trim()
+ // A username is url-safe text; anything else came from a link this did
+ // not understand, and following it would fail with a worse message.
+ return id.takeIf { it.isNotEmpty() && it.all { c -> c.isLetterOrDigit() || c in "._-" } }
+ }
+
val recent: StateFlow<List<CatalogTrack>> =
combine(container.recentStore.tracks, container.preferences.backend) { tracks, _ ->
tracks.filter { container.activeBackend.owns(it.uri) }
@@ -1087,7 +1169,7 @@ class MainViewModel(app: Application) : AndroidViewModel(app) {
.onSuccess { playlists ->
_state.value = UiState.Ready(
displayName = name.orEmpty(),
- playlists = playlists,
+ playlists = withLocalFiles(playlists),
)
}
.onFailure {
@@ -1095,7 +1177,8 @@ class MainViewModel(app: Application) : AndroidViewModel(app) {
// Not a failure worth a whole error screen: the library is
// the one part that needs an account, and everything else
// on this backend works without one.
- _state.value = UiState.Ready(displayName = name.orEmpty(), playlists = emptyList())
+ _state.value =
+ UiState.Ready(displayName = name.orEmpty(), playlists = withLocalFiles(emptyList()))
}
return@launch
}
@@ -1125,6 +1208,7 @@ class MainViewModel(app: Application) : AndroidViewModel(app) {
loadHomeShelves()
loadFriends()
loadFollowedArtists()
+ loadSavedAlbums()
}
.onFailure {
android.util.Log.e(TAG, "library load failed: ${chain(it)}", it)
@@ -1148,7 +1232,28 @@ class MainViewModel(app: Application) : AndroidViewModel(app) {
* missed everything added there.
*/
private suspend fun playlists(): List<CatalogPlaylist> =
- container.activeBackend.playlists()
+ withLocalFiles(container.activeBackend.playlists())
+
+ /**
+ * The phone's own music, at the head of whichever library is on screen.
+ *
+ * Not a third service to switch to: a file on this phone is there whether
+ * the listener is on Spotify or on YouTube Music, exactly as it is in
+ * Spotify's own client, so it belongs in both libraries rather than behind
+ * a setting that swaps one for the other.
+ *
+ * Shown whether or not the permission has been given. Hiding it until then
+ * would leave the listener nowhere to say yes: the shelf is where the
+ * asking happens.
+ */
+ private fun withLocalFiles(playlists: List<CatalogPlaylist>): List<CatalogPlaylist> =
+ listOf(
+ CatalogPlaylist(
+ uri = LocalLibrary.CONTEXT_URI,
+ name = string(R.string.local_files),
+ artworkUrl = LocalLibrary.COVER,
+ ),
+ ) + playlists.filterNot { it.uri == LocalLibrary.CONTEXT_URI }
/** Covers already looked up, so a second visit to the home page is free. */
private val coverCache = mutableMapOf<String, String>()
@@ -1233,6 +1338,11 @@ class MainViewModel(app: Application) : AndroidViewModel(app) {
fun setTrackSort(value: String) = container.preferences.setTrackSort(value)
+ val trackSortDescending: StateFlow<Boolean> get() = container.preferences.trackSortDescending
+
+ fun setTrackSortDescending(value: Boolean) =
+ container.preferences.setTrackSortDescending(value)
+
/** False until the welcome tutorial has been finished once. */
val onboarded: StateFlow<Boolean> get() = container.preferences.onboarded
@@ -1628,6 +1738,14 @@ class MainViewModel(app: Application) : AndroidViewModel(app) {
// the home page should keep at the front.
container.playlistOrder.record(playlist.uri)
+ // The phone's own music answers for itself: no service to ask, no
+ // snapshot to compare, and nothing worth keeping on disk about files
+ // that are already on disk.
+ if (LocalLibrary.isLocalContext(playlist.uri)) {
+ openLocalFiles(playlist)
+ return
+ }
+
val kind = kindOf(playlist.uri)
playlistJob?.cancel()
// Reassigned when the picture arrives late; every state published below
@@ -1748,6 +1866,55 @@ class MainViewModel(app: Application) : AndroidViewModel(app) {
}
}
+ /**
+ * The music on this phone, read straight from the media index.
+ *
+ * Empty is two different answers, and the screen has to tell them apart:
+ * a phone with no music on it, and a phone this app has not been allowed
+ * to look at. The second is what [PlaylistState.needsPermission] says, and
+ * it is the only case in the app where an empty list is something to act
+ * on rather than to report.
+ */
+ private fun openLocalFiles(playlist: CatalogPlaylist) {
+ playlistJob?.cancel()
+ val base = PlaylistState(
+ uri = playlist.uri,
+ name = playlist.name,
+ // The shelf's own tile, drawn rather than fetched; see Artwork.
+ artworkUrl = playlist.artworkUrl ?: LocalLibrary.COVER,
+ kind = DetailKind.PLAYLIST,
+ // Nothing here belongs to an account, so none of what a playlist
+ // page offers applies: no following, no editing, no removing.
+ mine = false,
+ )
+ publishPlaylist(base.copy(loading = true))
+
+ playlistJob = viewModelScope.launch {
+ val granted = LocalLibrary.granted(getApplication())
+ val tracks = if (granted) LocalLibrary.tracks(getApplication()) else emptyList()
+ publishPlaylist(
+ base.copy(
+ tracks = tracks,
+ loading = false,
+ needsPermission = !granted,
+ ),
+ )
+ }
+ }
+
+ /** Called once the listener has answered the system's permission dialog. */
+ fun onLocalPermissionAnswered() {
+ val open = _playlist.value
+ if (!LocalLibrary.isLocalContext(open.uri)) return
+ openLocalFiles(
+ CatalogPlaylist(
+ uri = open.uri.orEmpty(),
+ name = open.name,
+ artworkUrl = LocalLibrary.COVER,
+ ),
+ )
+ }
+
/**
* The picture at the top of a page opened by URI alone.
*
@@ -2231,6 +2398,45 @@ class MainViewModel(app: Application) : AndroidViewModel(app) {
}
}
+ private val _savedAlbums = MutableStateFlow<List<CatalogPlaylist>>(emptyList())
+
+ /**
+ * The albums the account has saved, for the library's own shelf of them.
+ *
+ * Kept apart from [UiState.Ready.playlists] rather than mixed into it: the
+ * rootlist is playlists and nothing else, and a screen that filters by kind
+ * needs to be able to say which is which without reading URIs.
+ */
+ val savedAlbums: StateFlow<List<CatalogPlaylist>> = _savedAlbums.asStateFlow()
+
+ fun loadSavedAlbums() = viewModelScope.launch {
+ if (!container.webApi.isReady || container.activeBackend.id != BackendId.SPOTIFY) {
+ _savedAlbums.value = emptyList()
+ return@launch
+ }
+ runCatching {
+ val gathered = mutableListOf<CatalogPlaylist>()
+ var offset = 0
+ // Offset-paged, unlike the artists: walked to the end for the same
+ // reason, which is that a first page is not a library.
+ while (true) {
+ val page = container.api.savedAlbums(limit = ALBUM_PAGE, offset = offset)
+ gathered += page.items.mapNotNull { saved ->
+ CatalogPlaylist(
+ uri = saved.album.uri ?: return@mapNotNull null,
+ name = saved.album.name,
+ artworkUrl = saved.album.images.firstOrNull()?.url,
+ )
+ }
+ if (page.items.size < ALBUM_PAGE) break
+ offset += ALBUM_PAGE
+ }
+ gathered
+ }
+ .onSuccess { _savedAlbums.value = it }
+ .onFailure { android.util.Log.w(TAG, "saved albums unavailable: ${describe(it)}") }
+ }
+
private val _followedArtists = MutableStateFlow<List<SearchItem>>(emptyList())
/** The artists this account follows, for the library. */
@@ -2320,6 +2526,9 @@ class MainViewModel(app: Application) : AndroidViewModel(app) {
/** Artists asked for new records on the home page; one request each. */
const val FRESH_ARTISTS = 6
+ /** A page of saved albums; the API's own maximum. */
+ const val ALBUM_PAGE = 50
+
/** How long a home row gets before it stops being worth scrolling. */
const val FEED_ROW = 12
diff --git a/app/src/main/java/dev/lelonio/square/ui/SquareApp.kt b/app/src/main/java/dev/lelonio/square/ui/SquareApp.kt
index 16ab70a..1b729c3 100644
--- a/app/src/main/java/dev/lelonio/square/ui/SquareApp.kt
+++ b/app/src/main/java/dev/lelonio/square/ui/SquareApp.kt
@@ -197,6 +197,25 @@ private val BottomBarHeight = 62.dp
* Large enough that the blur has something to work with, small enough that
* blurring it costs nothing and it never reads as a photograph.
*/
+/**
+ * The permission that lets the app see the phone's own music.
+ *
+ * Returns what to call to ask for it. Already-granted is answered without a
+ * dialog: the system shows nothing for a permission it has, and the caller
+ * still needs to hear that the answer is yes so the shelf can fill itself in.
+ */
+@Composable
+private fun rememberLocalAudioPermission(onAnswered: () -> Unit): () -> Unit {
+ val context = LocalContext.current
+ val launcher = rememberLauncherForActivityResult(
+ ActivityResultContracts.RequestPermission(),
+ ) { onAnswered() }
+ return {
+ if (dev.lelonio.square.data.LocalLibrary.granted(context)) onAnswered()
+ else launcher.launch(dev.lelonio.square.data.LocalLibrary.permission)
+ }
+}
+
private const val BACKDROP_DECODE_PX = 128
/** Radius in pixels of the decoded image; see [BlurTransformation]. */
@@ -333,10 +352,13 @@ fun SquareApp(
val pinnedPlaylists by viewModel.pinnedPlaylists.collectAsStateWithLifecycle()
val likedTracks by viewModel.likedTracks.collectAsStateWithLifecycle()
val friends by viewModel.friends.collectAsStateWithLifecycle()
+ val addFriendState by viewModel.addFriendState.collectAsStateWithLifecycle()
val followedArtists by viewModel.followedArtists.collectAsStateWithLifecycle()
+ val savedAlbums by viewModel.savedAlbums.collectAsStateWithLifecycle()
val devices by viewModel.devices.collectAsStateWithLifecycle()
val addToPlaylist by viewModel.addToPlaylist.collectAsStateWithLifecycle()
val trackSort by viewModel.trackSort.collectAsStateWithLifecycle()
+ val trackSortDescending by viewModel.trackSortDescending.collectAsStateWithLifecycle()
val onboarded by viewModel.onboarded.collectAsStateWithLifecycle()
// Asked for again from the settings, after it has already been finished.
@@ -579,6 +601,15 @@ fun SquareApp(
}
val glassConfig by glassStore.config.collectAsStateWithLifecycle()
+ // Asking to read the music on the phone.
+ //
+ // Held at this level rather than in the shelf that needs it: a launcher
+ // belongs to the activity, and the answer has to reach the view model
+ // whether or not the screen that asked is still on top when it arrives.
+ val askLocalPermission = rememberLocalAudioPermission(
+ onAnswered = viewModel::onLocalPermissionAnswered,
+ )
+
// What folds the bar, and what tells the glass the page is moving. Built
// here rather than beside the bar because both of those are read at the
// top of the app: the glass configuration is provided from this scope.
@@ -866,6 +897,7 @@ fun SquareApp(
onCreatePlaylist = { naming = NamingRequest(null) },
onPlaylistMenu = { playlistMenu = it },
artists = followedArtists,
+ albums = savedAlbums,
onOpenArtist = { artist ->
viewModel.openContext(
artist.uri,
@@ -913,6 +945,7 @@ fun SquareApp(
contentPadding = listPadding,
nowPlayingUri = playback.mediaId,
onBack = { navController.popBackStack() },
+ onAskLocalPermission = { askLocalPermission() },
onPlay = { tracks, index, asContext ->
onPlay(
tracks,
@@ -960,6 +993,8 @@ fun SquareApp(
},
storedSort = trackSort,
onSortChange = viewModel::setTrackSort,
+ storedSortDescending = trackSortDescending,
+ onSortDescendingChange = viewModel::setTrackSortDescending,
onOpenItem = { item ->
viewModel.openContext(
item.uri,
@@ -1675,7 +1710,12 @@ fun SquareApp(
artworkUrl = friend.artworkUrl,
)
},
- onDismiss = { friendsOpen = false },
+ onAddFriend = viewModel::addFriend,
+ addState = addFriendState,
+ onDismiss = {
+ friendsOpen = false
+ viewModel.clearAddFriend()
+ },
)
// A song that arrived by link. Held one beat past the dismissal
diff --git a/app/src/main/java/dev/lelonio/square/ui/library/PlaylistScreen.kt b/app/src/main/java/dev/lelonio/square/ui/library/PlaylistScreen.kt
index 3bcb6ab..6390dfd 100644
--- a/app/src/main/java/dev/lelonio/square/ui/library/PlaylistScreen.kt
+++ b/app/src/main/java/dev/lelonio/square/ui/library/PlaylistScreen.kt
@@ -146,6 +146,13 @@ fun PlaylistScreen(
onToggleFollow: () -> Unit = {},
/** Hands the page's own link to whoever wants it. */
onShare: () -> Unit = {},
+ /**
+ * Asks for the permission to read the music on the phone.
+ *
+ * Only ever called from the local files shelf; see
+ * MainViewModel.openLocalFiles.
+ */
+ onAskLocalPermission: () -> Unit = {},
/** Opens the sheet with everything else this page can do. */
onMenu: () -> Unit = {},
/** Keeps the page in the library, or lets it go. */
@@ -153,6 +160,9 @@ fun PlaylistScreen(
/** The remembered track order, and where a change to it is stored. */
storedSort: String? = null,
onSortChange: (String) -> Unit = {},
+ /** And which way round it runs; see the same menu. */
+ storedSortDescending: Boolean = false,
+ onSortDescendingChange: (Boolean) -> Unit = {},
) {
var query by remember { mutableStateOf("") }
var searching by remember { mutableStateOf(false) }
@@ -164,20 +174,25 @@ fun PlaylistScreen(
TrackSort.entries.firstOrNull { it.name == storedSort } ?: TrackSort.ORIGINAL,
)
}
+ var descending by remember(storedSortDescending) { mutableStateOf(storedSortDescending) }
var sortOpen by remember { mutableStateOf(false) }
// Whether the rows on screen are the playlist itself, in its order. Sorting
// or searching makes them a selection out of it, and playing that as the
// context would have Spotify play the playlist's own order instead of the
// one on screen.
- val asContext = sort == TrackSort.ORIGINAL && query.isBlank()
+ val asContext = sort == TrackSort.ORIGINAL && !descending && query.isBlank()
// Derived, not stored: keeping a second list in state would leave the two
// able to disagree after a reload.
- val visible = remember(state.tracks, query, sort) {
+ val visible = remember(state.tracks, query, sort, descending) {
state.tracks
.filter { it.matches(query) }
.sortedWith(sort.comparator())
+ // Reversed after sorting rather than by a second comparator: the
+ // playlist's own order has no comparator to invert, and turning it
+ // upside down is exactly what "descending" means there too.
+ .let { if (descending) it.reversed() else it }
}
// Taken from *this* screen's cover, not from whatever is playing. The two
@@ -375,6 +390,33 @@ fun PlaylistScreen(
StatusBox { CircularProgressIndicator(strokeWidth = 2.dp) }
}
+ // The one empty list in the app that is a question rather than
+ // an answer: there may well be music here, and nobody has been
+ // allowed to look.
+ state.needsPermission -> item(contentType = "status") {
+ StatusBox {
+ Column(horizontalAlignment = Alignment.CenterHorizontally) {
+ Text(
+ stringResource(R.string.local_files_needs_permission),
+ style = MaterialTheme.typography.bodyMedium,
+ color = MaterialTheme.colorScheme.onSurfaceVariant,
+ textAlign = TextAlign.Center,
+ )
+ Spacer(Modifier.height(14.dp))
+ LiquidButton(
+ onClick = onAskLocalPermission,
+ backdrop = pageBackdrop,
+ contentPadding = 18.dp,
+ ) {
+ Text(
+ stringResource(R.string.local_files_allow),
+ style = MaterialTheme.typography.labelLarge,
+ )
+ }
+ }
+ }
+ }
+
state.error != null -> item(contentType = "status") {
StatusBox {
Text(
@@ -564,7 +606,7 @@ fun PlaylistScreen(
GlassChoiceMenu(
visible = sortOpen,
anchor = sortAnchor.leftOf(density),
- backdrop = rememberCombinedBackdrop(pageBackdrop, listBackdrop),
+ backdrop = listBackdrop,
onDismiss = { sortOpen = false },
) {
TrackSort.entries.forEach { option ->
@@ -574,6 +616,18 @@ fun PlaylistScreen(
sortOpen = false
}
}
+ dev.lelonio.square.ui.components.GlassMenuRule()
+
+ // Deliberately leaves the menu open: the direction is the one choice
+ // people flip back and forth to compare, and reopening for each flip
+ // makes a sort feel heavy.
+ GlassChoiceItem(
+ stringResource(R.string.sort_descending),
+ selected = descending,
+ ) {
+ descending = !descending
+ onSortDescendingChange(descending)
+ }
}
}
}
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 93380ff..ebfcbb3 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -40,6 +40,7 @@
<string name="settings">Einstellungen</string>
<string name="home">Start</string>
<string name="library">Bibliothek</string>
+ <string name="library_all">Alles</string>
<string name="search">Suchen</string>
<string name="now_playing">Läuft gerade</string>
<string name="unofficial_client">Inoffizieller Client für Premium-Konten</string>
@@ -66,7 +67,13 @@
<string name="recently_opened">Zuletzt geöffnet</string>
<string name="spotify_order">Reihenfolge von Spotify</string>
<string name="change_layout">Ansicht wechseln</string>
+ <string name="sort_descending">Absteigend</string>
+ <string name="layout_grid">Raster</string>
+ <string name="layout_list">Liste</string>
<string name="playlist_count">%1$d Playlists</string>
+ <string name="item_count">%1$d Einträge</string>
+ <string name="artist_count">%1$d Künstler</string>
+ <string name="album_count">%1$d Alben</string>
<string name="playlist_order">Reihenfolge der Playlist</string>
<string name="recently_added">Zuletzt hinzugefügt</string>
@@ -145,6 +152,11 @@
<string name="artists_you_follow">Künstler, denen du folgst</string>
<string name="friends_listening">Freunde</string>
<string name="friends_none">Gerade hört niemand, oder niemand, dem du folgst, teilt was er spielt.</string>
+ <string name="add_friend">Freund hinzufügen</string>
+ <string name="add_friend_hint">Profillink oder Benutzername</string>
+ <string name="add_friend_done">Du folgst jetzt. Erscheint hier, wenn geteilt wird.</string>
+ <string name="add_friend_failed">Dieser Link führt zu keinem Profil.</string>
+ <string name="add_friend_unsupported">Verbinde deine Spotify-Anwendung, um jemandem zu folgen.</string>
<string name="just_now">Gerade eben</string>
<string name="minutes_ago">vor %1$d Min</string>
<string name="hours_ago">vor %1$d Std</string>
@@ -258,6 +270,9 @@
<string name="effect_quality_light">Leicht</string>
<string name="effect_quality_light_note">Das Telefon übernimmt. Schonender für ältere Geräte, rauer bei Anschlägen.</string>
<string name="liked_songs">Lieblingssongs</string>
+ <string name="local_files">Lokale Dateien</string>
+ <string name="local_files_needs_permission">Square kann die Musik auf diesem Telefon sehen, wenn du es erlaubst.</string>
+ <string name="local_files_allow">Erlauben</string>
<string name="pinned">Angeheftet</string>
<string name="pin">Oben anheften</string>
<string name="unpin">Lösen</string>
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 550af2e..f59631c 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -40,6 +40,7 @@
<string name="settings">Ajustes</string>
<string name="home">Inicio</string>
<string name="library">Biblioteca</string>
+ <string name="library_all">Todo</string>
<string name="search">Buscar</string>
<string name="now_playing">Reproduciendo</string>
<string name="unofficial_client">Cliente no oficial para cuentas Premium</string>
@@ -66,7 +67,13 @@
<string name="recently_opened">Abiertas hace poco</string>
<string name="spotify_order">Orden de Spotify</string>
<string name="change_layout">Cambiar disposición</string>
+ <string name="sort_descending">Descendente</string>
+ <string name="layout_grid">Cuadrícula</string>
+ <string name="layout_list">Lista</string>
<string name="playlist_count">%1$d playlists</string>
+ <string name="item_count">%1$d elementos</string>
+ <string name="artist_count">%1$d artistas</string>
+ <string name="album_count">%1$d álbumes</string>
<string name="playlist_order">Orden de la playlist</string>
<string name="recently_added">Añadidas hace poco</string>
@@ -145,6 +152,11 @@
<string name="artists_you_follow">Artistas que sigues</string>
<string name="friends_listening">Amigos</string>
<string name="friends_none">Nadie está escuchando ahora, o nadie a quien sigues comparte lo que reproduce.</string>
+ <string name="add_friend">Añadir un amigo</string>
+ <string name="add_friend_hint">Enlace del perfil o usuario</string>
+ <string name="add_friend_done">Ya le sigues. Aparecerá aquí si comparte lo que escucha.</string>
+ <string name="add_friend_failed">Ese enlace no lleva a un perfil.</string>
+ <string name="add_friend_unsupported">Conecta tu aplicación de Spotify para seguir a alguien.</string>
<string name="just_now">Ahora</string>
<string name="minutes_ago">hace %1$d min</string>
<string name="hours_ago">hace %1$d h</string>
@@ -258,6 +270,9 @@
<string name="effect_quality_light">Ligera</string>
<string name="effect_quality_light_note">Lo hace el teléfono. Más amable con los equipos antiguos, más áspera en los ataques.</string>
<string name="liked_songs">Tus me gusta</string>
+ <string name="local_files">Archivos locales</string>
+ <string name="local_files_needs_permission">Square puede ver la música de este teléfono si le das permiso.</string>
+ <string name="local_files_allow">Permitir</string>
<string name="pinned">Fijada</string>
<string name="pin">Fijar arriba</string>
<string name="unpin">Quitar de arriba</string>
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 273ba3a..10dbb81 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -40,6 +40,7 @@
<string name="settings">Réglages</string>
<string name="home">Accueil</string>
<string name="library">Bibliothèque</string>
+ <string name="library_all">Tout</string>
<string name="search">Rechercher</string>
<string name="now_playing">En cours de lecture</string>
<string name="unofficial_client">Client non officiel pour comptes Premium</string>
@@ -66,7 +67,13 @@
<string name="recently_opened">Ouvertes récemment</string>
<string name="spotify_order">Ordre de Spotify</string>
<string name="change_layout">Changer la disposition</string>
+ <string name="sort_descending">Décroissant</string>
+ <string name="layout_grid">Grille</string>
+ <string name="layout_list">Liste</string>
<string name="playlist_count">%1$d playlists</string>
+ <string name="item_count">%1$d éléments</string>
+ <string name="artist_count">%1$d artistes</string>
+ <string name="album_count">%1$d albums</string>
<string name="playlist_order">Ordre de la playlist</string>
<string name="recently_added">Ajoutés récemment</string>
@@ -145,6 +152,11 @@
<string name="artists_you_follow">Artistes que vous suivez</string>
<string name="friends_listening">Amis</string>
<string name="friends_none">Personne n’écoute en ce moment, ou personne que vous suivez ne partage ce qu’il joue.</string>
+ <string name="add_friend">Ajouter un ami</string>
+ <string name="add_friend_hint">Lien du profil ou identifiant</string>
+ <string name="add_friend_done">Vous le suivez. Il apparaîtra ici s\'il partage ses écoutes.</string>
+ <string name="add_friend_failed">Ce lien ne mène pas à un profil.</string>
+ <string name="add_friend_unsupported">Connectez votre application Spotify pour suivre quelqu\'un.</string>
<string name="just_now">À l’instant</string>
<string name="minutes_ago">il y a %1$d min</string>
<string name="hours_ago">il y a %1$d h</string>
@@ -258,6 +270,9 @@
<string name="effect_quality_light">Légère</string>
<string name="effect_quality_light_note">Le téléphone s’en charge. Plus douce pour les appareils anciens, plus rêche sur les attaques.</string>
<string name="liked_songs">Titres likés</string>
+ <string name="local_files">Fichiers locaux</string>
+ <string name="local_files_needs_permission">Square peut voir la musique de ce téléphone si vous l\'autorisez.</string>
+ <string name="local_files_allow">Autoriser</string>
<string name="pinned">Épinglée</string>
<string name="pin">Épingler en haut</string>
<string name="unpin">Désépingler</string>
diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml
index c3f98ac..d15b75b 100644
--- a/app/src/main/res/values-hi/strings.xml
+++ b/app/src/main/res/values-hi/strings.xml
@@ -45,6 +45,7 @@
<string name="settings">सेटिंग</string>
<string name="home">होम</string>
<string name="library">लाइब्रेरी</string>
+ <string name="library_all">सब कुछ</string>
<string name="search">खोजें</string>
<string name="now_playing">अभी चल रहा है</string>
<string name="unofficial_client">प्रीमियम खातों के लिए गैर-आधिकारिक क्लाइंट</string>
@@ -73,7 +74,13 @@
<string name="recently_opened">हाल में खोले गए</string>
<string name="spotify_order">Spotify का क्रम</string>
<string name="change_layout">लेआउट बदलें</string>
+ <string name="sort_descending">अवरोही</string>
+ <string name="layout_grid">ग्रिड</string>
+ <string name="layout_list">सूची</string>
<string name="playlist_count">%1$d प्लेलिस्ट</string>
+ <string name="item_count">%1$d आइटम</string>
+ <string name="artist_count">%1$d कलाकार</string>
+ <string name="album_count">%1$d एल्बम</string>
<!-- Playlist, album, artist -->
<string name="playlist_order">प्लेलिस्ट का क्रम</string>
@@ -157,6 +164,11 @@
<string name="artists_you_follow">आपके फ़ॉलो किए कलाकार</string>
<string name="friends_listening">दोस्त</string>
<string name="friends_none">अभी कोई नहीं सुन रहा, या आप जिन्हें फ़ॉलो करते हैं वे अपना संगीत साझा नहीं करते।</string>
+ <string name="add_friend">मित्र जोड़ें</string>
+ <string name="add_friend_hint">प्रोफ़ाइल लिंक या उपयोगकर्ता नाम</string>
+ <string name="add_friend_done">अब आप फ़ॉलो करते हैं। साझा करने पर यहाँ दिखेंगे।</string>
+ <string name="add_friend_failed">वह लिंक किसी प्रोफ़ाइल तक नहीं ले जाता।</string>
+ <string name="add_friend_unsupported">किसी को फ़ॉलो करने के लिए अपना Spotify ऐप्लिकेशन जोड़ें।</string>
<string name="just_now">अभी</string>
<string name="minutes_ago">%1$d मिनट पहले</string>
<string name="hours_ago">%1$d घंटे पहले</string>
@@ -273,6 +285,9 @@
<string name="effect_quality_light">हल्का</string>
<string name="effect_quality_light_note">काम फ़ोन करता है। पुराने डिवाइस के लिए आसान, तेज़ आघातों पर थोड़ा खुरदरा।</string>
<string name="liked_songs">पसंद किए गए गाने</string>
+ <string name="local_files">स्थानीय फ़ाइलें</string>
+ <string name="local_files_needs_permission">अनुमति देने पर Square इस फ़ोन का संगीत देख सकता है।</string>
+ <string name="local_files_allow">अनुमति दें</string>
<string name="pinned">पिन किया</string>
<string name="pin">ऊपर पिन करें</string>
<string name="unpin">पिन हटाएँ</string>
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 7c9f086..9b40ba8 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -41,6 +41,7 @@
<string name="settings">Impostazioni</string>
<string name="home">Home</string>
<string name="library">Libreria</string>
+ <string name="library_all">Tutto</string>
<string name="search">Cerca</string>
<string name="now_playing">In riproduzione</string>
<string name="unofficial_client">Client non ufficiale per account Premium</string>
@@ -67,7 +68,13 @@
<string name="recently_opened">Aperte di recente</string>
<string name="spotify_order">Ordine di Spotify</string>
<string name="change_layout">Cambia disposizione</string>
+ <string name="sort_descending">Decrescente</string>
+ <string name="layout_grid">Griglia</string>
+ <string name="layout_list">Elenco</string>
<string name="playlist_count">%1$d playlist</string>
+ <string name="item_count">%1$d elementi</string>
+ <string name="artist_count">%1$d artisti</string>
+ <string name="album_count">%1$d album</string>
<string name="playlist_order">Ordine della playlist</string>
<string name="recently_added">Aggiunti di recente</string>
@@ -146,6 +153,11 @@
<string name="artists_you_follow">Artisti che segui</string>
<string name="friends_listening">Amici</string>
<string name="friends_none">Nessuno sta ascoltando ora, o nessuno che segui condivide quello che riproduce.</string>
+ <string name="add_friend">Aggiungi un amico</string>
+ <string name="add_friend_hint">Link del profilo o username</string>
+ <string name="add_friend_done">Ora lo segui. Comparirà qui se condivide cosa ascolta.</string>
+ <string name="add_friend_failed">Quel link non porta a un profilo.</string>
+ <string name="add_friend_unsupported">Collega la tua applicazione Spotify per seguire qualcuno.</string>
<string name="just_now">Adesso</string>
<string name="minutes_ago">%1$d min fa</string>
<string name="hours_ago">%1$d h fa</string>
@@ -259,6 +271,9 @@
<string name="effect_quality_light">Leggera</string>
<string name="effect_quality_light_note">Se ne occupa il telefono. Più gentile con i dispositivi vecchi, più ruvida sugli attacchi.</string>
<string name="liked_songs">Brani che ti piacciono</string>
+ <string name="local_files">File locali</string>
+ <string name="local_files_needs_permission">Square può vedere la musica su questo telefono se glielo permetti.</string>
+ <string name="local_files_allow">Consenti</string>
<string name="pinned">Fissata</string>
<string name="pin">Fissa in alto</string>
<string name="unpin">Togli dall\'alto</string>
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 7518ba0..c45e051 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -40,6 +40,7 @@
<string name="settings">Configurações</string>
<string name="home">Início</string>
<string name="library">Biblioteca</string>
+ <string name="library_all">Tudo</string>
<string name="search">Buscar</string>
<string name="now_playing">Tocando agora</string>
<string name="unofficial_client">Cliente não oficial para contas Premium</string>
@@ -66,7 +67,13 @@
<string name="recently_opened">Abertas há pouco</string>
<string name="spotify_order">Ordem do Spotify</string>
<string name="change_layout">Mudar a disposição</string>
+ <string name="sort_descending">Decrescente</string>
+ <string name="layout_grid">Grelha</string>
+ <string name="layout_list">Lista</string>
<string name="playlist_count">%1$d playlists</string>
+ <string name="item_count">%1$d itens</string>
+ <string name="artist_count">%1$d artistas</string>
+ <string name="album_count">%1$d álbuns</string>
<string name="playlist_order">Ordem da playlist</string>
<string name="recently_added">Adicionadas há pouco</string>
@@ -145,6 +152,11 @@
<string name="artists_you_follow">Artistas que segue</string>
<string name="friends_listening">Amigos</string>
<string name="friends_none">Ninguém está a ouvir agora, ou ninguém que segue partilha o que reproduz.</string>
+ <string name="add_friend">Adicionar um amigo</string>
+ <string name="add_friend_hint">Ligação do perfil ou nome de utilizador</string>
+ <string name="add_friend_done">Já o segue. Aparece aqui se partilhar o que ouve.</string>
+ <string name="add_friend_failed">Essa ligação não leva a um perfil.</string>
+ <string name="add_friend_unsupported">Ligue a sua aplicação Spotify para seguir alguém.</string>
<string name="just_now">Agora</string>
<string name="minutes_ago">há %1$d min</string>
<string name="hours_ago">há %1$d h</string>
@@ -258,6 +270,9 @@
<string name="effect_quality_light">Leve</string>
<string name="effect_quality_light_note">O telefone é que trata disso. Melhor para aparelhos antigos, mais áspera nos ataques.</string>
<string name="liked_songs">Músicas curtidas</string>
+ <string name="local_files">Ficheiros locais</string>
+ <string name="local_files_needs_permission">O Square pode ver a música neste telemóvel se lhe der permissão.</string>
+ <string name="local_files_allow">Permitir</string>
<string name="pinned">Fixada</string>
<string name="pin">Fixar no topo</string>
<string name="unpin">Desafixar</string>
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index 3422766..880be80 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -45,6 +45,7 @@
<string name="settings">Ayarlar</string>
<string name="home">Ana sayfa</string>
<string name="library">Kitaplık</string>
+ <string name="library_all">Tümü</string>
<string name="search">Ara</string>
<string name="now_playing">Şimdi çalıyor</string>
<string name="unofficial_client">Premium hesaplar için resmi olmayan istemci</string>
@@ -73,7 +74,13 @@
<string name="recently_opened">Son açılanlar</string>
<string name="spotify_order">Spotify\'ın sırası</string>
<string name="change_layout">Görünümü değiştir</string>
+ <string name="sort_descending">Azalan</string>
+ <string name="layout_grid">Izgara</string>
+ <string name="layout_list">Liste</string>
<string name="playlist_count">%1$d çalma listesi</string>
+ <string name="item_count">%1$d öğe</string>
+ <string name="artist_count">%1$d sanatçı</string>
+ <string name="album_count">%1$d albüm</string>
<!-- Playlist, album, artist -->
<string name="playlist_order">Çalma listesi sırası</string>
@@ -157,6 +164,11 @@
<string name="artists_you_follow">Takip ettiğin sanatçılar</string>
<string name="friends_listening">Arkadaşlar</string>
<string name="friends_none">Şu anda kimse dinlemiyor ya da takip ettiğin kimse ne çaldığını paylaşmıyor.</string>
+ <string name="add_friend">Arkadaş ekle</string>
+ <string name="add_friend_hint">Profil bağlantısı veya kullanıcı adı</string>
+ <string name="add_friend_done">Artık takip ediyorsun. Paylaşırsa burada görünür.</string>
+ <string name="add_friend_failed">Bu bağlantı bir profile gitmiyor.</string>
+ <string name="add_friend_unsupported">Birini takip etmek için kendi Spotify uygulamanı bağla.</string>
<string name="just_now">Az önce</string>
<string name="minutes_ago">%1$d dk önce</string>
<string name="hours_ago">%1$d sa önce</string>
@@ -273,6 +285,9 @@
<string name="effect_quality_light">Hafif</string>
<string name="effect_quality_light_note">İşi telefon yapar. Eski cihazlara nazik, vuruşlarda daha kaba.</string>
<string name="liked_songs">Beğenilen Şarkılar</string>
+ <string name="local_files">Yerel dosyalar</string>
+ <string name="local_files_needs_permission">İzin verirsen Square bu telefondaki müziği görebilir.</string>
+ <string name="local_files_allow">İzin ver</string>
<string name="pinned">Sabitlendi</string>
<string name="pin">Yukarı sabitle</string>
<string name="unpin">Sabitlemeyi kaldır</string>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index c7085d4..9151cfe 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -51,6 +51,7 @@
<string name="settings">Settings</string>
<string name="home">Home</string>
<string name="library">Library</string>
+ <string name="library_all">Everything</string>
<string name="search">Search</string>
<string name="now_playing">Now playing</string>
<string name="unofficial_client">Unofficial client for Premium accounts</string>
@@ -79,7 +80,13 @@
<string name="recently_opened">Recently opened</string>
<string name="spotify_order">Spotify\'s order</string>
<string name="change_layout">Change layout</string>
+ <string name="sort_descending">Descending</string>
+ <string name="layout_grid">Grid</string>
+ <string name="layout_list">List</string>
<string name="playlist_count">%1$d playlists</string>
+ <string name="item_count">%1$d items</string>
+ <string name="artist_count">%1$d artists</string>
+ <string name="album_count">%1$d albums</string>
<!-- Playlist, album, artist -->
<string name="playlist_order">Playlist order</string>
@@ -163,6 +170,11 @@
<string name="artists_you_follow">Artists you follow</string>
<string name="friends_listening">Friends</string>
<string name="friends_none">Nobody is listening right now, or nobody you follow shares what they play.</string>
+ <string name="add_friend">Add a friend</string>
+ <string name="add_friend_hint">Profile link or username</string>
+ <string name="add_friend_done">Following. They appear here when they share what they play.</string>
+ <string name="add_friend_failed">That link did not lead to a profile.</string>
+ <string name="add_friend_unsupported">Connect your own Spotify application to follow people.</string>
<string name="just_now">Just now</string>
<string name="minutes_ago">%1$d min ago</string>
<string name="hours_ago">%1$d h ago</string>
@@ -279,6 +291,9 @@
<string name="effect_quality_light">Light</string>
<string name="effect_quality_light_note">The phone does the work. Kinder to older devices, rougher on attacks.</string>
<string name="liked_songs">Liked Songs</string>
+ <string name="local_files">Local files</string>
+ <string name="local_files_needs_permission">Square can see the music on this phone once you allow it.</string>
+ <string name="local_files_allow">Allow</string>
<string name="pinned">Pinned</string>
<string name="pin">Pin to the top</string>
<string name="unpin">Unpin</string>