Skip to content

Native Android client for Spotify, built with Jetpack Compose

2.0.2-beta.8: source order for audio and downloads with Spotify movable, update check button in About, Liquid Glass top bar on every tab, Immersive queue drop without jump, safer extensions, podcast 15 s skips on headphones, Genius in Immersive, more translations

kota-zoef582f16658d
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000..fce8e4f9
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,11 @@
+version: 2
+updates:
+ - package-ecosystem: gradle
+ directory: /base
+ schedule:
+ interval: weekly
+
+ - package-ecosystem: github-actions
+ directory: /
+ schedule:
+ interval: weekly
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
index bac26360..f2120898 100644
--- a/.github/workflows/android.yml
+++ b/.github/workflows/android.yml
@@ -32,10 +32,22 @@ jobs:
- uses: gradle/actions/setup-gradle@v6
- # App unit tests, plus the JVM modules (API contracts, ad block, offline index, GraphQL
- # errors). The live tests in host-cdp skip themselves without a browser to drive.
+ # Unit tests of every module that has them: the Android modules (app, host-android) run
+ # testDebugUnitTest, the JVM modules (extensions, api-spotify, host-cdp) run test.
+ # The live tests in host-cdp skip themselves without a browser to drive.
- name: Unit tests
- run: ./gradlew testDebugUnitTest :api:test :api-spotify:test :host-cdp:test
+ run: ./gradlew :app:testDebugUnitTest :host-android:testDebugUnitTest :extensions:test :api-spotify:test :host-cdp:test
+
+ - name: Test reports
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: test-reports
+ path: |
+ base/**/build/reports/tests/
+ base/**/build/test-results/
+ retention-days: 14
+ if-no-files-found: ignore
- name: Debug APK
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 49838ec6..46a9a54d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,17 @@
Each release on GitHub shows its section below. The app shows it too when it offers the update. Every detail: [docs/CHANGELOG-full.md](docs/CHANGELOG-full.md).
+## 2.0.2-beta.8
+
+- 🎚️ **Source order** (Settings, Playback and Downloads): put your audio and download sources in the order you want; each song is asked from top to bottom. Spotify has its own place too, first if you like. Each source shows only what matters, details on a tap. Installing a second source no longer clashes with the first.
+- 🔄 **Updates**: a Check now button in Settings, About, and the app looks more often (at most once an hour, again 10 min after a failed check).
+- 💎 **Liquid Glass** on the top bar of every tab, with a rounded bottom; the blur follows tab changes live. Fixes going back from a playlist that stayed on the playlist.
+- ↕️ **Immersive queue**: a dropped song goes straight to its place, without jumping back first.
+- 🎙️ **Podcasts**: the headphone next and previous buttons skip 15 s forward and back (Settings, Playback).
+- 📖 **Genius** song meanings in the Immersive look.
+- 🔒 **Safer extensions**: network calls limited to public hosts, an update that asks for more needs your OK, Spotify writes granted one by one, an extension crash no longer takes the app down.
+- 🌍 More texts translated.
+
## 2.0.2-beta.7
- 💎 **Real Liquid Glass** (Immersive): lens refraction, specular rim and a live blur of what scrolls behind, now also on phones with system window blurs off (Android 13+; live blur on Android 12). Softer springs and press feedback across the look.
diff --git a/base/app/src/main/java/com/music/spotui/App.kt b/base/app/src/main/java/com/music/spotui/App.kt
index 881ef879..dc9252cc 100644
--- a/base/app/src/main/java/com/music/spotui/App.kt
+++ b/base/app/src/main/java/com/music/spotui/App.kt
@@ -21,6 +21,7 @@ import android.os.Build
import androidx.annotation.RequiresApi
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.material3.Scaffold
+import androidx.lifecycle.repeatOnLifecycle
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
@@ -275,18 +276,27 @@ private fun SupportDialog(supporter: Boolean, onSupport: () -> Unit, onSponsor:
}
/**
- * "New version" dialog: checked at launch (off the UI thread), shown as soon as the answer is
+ * "New version" dialog: checked at launch and on every return to the app (off the UI thread), shown as soon as the answer is
* known. "Later" hides it; Settings > About offers the update again.
*/
@Composable
private fun UpdatePrompt() {
val context = androidx.compose.ui.platform.LocalContext.current
var release by updateRelease
- androidx.compose.runtime.LaunchedEffect(Unit) {
- // Turned off in Settings: no check at launch. The manual check there still asks.
- if (!com.music.spotui.data.preferences.AutoUpdateCheckPref.on) return@LaunchedEffect
- // At once: the request runs on the IO dispatcher, nothing waits for it.
- release = com.music.spotui.data.api.UpdateChecker.check(context)
+ val owner = androidx.lifecycle.compose.LocalLifecycleOwner.current
+ androidx.compose.runtime.LaunchedEffect(owner) {
+ // Each time the app comes to the foreground (the check itself skips when the last one is
+ // under an hour old), then every 6 h while it stays open. Turned off in Settings: no
+ // automatic check; the manual one there still asks.
+ owner.lifecycle.repeatOnLifecycle(androidx.lifecycle.Lifecycle.State.STARTED) {
+ while (true) {
+ if (com.music.spotui.data.preferences.AutoUpdateCheckPref.on) {
+ // The request runs on the IO dispatcher, nothing waits for it.
+ com.music.spotui.data.api.UpdateChecker.check(context)?.let { release = it }
+ }
+ kotlinx.coroutines.delay(com.music.spotui.data.api.UpdateChecker.PERIODIC_MS)
+ }
+ }
}
updateCardOpen.value = release != null
val r = release ?: return
diff --git a/base/app/src/main/java/com/music/spotui/data/api/Api.kt b/base/app/src/main/java/com/music/spotui/data/api/Api.kt
index 0a7f57d4..9d23f35a 100644
--- a/base/app/src/main/java/com/music/spotui/data/api/Api.kt
+++ b/base/app/src/main/java/com/music/spotui/data/api/Api.kt
@@ -219,12 +219,12 @@ class Api constructor(
val id = c.uri.substringAfterLast(':')
val image = cover(c.images)
return when (c.kind) {
- MediaKind.ALBUM -> HomeItem.Album(id = id, name = c.title, imageUrl = image, subtitle = c.subtitle ?: "Album", artists = c.subtitle.orEmpty())
+ MediaKind.ALBUM -> HomeItem.Album(id = id, name = c.title, imageUrl = image, subtitle = c.subtitle ?: context.getString(R.string.album_type_album), artists = c.subtitle.orEmpty())
MediaKind.ARTIST -> HomeItem.Artist(name = c.title, imageUrl = image, id = id)
- MediaKind.PLAYLIST -> HomeItem.Playlist(name = c.title, imageUrl = image, subtitle = c.subtitle?.let { "Playlist • $it" } ?: "Playlist", id = id)
+ MediaKind.PLAYLIST -> HomeItem.Playlist(name = c.title, imageUrl = image, subtitle = c.subtitle?.let { context.getString(R.string.assisted_curation_search_playlist) + " • $it" } ?: context.getString(R.string.assisted_curation_search_playlist), id = id)
MediaKind.SHOW, MediaKind.AUDIOBOOK -> HomeItem.Show(id = id, name = c.title, imageUrl = image, subtitle = c.subtitle.orEmpty(), isEpisode = false)
MediaKind.EPISODE, MediaKind.CHAPTER -> HomeItem.Show(id = id, name = c.title, imageUrl = image, subtitle = c.subtitle.orEmpty(), isEpisode = true)
- MediaKind.COLLECTION -> HomeItem.Playlist(name = c.title, imageUrl = image.ifBlank { LIKED_COVER }, subtitle = "Playlist", id = LIKED_SONGS_ID)
+ MediaKind.COLLECTION -> HomeItem.Playlist(name = c.title, imageUrl = image.ifBlank { LIKED_COVER }, subtitle = context.getString(R.string.assisted_curation_search_playlist), id = LIKED_SONGS_ID)
else -> null
}
}
diff --git a/base/app/src/main/java/com/music/spotui/data/api/UpdateCheckState.kt b/base/app/src/main/java/com/music/spotui/data/api/UpdateCheckState.kt
new file mode 100644
index 00000000..834e97ed
--- /dev/null
+++ b/base/app/src/main/java/com/music/spotui/data/api/UpdateCheckState.kt
@@ -0,0 +1,55 @@
+package com.music.spotui.data.api
+
+import android.content.Context
+import android.text.format.DateUtils
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableLongStateOf
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
+import app.myspoti.engine.R
+
+/**
+ * What the About section shows about the update check: the spinner, the last answer and the
+ * time of the last successful check. Shared by the Classic and Immersive settings.
+ */
+class UpdateCheckState(private val context: Context) {
+ var checking by mutableStateOf(false)
+ private set
+ /** Result line of the last manual check ("Up to date (checked just now)", an error...). */
+ var message by mutableStateOf<String?>(null)
+ private set
+ var isError by mutableStateOf(false)
+ private set
+ private var checkedAt by mutableLongStateOf(UpdateChecker.lastChecked(context))
+
+ /** "Last checked: 5 minutes ago", or "Never checked". */
+ val lastCheckedText: String
+ get() = if (checkedAt <= 0L) context.getString(R.string.settings_update_never)
+ else context.getString(R.string.settings_update_last_checked,
+ DateUtils.getRelativeTimeSpanString(checkedAt, System.currentTimeMillis(), DateUtils.MINUTE_IN_MILLIS))
+
+ /** Asks GitHub now; a newer release opens the app's update card (tap -> download flow). */
+ suspend fun run() {
+ if (checking) return
+ checking = true; message = null; isError = false
+ val outcome = UpdateChecker.refresh(context)
+ checking = false
+ checkedAt = UpdateChecker.lastChecked(context)
+ when (outcome) {
+ is UpdateChecker.Outcome.Found -> {
+ message = context.getString(R.string.settings_update_available, outcome.release.version)
+ com.music.spotui.updateRelease.value = outcome.release
+ }
+ UpdateChecker.Outcome.UpToDate -> message = context.getString(R.string.settings_update_uptodate_now)
+ is UpdateChecker.Outcome.Failed -> {
+ isError = true
+ message = context.getString(if (outcome.rateLimited) R.string.settings_update_rate_limited else R.string.settings_update_failed)
+ }
+ }
+ }
+}
+
+@Composable
+fun rememberUpdateCheckState(context: Context): UpdateCheckState = remember { UpdateCheckState(context) }
diff --git a/base/app/src/main/java/com/music/spotui/data/api/UpdateChecker.kt b/base/app/src/main/java/com/music/spotui/data/api/UpdateChecker.kt
index 522aeda0..917a8a1f 100644
--- a/base/app/src/main/java/com/music/spotui/data/api/UpdateChecker.kt
+++ b/base/app/src/main/java/com/music/spotui/data/api/UpdateChecker.kt
@@ -12,47 +12,101 @@ import java.util.concurrent.TimeUnit
/**
* New version check against the GitHub releases of [BuildConfig.UPDATE_REPO]
* (set by the CI build; empty in local builds, which never check).
- * At most one request every 3 hours (releases can come several a day). The release's
+ * Automatic checks at most once an hour (launch/resume) and every 6 h while open. The release's
* APK is downloaded and installed in the app ([AppUpdater]).
*/
object UpdateChecker {
/** [apkUrl]: the release's signed APK; blank when the release has none (then its page opens). */
data class Release(val version: String, val pageUrl: String, val notes: String = "", val apkUrl: String = "")
- private const val INTERVAL_MS = 3 * 3_600_000L
+ /** Launch / resume check: not more often than this (releases can come several a day). */
+ const val INTERVAL_MS = 3_600_000L
+ /** While the app stays open, the check runs again this often. */
+ const val PERIODIC_MS = 6 * 3_600_000L
+ /** After a failed automatic check (offline, rate limit), wait this long before trying again. */
+ private const val RETRY_MS = 10 * 60_000L
private val http by lazy { OkHttpClient.Builder().callTimeout(10, TimeUnit.SECONDS).addInterceptor(com.music.spotui.data.DataSaver.interceptor).build() }
+ /** Answer of [refresh]: the check always asks GitHub, whatever was cached. */
+ sealed interface Outcome {
+ data class Found(val release: Release) : Outcome
+ data object UpToDate : Outcome
+ /** [rateLimited]: GitHub refused for too many requests (about an hour on a shared network). */
+ data class Failed(val rateLimited: Boolean) : Outcome
+ }
+
+ private sealed interface Fetch {
+ data class Ok(val release: Release?) : Fetch
+ data class Err(val rateLimited: Boolean) : Fetch
+ }
+
+ /** When the last successful check ran (epoch ms), 0 if never. */
+ fun lastChecked(context: Context): Long =
+ context.getSharedPreferences("updates", Context.MODE_PRIVATE).getLong("checked_at", 0L)
+
/**
- * [manual]: asked from Settings. A release dismissed with "Later" is then offered again
- * (the launch check stays quiet about it).
+ * Automatic check (launch, resume, periodic). [manual]: a release dismissed with "Later" is
+ * offered again (the automatic check stays quiet about it). Skipped when the last
+ * successful check is less than [INTERVAL_MS] old; a failed one is retried after [RETRY_MS]
+ * and never erases the release already known.
*/
suspend fun check(context: Context, manual: Boolean = false): Release? = withContext(Dispatchers.IO) {
val repo = BuildConfig.UPDATE_REPO
if (repo.isBlank()) return@withContext null
val prefs = context.getSharedPreferences("updates", Context.MODE_PRIVATE)
val now = System.currentTimeMillis()
- if (now - prefs.getLong("checked_at", 0L) < INTERVAL_MS) return@withContext pending(prefs, manual)
- val release = runCatching {
- // Stable builds follow "latest", which never includes pre-releases. A beta build
- // also takes the newer betas, then the release they lead to.
- val url = if (isBeta) "https://api.github.com/repos/$repo/releases?per_page=10" else "https://api.github.com/repos/$repo/releases/latest"
- val request = Request.Builder().url(url).header("Accept", "application/vnd.github+json").build()
- http.newCall(request).execute().use { r ->
- if (!r.isSuccessful) return@runCatching null
- val text = r.body.string()
- val list = if (isBeta) org.json.JSONArray(text).let { a -> (0 until a.length()).map { a.getJSONObject(it) } } else listOf(JSONObject(text))
- // Betas and releases are two apps: each one is offered its own channel only.
- list.filter { !it.optBoolean("draft") && (!isBeta || it.optBoolean("prerelease")) }
- .map { Release(it.getString("tag_name").removePrefix("v"), it.getString("html_url"), cleanNotes(it.optString("body")), apkAsset(it)) }
- .reduceOrNull { best, next -> if (isNewer(next.version, best.version)) next else best }
- }
- }.getOrNull()
- prefs.edit().putLong("checked_at", now)
- .putString("version", release?.version).putString("url", release?.pageUrl)
- .putString("notes", release?.notes).putString("apk", release?.apkUrl).apply()
+ if (now - prefs.getLong("checked_at", 0L) < INTERVAL_MS || now - prefs.getLong("tried_at", 0L) < RETRY_MS) return@withContext pending(prefs, manual)
+ store(prefs, fetch(repo, force = false), now)
pending(prefs, manual)
}
+ /**
+ * "Check now" from Settings: bypasses the throttle, the stored answer and every HTTP/CDN
+ * cache, and says what happened.
+ */
+ suspend fun refresh(context: Context): Outcome = withContext(Dispatchers.IO) {
+ val repo = BuildConfig.UPDATE_REPO
+ if (repo.isBlank()) return@withContext Outcome.UpToDate
+ val prefs = context.getSharedPreferences("updates", Context.MODE_PRIVATE)
+ val result = fetch(repo, force = true)
+ store(prefs, result, System.currentTimeMillis())
+ when (result) {
+ is Fetch.Err -> Outcome.Failed(result.rateLimited)
+ is Fetch.Ok -> pending(prefs, manual = true)?.let { Outcome.Found(it) } ?: Outcome.UpToDate
+ }
+ }
+
+ private fun store(prefs: android.content.SharedPreferences, result: Fetch, now: Long) {
+ val e = prefs.edit()
+ when (result) {
+ // A failure keeps the last answer: "up to date" must not come from a failed request.
+ is Fetch.Err -> e.putLong("tried_at", now)
+ is Fetch.Ok -> e.putLong("checked_at", now).putLong("tried_at", 0L)
+ .putString("version", result.release?.version).putString("url", result.release?.pageUrl)
+ .putString("notes", result.release?.notes).putString("apk", result.release?.apkUrl)
+ }
+ e.apply()
+ }
+
+ private fun fetch(repo: String, force: Boolean): Fetch = try {
+ // Stable builds follow "latest", which never includes pre-releases. A beta build
+ // reads the list: the newest beta, compared with [isNewer].
+ val bust = if (force) "${if (isBeta) "&" else "?"}_=${System.currentTimeMillis()}" else ""
+ val url = (if (isBeta) "https://api.github.com/repos/$repo/releases?per_page=10" else "https://api.github.com/repos/$repo/releases/latest") + bust
+ val request = Request.Builder().url(url).header("Accept", "application/vnd.github+json")
+ .apply { if (force) { header("Cache-Control", "no-cache, no-store, max-age=0"); header("Pragma", "no-cache") } }.build()
+ http.newCall(request).execute().use { r ->
+ if (!r.isSuccessful) return@use Fetch.Err(r.code == 429 || (r.code == 403 && r.header("x-ratelimit-remaining") == "0"))
+ val text = r.body.string()
+ val list = if (isBeta) org.json.JSONArray(text).let { a -> (0 until a.length()).map { a.getJSONObject(it) } } else listOf(JSONObject(text))
+ // Betas and releases are two apps (different package names, one cannot update the
+ // other): each one is offered its own channel only.
+ Fetch.Ok(list.filter { !it.optBoolean("draft") && (!isBeta || it.optBoolean("prerelease")) }
+ .map { Release(it.getString("tag_name").removePrefix("v"), it.getString("html_url"), cleanNotes(it.optString("body")), apkAsset(it)) }
+ .reduceOrNull { best, next -> if (isNewer(next.version, best.version)) next else best })
+ }
+ } catch (e: Exception) { Fetch.Err(false) }
+
/** The newer release last seen, dismissed or not (no request): what Settings > About shows. */
fun known(context: Context): Release? =
pending(context.getSharedPreferences("updates", Context.MODE_PRIVATE), true)
diff --git a/base/app/src/main/java/com/music/spotui/di/LocalPlayer.kt b/base/app/src/main/java/com/music/spotui/di/LocalPlayer.kt
index 7398a913..758b5957 100644
--- a/base/app/src/main/java/com/music/spotui/di/LocalPlayer.kt
+++ b/base/app/src/main/java/com/music/spotui/di/LocalPlayer.kt
@@ -45,11 +45,25 @@ object LocalPlayer {
private var exo: ExoPlayer? = null
private val errors = StreamErrors()
+ private val audioAttributes = AudioAttributes.Builder().setUsage(C.USAGE_MEDIA).setContentType(C.AUDIO_CONTENT_TYPE_MUSIC).build()
+
+ /**
+ * An extension mirrors the song in the Web Player, unheard: that page asks Android for the audio
+ * focus too, and took it from this player (it paused 3 s into every mirror, which ended the
+ * mirror). While the mirror lasts this player keeps playing whoever asks; calls and other apps
+ * pause it again when it ends.
+ */
+ @Volatile private var mirrorActive = false
+ fun setMirrorFocus(on: Boolean) {
+ mirrorActive = on
+ android.os.Handler(android.os.Looper.getMainLooper()).post { exo?.setAudioAttributes(audioAttributes, !on) }
+ }
+
@androidx.annotation.OptIn(androidx.media3.common.util.UnstableApi::class)
private fun build(main: Boolean): ExoPlayer = ExoPlayer.Builder(Graph.app)
// The fading-out copy of a crossfade owns neither the audio focus nor the noisy-audio pause:
// the main player has them and the fade follows its play state.
- .setAudioAttributes(AudioAttributes.Builder().setUsage(C.USAGE_MEDIA).setContentType(C.AUDIO_CONTENT_TYPE_MUSIC).build(), main)
+ .setAudioAttributes(audioAttributes, main && !mirrorActive)
.setHandleAudioBecomingNoisy(main)
// Downloaded songs are encrypted files: the player reads them through the decrypting source.
.setMediaSourceFactory(androidx.media3.exoplayer.source.DefaultMediaSourceFactory(
diff --git a/base/app/src/main/java/com/music/spotui/di/SongPlayer.kt b/base/app/src/main/java/com/music/spotui/di/SongPlayer.kt
index e2fff048..7b577e77 100644
--- a/base/app/src/main/java/com/music/spotui/di/SongPlayer.kt
+++ b/base/app/src/main/java/com/music/spotui/di/SongPlayer.kt
@@ -256,6 +256,13 @@ object SongPlayer {
override fun playFromSearch(query: String) { scope.launch { AutoBrowser.playFromSearch(query) } }
override fun setRemoteVolume(volume: Int) = SongPlayer.setRemoteVolume(volume)
override fun setShuffle(on: Boolean) = SongPlayer.setShuffle(on)
+ override val isEpisode: Boolean get() = SongPlayer.isEpisode
+ override fun skipBy(deltaMs: Long) {
+ // Past the end of the episode a +15 s is the normal end: on to the next item.
+ val duration = getDuration()
+ if (deltaMs > 0 && duration > 0 && getCurrentPosition() + deltaMs >= duration) SongPlayer.next(by = "media session")
+ else SongPlayer.skipBy(deltaMs)
+ }
}
// ── Last track: shown at launch (mini player) before the Web Player reports ──
@@ -404,6 +411,7 @@ object SongPlayer {
buffering = isBuffering && !ad,
liked = !ad && liked,
shuffle = st?.shuffle?.value == true,
+ episode = !ad && isEpisode,
))
com.music.spotui.widget.NowPlayingWidget.show(Graph.app,
title = title,
@@ -545,7 +553,14 @@ object SongPlayer {
}
/** Back from the local player: the page is heard again if an extension's mirror had muted it. */
- fun unmuteMirror() { if (api.player.localMute) command { api.player.setLocalMute(false) } }
+ fun unmuteMirror() { com.music.spotui.extensions.Extensions.mirrorReset("the local player stopped"); unmuteMirrorNow() }
+
+ fun unmuteMirrorNow() { if (api.player.localMute) command { api.player.setLocalMute(false) } }
+
+ /** The local player's state for the mirror guard: playing, track uri, duration. */
+ fun localSnapshot3(): Triple<Boolean, String?, Long> =
+ Triple(LocalPlayer.active.value && playing, _nowPlaying.value.uri.takeIf { LocalPlayer.active.value }, durationMs)
+ fun localSnapshot(): Pair<Boolean, String?> = localSnapshot3().let { it.first to it.second }
/** Back from the local player: the Spotify queue again. */
fun restoreEngineQueue() = main.post { _queue.value = EngineQueue(); applyQueue(apiQueue) }
@@ -1954,6 +1969,7 @@ object SongPlayer {
}
pushNotification(song.copy(coverUri = cover), liked)
if (songChanged) refreshCurrentLiked()
+ com.music.spotui.extensions.Extensions.mirrorTick(isPlaying, uri)
val source = if (t.uri.scheme == "file") com.music.spotui.data.local.ListenHistory.Source.DOWNLOAD
else com.music.spotui.data.local.ListenHistory.Source.LOCAL
trackListen("local:${t.id}", song, source, isPlaying)
diff --git a/base/app/src/main/java/com/music/spotui/extensions/ExtensionRegistry.kt b/base/app/src/main/java/com/music/spotui/extensions/ExtensionRegistry.kt
index 6ce1eee0..3ad9c721 100644
--- a/base/app/src/main/java/com/music/spotui/extensions/ExtensionRegistry.kt
+++ b/base/app/src/main/java/com/music/spotui/extensions/ExtensionRegistry.kt
@@ -54,6 +54,13 @@ data class InstalledExtension(
val pendingUpdate: PendingUpdate? = null,
/** The version the user answered "Keep current" to: not offered again, a newer one is. */
val declinedVersionCode: Int = 0,
+ /** The package ("Not now") declined, for a code-only update that keeps the same version code. */
+ val declinedSha: String? = null,
+ /** The package of a harmless update first seen at [seenAt]: auto-applied once a day has passed ([UpdateGate.DELAY_MS]). */
+ val seenSha: String? = null,
+ val seenAt: Long = 0,
+ /** Why updates from its repository are refused (the host's ids changed: re-registered or transferred), shown as a warning. */
+ val updateBlocked: String? = null,
/** When its source was last checked for an update (at most once a day, apart from the button). */
val lastCheck: Long = 0,
/** Its repository answered 404: it keeps running from the copy on the phone, marked "source gone". */
@@ -66,6 +73,9 @@ data class InstalledExtension(
@Serializable
data class KeptVersion(val version: String, val versionCode: Int, val sha256: String, val origin: Origin? = null)
+/** Spotify's place in the audio sources' order: the extensions after it are not asked. */
+const val SPOTIFY_SOURCE = "spotify"
+
/** A newer version that asks something the user has not accepted; the old one keeps running. */
@Serializable
data class PendingUpdate(val kept: KeptVersion, val changes: List<Change>, val changelog: String = "")
@@ -96,6 +106,17 @@ data class Registry(
return items.sortedBy { order.indexOf(id(it)).let { i -> if (i < 0) Int.MAX_VALUE else i } }
}
+ /**
+ * [items] in the order the source [action] (an [app.myspoti.extensions.Mode.ORDERED] action key)
+ * asks them: the user's order for it, else the one made active when sources were exclusive
+ * first, then [area]'s order.
+ */
+ fun <T> bySourceOrder(action: String, area: String, items: List<T>, id: (T) -> String): List<T> {
+ val first = active[action]
+ val seeded = byPriority(area, items, id).sortedBy { if (id(it) == first) 0 else 1 }
+ return byPriority(action, seeded, id)
+ }
+
/**
* [id] moved by [delta] places (negative: higher) among [providers], the ids of the
* extensions providing [hook] in installation order; the whole order is then kept.
diff --git a/base/app/src/main/java/com/music/spotui/extensions/ExtensionStore.kt b/base/app/src/main/java/com/music/spotui/extensions/ExtensionStore.kt
index d63db178..a60ccbd4 100644
--- a/base/app/src/main/java/com/music/spotui/extensions/ExtensionStore.kt
+++ b/base/app/src/main/java/com/music/spotui/extensions/ExtensionStore.kt
@@ -89,6 +89,16 @@ object ExtensionStore {
/** Per repository (`owner/name`), its 👍 / 👎 (no account needed to read them). */
val ratings = MutableStateFlow<Map<String, Rating>>(emptyMap())
+ /** Per repository slug, the ids the hosts' searches gave it: compared with those pinned at install ([identityChanged]). */
+ val identities = MutableStateFlow<Map<String, app.myspoti.extensions.RepoIds>>(emptyMap())
+
+ /** Whether the discovery shows another repository or owner id under the slug [e] was installed from. */
+ fun identityChanged(e: InstalledExtension): Boolean {
+ val pinned = e.accepted ?: return false
+ val seen = e.origin?.repo?.let { identities.value[it] } ?: return false
+ return pinned.repoId != null && pinned.repoId != seen.repo || pinned.ownerId != null && pinned.ownerId != seen.owner
+ }
+
/** Per repository, the downloads of its release's package, read on its store page. */
val downloads = MutableStateFlow<Map<String, Long>>(emptyMap())
@@ -111,6 +121,7 @@ object ExtensionStore {
}.getOrElse { failed += "${h.label}: ${it.message ?: it}"; emptyList() }
}
if (failed.size == CodeHost.entries.size) throw ExtensionException(failed.joinToString("; "))
+ identities.value = found.mapNotNull { f -> f.ids?.let { f.repo!!.slug to it } }.toMap()
val gate = Semaphore(8)
val entries = withContext(Dispatchers.IO) {
found.map { f ->
diff --git a/base/app/src/main/java/com/music/spotui/extensions/ExtensionUi.kt b/base/app/src/main/java/com/music/spotui/extensions/ExtensionUi.kt
index 6aecd825..37301fd9 100644
--- a/base/app/src/main/java/com/music/spotui/extensions/ExtensionUi.kt
+++ b/base/app/src/main/java/com/music/spotui/extensions/ExtensionUi.kt
@@ -66,6 +66,7 @@ import androidx.compose.material.icons.rounded.Star
import androidx.compose.material.icons.rounded.Timer
import androidx.compose.material.icons.rounded.Translate
import androidx.compose.material.icons.rounded.Tune
+import androidx.compose.material.icons.rounded.VolumeOff
import androidx.compose.material.icons.rounded.Web
import androidx.compose.material.icons.rounded.Key
import androidx.compose.material3.DropdownMenu
@@ -137,6 +138,7 @@ private fun shielded(): Boolean = SurfaceGuard.app.state.collectAsState().value.
fun actionIcon(a: Action?): ImageVector = when (a) {
Action.PLAYBACK_CONTROL -> Icons.Rounded.PlayCircle
Action.PLAYBACK_QUEUE -> Icons.AutoMirrored.Rounded.QueueMusic
+ Action.PLAYBACK_MIRROR -> Icons.Rounded.VolumeOff
Action.PLAYBACK_EVENTS -> Icons.Rounded.GraphicEq
Action.LYRICS_PROVIDE -> Icons.Rounded.Lyrics
Action.TRACKINFO_PROVIDE -> Icons.Rounded.Info
@@ -163,6 +165,7 @@ fun actionIcon(a: Action?): ImageVector = when (a) {
fun actionLabel(a: Action?): Int = when (a) {
Action.PLAYBACK_CONTROL -> R.string.action_playback_control
Action.PLAYBACK_QUEUE -> R.string.action_playback_queue
+ Action.PLAYBACK_MIRROR -> R.string.action_playback_mirror
Action.PLAYBACK_EVENTS -> R.string.action_playback_events
Action.LYRICS_PROVIDE -> R.string.action_lyrics_provide
Action.TRACKINFO_PROVIDE -> R.string.action_trackinfo_provide
@@ -430,6 +433,14 @@ private fun MenuEntryRow(owner: String, b: Block.MenuEntry, showOwner: Boolean =
// ── The player ──
+/** "Spotify mirrored by <extension>" while an extension keeps Spotify muted (playback.mirror). */
+@Composable
+fun MirrorIndicator() {
+ val by = Extensions.mirrorBy.collectAsState().value ?: return
+ Text(stringResource(R.string.mirror_indicator, by), color = AppMuted, fontSize = 12.sp,
+ modifier = androidx.compose.ui.Modifier.padding(top = 6.dp))
+}
+
/** The extensions' buttons under the player's own controls: a few on screen, the rest behind ⋯. */
@Composable
fun ExtensionPlayerButtons(track: app.myspoti.extensions.TrackInfo?) {
diff --git a/base/app/src/main/java/com/music/spotui/extensions/ExtensionUpdates.kt b/base/app/src/main/java/com/music/spotui/extensions/ExtensionUpdates.kt
index 2856ad86..9981d7c5 100644
--- a/base/app/src/main/java/com/music/spotui/extensions/ExtensionUpdates.kt
+++ b/base/app/src/main/java/com/music/spotui/extensions/ExtensionUpdates.kt
@@ -3,6 +3,8 @@ package com.music.spotui.extensions
import app.myspoti.extensions.Archive
import app.myspoti.extensions.BlockList
import app.myspoti.extensions.Catalog
+import app.myspoti.extensions.CodeDiff
+import app.myspoti.extensions.RepoIds
import app.myspoti.extensions.ExtensionException
import app.myspoti.extensions.ExtensionPackage
import app.myspoti.extensions.GitHub
@@ -41,7 +43,7 @@ object ExtensionUpdates {
class Fetched(val zip: ByteArray, val pkg: ExtensionPackage, val origin: Origin?)
/** What a check found, for the "Check for updates" button. */
- enum class Result { UP_TO_DATE, APPLIED, NEEDS_OK, DECLINED, SOURCE_GONE, INCOMPATIBLE, BLOCKED, NOT_FROM_GITHUB, FAILED }
+ enum class Result { UP_TO_DATE, APPLIED, WAITING, REPO_CHANGED, NEEDS_OK, DECLINED, SOURCE_GONE, INCOMPATIBLE, BLOCKED, NOT_FROM_GITHUB, FAILED }
private val _blocks = MutableStateFlow(BlockList.EMPTY)
val blocks: StateFlow<BlockList> = _blocks.asStateFlow()
@@ -111,6 +113,12 @@ object ExtensionUpdates {
return runCatching { get(api, MAX_TEXT).body?.decodeToString()?.let(Discovery::parseDefaultBranch) }.getOrNull() ?: "main"
}
+ /** The numeric ids the host gives [repo] and its owner (null when the host does not answer: nothing is pinned then). */
+ internal fun identity(repo: GitHubRepo): RepoIds? = runCatching {
+ val a = get(Discovery.identityUrl(repo), MAX_TEXT, accept = if (repo.host == app.myspoti.extensions.CodeHost.GITHUB) "application/vnd.github+json" else null)
+ if (a.status in 200..299) a.body?.decodeToString()?.let { Discovery.parseIdentity(repo.host, it) } else null
+ }.getOrNull()
+
private class SourceGone : ExtensionException("its GitHub repository is gone")
/**
@@ -141,7 +149,8 @@ object ExtensionUpdates {
throw ExtensionException("the package is not the one the store lists (sha256 differs)")
val pkg = ExtensionPackage.read(zip)
val from = movedTo ?: GitHub.repoOf(answer.finalUrl) ?: repo.slug
- Fetched(zip, pkg, Origin(from, at ?: GitHubRepo.HEAD, isTag, commit = if (asset) null else Archive.commit(raw), asset = asset))
+ val ids = identity(GitHubRepo.parse(from) ?: repo)
+ Fetched(zip, pkg, Origin(from, at ?: GitHubRepo.HEAD, isTag, commit = if (asset) null else Archive.commit(raw), asset = asset, repoId = ids?.repo, ownerId = ids?.owner))
}
// ── Updates ──
@@ -198,31 +207,61 @@ object ExtensionUpdates {
val manifestAnswer = get(repo.raw(concrete(repo, ref), "manifest.json"), MAX_TEXT)
if (manifestAnswer.status == 404 && tag == null) throw SourceGone()
val listed = manifestAnswer.body?.let { runCatching { Manifest.parse(it.decodeToString()) }.getOrNull() }
+ val head = tag == null
if (e.sourceGone) Extensions.update { r -> r.find(id)?.let { r.put(it.copy(sourceGone = false)) } ?: r }
// A release without a manifest at its root (its package only in the asset) is read in full.
- if (listed != null && listed.versionCode <= e.versionCode) return Result.UP_TO_DATE
- if (listed != null && !manual && listed.versionCode == e.declinedVersionCode) return Result.DECLINED
- if (listed != null && e.pendingUpdate?.kept?.versionCode == listed.versionCode) return Result.NEEDS_OK
+ // A tag is immutable: the same version code there is the same code. A branch can change under the same version.
+ if (listed != null && (listed.versionCode < e.versionCode || listed.versionCode == e.versionCode && !head)) return Result.UP_TO_DATE
+ val newer = listed != null && listed.versionCode > e.versionCode
+ if (newer && !manual && listed!!.versionCode == e.declinedVersionCode) return Result.DECLINED
+ if (newer && e.pendingUpdate?.kept?.versionCode == listed!!.versionCode) return Result.NEEDS_OK
val f = fromGitHub(repo, tag ?: ref, tag = tag != null).let { f -> movedTo?.let { Fetched(f.zip, f.pkg, f.origin?.copy(repo = it)) } ?: f }
val m = f.pkg.manifest
- if (m.versionCode <= e.versionCode) return Result.UP_TO_DATE
- if (!manual && m.versionCode == e.declinedVersionCode) return Result.DECLINED
+ if (m.versionCode < e.versionCode || m.versionCode == e.versionCode && (!head || f.pkg.sha256 == e.sha256)) return Result.UP_TO_DATE
+ if (!manual && m.versionCode == e.declinedVersionCode && (e.declinedSha == null || e.declinedSha == f.pkg.sha256)) return Result.DECLINED
if (blocked(m.id, f.pkg.sha256) != null) return Result.BLOCKED
if (!Catalog.Entry(m.id, m.name, m.version, m.versionCode, m.apiVersion, m.author, url = "", sha256 = "", minAppVersion = m.minAppVersion)
.compatible(app.myspoti.engine.BuildConfig.VERSION_NAME)) return Result.INCOMPATIBLE
- val accepted = e.accepted ?: Extensions.manifest(id)?.let { Snapshot.of(it, origin.repo) } ?: return Result.FAILED
+ val running = Extensions.pkg(id)
+ var accepted = e.accepted ?: Extensions.manifest(id)?.let { Snapshot.of(it, origin.repo) } ?: return Result.FAILED
+ // Installs from before the code and the repository were pinned: pinned now, from what runs and what the host says, without asking.
+ if (accepted.scriptSha == null || accepted.repoId == null) {
+ val ids = if (accepted.repoId == null) (origin.repoId?.let { RepoIds(it, origin.ownerId.orEmpty()) }?.takeIf { it.owner.isNotEmpty() } ?: identity(repo)) else null
+ accepted = accepted.copy(
+ scriptSha = accepted.scriptSha ?: running?.script?.let(Snapshot::scriptHash),
+ repoId = accepted.repoId ?: ids?.repo, ownerId = accepted.ownerId ?: ids?.owner,
+ )
+ Extensions.update { r -> r.find(id)?.let { r.put(it.copy(accepted = accepted)) } ?: r }
+ }
+ val next = Snapshot.of(m, f.origin?.repo, f.pkg.script, f.origin)
+ val code = CodeDiff.of(running?.let { mapOf(it.manifest.main to it.script) }.orEmpty(), mapOf(m.main to f.pkg.script))
+ val now = System.currentTimeMillis()
+ // The user asked now (the button): no wait. Else the clock runs from when this very package was first seen.
+ val firstSeen = if (manual) null else if (e.seenSha == f.pkg.sha256 && e.seenAt > 0) e.seenAt else now
val kept = KeptVersion(m.version, m.versionCode, f.pkg.sha256, f.origin)
- return when (val d = UpdateGate.decide(accepted, Snapshot.of(m, f.origin?.repo))) {
+ return when (val d = UpdateGate.decide(accepted, next, code, firstSeen, now)) {
+ is UpdateGate.Decision.Block -> {
+ Extensions.update { r -> r.find(id)?.let { r.put(it.copy(updateBlocked = d.reason, pendingUpdate = null)) } ?: r }
+ File(Extensions.dir, "$id/staging.zip").delete()
+ Extensions.log(id, "update from ${origin.repo} refused: repository changed owner (${d.reason})")
+ Result.REPO_CHANGED
+ }
+ is UpdateGate.Decision.Wait -> {
+ Extensions.update { r -> r.find(id)?.let { r.put(it.copy(updateBlocked = null, seenSha = f.pkg.sha256, seenAt = firstSeen ?: now)) } ?: r }
+ Extensions.log(id, "${m.version} seen: applied by itself after 24 h")
+ Result.WAITING
+ }
UpdateGate.Decision.Apply -> {
val plan = InstallPlan.of(m, e, accepted.toManifest()) as? InstallPlan.Update ?: return Result.UP_TO_DATE
Extensions.install(f.zip, f.pkg, Grants.replacing(m, plan.refused), e.source, origin = f.origin, accepted = false)
- Extensions.update { r -> r.find(id)?.let { r.put(it.copy(accepted = it.accepted ?: accepted, pendingUpdate = null)) } ?: r }
- Extensions.log(id, "updated by itself to ${m.version}: it asks nothing new")
+ val pinned = accepted.copy(scriptSha = next.scriptSha ?: accepted.scriptSha)
+ Extensions.update { r -> r.find(id)?.let { r.put(it.copy(accepted = pinned, pendingUpdate = null, updateBlocked = null, seenSha = null, seenAt = 0)) } ?: r }
+ Extensions.log(id, "updated by itself to ${m.version}: it asks nothing new (${code.lines} lines changed)")
Result.APPLIED
}
is UpdateGate.Decision.Ask -> {
Extensions.writeBytesAtomically(File(Extensions.dir, "$id/staging.zip"), f.zip)
- Extensions.update { r -> r.find(id)?.let { r.put(it.copy(pendingUpdate = PendingUpdate(kept, d.changes, m.changelog))) } ?: r }
+ Extensions.update { r -> r.find(id)?.let { r.put(it.copy(updateBlocked = null, pendingUpdate = PendingUpdate(kept, d.changes, m.changelog))) } ?: r }
Extensions.log(id, "${m.version} waits for your OK: ${d.changes.joinToString { "${it.kind.name.lowercase()} ${it.key}" }}")
Result.NEEDS_OK
}
@@ -244,6 +283,7 @@ object ExtensionUpdates {
*/
suspend fun accept(id: String) = withContext(Dispatchers.IO) {
val e = Extensions.registry.value.find(id) ?: return@withContext
+ e.updateBlocked?.let { throw ExtensionException("update refused: the repository changed owner") }
val p = staged(id) ?: run { Extensions.update { r -> r.put(e.copy(pendingUpdate = null)) }; throw ExtensionException("the update is no longer on the phone: check again") }
val accepted = e.accepted?.toManifest() ?: Extensions.manifest(id)
val plan = InstallPlan.of(p.manifest, e, accepted) as? InstallPlan.Update ?: return@withContext
@@ -257,7 +297,7 @@ object ExtensionUpdates {
fun keepCurrent(id: String) {
val e = Extensions.registry.value.find(id) ?: return
File(Extensions.dir, "$id/staging.zip").delete()
- Extensions.update { r -> r.put(e.copy(pendingUpdate = null, declinedVersionCode = e.pendingUpdate?.kept?.versionCode ?: e.declinedVersionCode)) }
+ Extensions.update { r -> r.put(e.copy(pendingUpdate = null, declinedVersionCode = e.pendingUpdate?.kept?.versionCode ?: e.declinedVersionCode, declinedSha = e.pendingUpdate?.kept?.sha256 ?: e.declinedSha)) }
Extensions.log(id, "kept ${e.version}: ${e.pendingUpdate?.kept?.version} declined")
}
diff --git a/base/app/src/main/java/com/music/spotui/extensions/Extensions.kt b/base/app/src/main/java/com/music/spotui/extensions/Extensions.kt
index ff033d5d..60c8cb34 100644
--- a/base/app/src/main/java/com/music/spotui/extensions/Extensions.kt
+++ b/base/app/src/main/java/com/music/spotui/extensions/Extensions.kt
@@ -45,6 +45,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.FlowPreview
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.async
+import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
@@ -128,7 +129,12 @@ object Extensions {
if (isReady) return
ctx = application
dir = File(application.filesDir, "extensions")
- _registry.value = Registry.read(File(dir, "registry.json"))
+ _registry.value = Registry.read(File(dir, "registry.json")).let { r ->
+ // Always-allow grants without an operation on a multiplexed endpoint (GraphQL) covered every
+ // operation: dropped, the user is asked again (per operation from now on).
+ if (r.extensions.none { e -> e.rawGrants.any { it.tooBroad } }) r
+ else r.extensions.fold(r) { acc, e -> if (e.rawGrants.any { it.tooBroad }) acc.put(e.copy(rawGrants = e.rawGrants.filterNot { it.tooBroad })) else acc }
+ }
// A protected surface just went: what extensions draw is asked again.
CoroutineScope(SupervisorJob() + Dispatchers.Default).launch { guard.state.collect { if (it.isEmpty()) blocksTick.value++ } }
scope.launch {
@@ -267,7 +273,7 @@ object Extensions {
disabledReason = if (startOff) "kept the extension it conflicts with" else null,
installedAt = before?.installedAt ?: System.currentTimeMillis(), source = source,
origin = origin ?: before?.origin,
- accepted = if (accepted) Snapshot.of(p.manifest, (origin ?: before?.origin)?.repo)
+ accepted = if (accepted) Snapshot.of(p.manifest, (origin ?: before?.origin)?.repo, p.script, origin ?: before?.origin)
else before?.accepted ?: beforeManifest?.let { Snapshot.of(it, before?.origin?.repo) },
previous = if (before != null && before.sha256 != p.sha256) KeptVersion(before.version, before.versionCode, before.sha256, before.origin) else before?.previous,
declinedVersionCode = before?.declinedVersionCode ?: 0,
@@ -365,15 +371,19 @@ object Extensions {
// ── The hooks, at their fixed points ──
/**
- * The running extensions providing [hook], in their area's priority order. An exclusive action
- * ([app.myspoti.extensions.Mode.EXCLUSIVE]) has one: the one the user made active, else the first.
+ * The running extensions providing [hook], in their area's priority order (a source: in the
+ * user's order for it, [sources]). An exclusive action ([app.myspoti.extensions.Mode.EXCLUSIVE])
+ * has one: the one the user made active, else the first.
*/
private fun providing(hook: Hook): List<Pair<String, ExtensionRuntime>> = _registry.value.let { r ->
- val area = (hook.action?.area ?: Area.OTHER).key
+ val action = hook.action
+ val area = (action?.area ?: Area.OTHER).key
// A source whose last `status` said it does not answer is skipped: the next one, or Spotify, plays.
val skip = { id: String -> hook in SOURCE_HOOKS && health.inactive(id) }
- val all = r.byPriority(area, r.extensions) { it.id }.mapNotNull { e -> runtimes[e.id]?.takeIf { e.enabled && it.provides(hook) && !skip(e.id) }?.let { e.id to it } }
- val action = hook.action
+ // A source: the extensions above Spotify only (all of them while Spotify is last).
+ val ordered = if (action?.mode == app.myspoti.extensions.Mode.ORDERED) line(r, action).takeWhile { it != SPOTIFY_SOURCE }.mapNotNull(r::find)
+ else r.byPriority(area, r.extensions) { it.id }
+ val all = ordered.mapNotNull { e -> runtimes[e.id]?.takeIf { e.enabled && it.provides(hook) && !skip(e.id) }?.let { e.id to it } }
if (action == null || action.mode != app.myspoti.extensions.Mode.EXCLUSIVE) all
else Conflicts.activeFor(all.map { it.first }, r.active[action.key]).let { one -> all.filter { it.first == one } }
}
@@ -386,6 +396,23 @@ object Extensions {
r.move(area.key, Areas.group(r, ::manifest).getValue(area).map { it.id }, id, delta)
}
+ /** The installed extensions giving the source [action] (audio, downloads), in the order they are asked. */
+ fun sources(action: Action): List<InstalledExtension> = _registry.value.let { r -> line(r, action).mapNotNull(r::find) }
+
+ /**
+ * The order the source [action] asks in, as ids: its extensions and, for audio, Spotify
+ * ([SPOTIFY_SOURCE], last until the user moves it up; the extensions after it are not asked).
+ */
+ fun sourceLine(action: Action): List<String> = line(_registry.value, action)
+
+ private fun line(r: Registry, action: Action): List<String> {
+ val ids = r.extensions.filter { action in manifest(it.id)?.actionSet().orEmpty() }.map { it.id }
+ return r.bySourceOrder(action.key, Area.AUDIO.key, if (action == Action.AUDIO_SOURCE) ids + SPOTIFY_SOURCE else ids) { it }
+ }
+
+ /** Moves [id] (an extension, or [SPOTIFY_SOURCE]) up (negative [delta]) or down in the order the source [action] asks in. */
+ fun moveSource(action: Action, id: String, delta: Int) = update { r -> r.move(action.key, line(r, action), id, delta) }
+
/** Makes [id] the one acting for the exclusive [action]; the others stay installed, idle. */
fun setActive(action: Action, id: String) {
update { it.copy(active = it.active + (action.key to id)) }
@@ -397,6 +424,57 @@ object Extensions {
Conflicts.activeFor(action.area?.let { byArea()[it] }.orEmpty().filter { it.enabled && action in manifest(it.id)?.actionSet().orEmpty() }.map { it.id }, r.active[action.key])
}
+ // ── Silent Spotify mirror (player.setLocalMute, playback.mirror) ──
+
+ /** The host's rules for the mute; the app feeds it the local player's state. */
+ val mirror = app.myspoti.extensions.MirrorGuard()
+
+ /** Name of the extension keeping Spotify muted now (the players show "Spotify mirrored by <name>"). */
+ val mirrorBy = MutableStateFlow<String?>(null)
+ private var mirrorTimer: kotlinx.coroutines.Job? = null
+
+ private fun mirrorStarted(id: String) {
+ val name = _registry.value.find(id)?.name ?: id
+ mirrorBy.value = name
+ com.music.spotui.di.LocalPlayer.setMirrorFocus(true)
+ did(Area.PLAYBACK, id, "mirrors Spotify silently")
+ log(id, "mirror on: Spotify plays unheard on this phone")
+ mirrorTimer?.cancel()
+ mirrorTimer = scope.launch {
+ while (mirror.active != null) {
+ delay((mirror.remainingMs() ?: 0L) + 500L)
+ val s = SongPlayer.localSnapshot(); mirrorTick(s.first, s.second)
+ }
+ }
+ }
+
+ private fun mirrorEnded(id: String, reason: String) {
+ mirrorBy.value = null
+ com.music.spotui.di.LocalPlayer.setMirrorFocus(false)
+ mirrorTimer?.cancel()
+ did(Area.PLAYBACK, id, "mirror ended: $reason")
+ log(id, "mirror cleared: $reason")
+ SongPlayer.unmuteMirrorNow()
+ }
+
+ /** The local player's state changed: the mute ends when the track changes, pauses or runs out. */
+ fun mirrorTick(localPlaying: Boolean, trackUri: String?) {
+ val a = mirror.active ?: return
+ mirror.check(localPlaying, trackUri)?.let { mirrorEnded(a.extensionId, it) }
+ }
+
+ /** The local player stopped (or any other reason that is not about one extension). */
+ fun mirrorReset(reason: String) {
+ val a = mirror.active ?: return
+ mirror.disable(a.extensionId)
+ mirrorEnded(a.extensionId, reason)
+ }
+
+ internal fun mirrorStartedBy(id: String) = mirrorStarted(id)
+ internal fun mirrorEndedBy(id: String) = mirrorEnded(id, "the extension turned it off")
+
+ private fun mirrorGone(id: String) { if (mirror.extensionGone(id)) mirrorEnded(id, "the extension stopped, was turned off or removed") }
+
// ── Who did what, and the playback arbiter ──
/** The last things extensions did, per area (the Installed tab's activity). */
@@ -616,6 +694,10 @@ object Extensions {
// It was still busy (a slow lookup before): not its fault, nothing counted.
log(id, "${hook.key} skipped: ${e.message}")
null
+ } catch (e: app.myspoti.extensions.ExtensionFault) {
+ // Out of memory, stack overflow, engine crash: turned off at once, the app goes on.
+ if (!rt.closed) disable(id, e.message ?: "crashed the sandbox")
+ null
} catch (e: ExtensionException) {
// Stopped meanwhile (updated, turned off): its cut-short call is not counted.
if (!rt.closed) failed(id, e.message ?: "failed")
@@ -951,6 +1033,7 @@ object Extensions {
}
internal fun stop(id: String) {
+ mirrorGone(id)
runningSha.remove(id)
runtimes.remove(id)?.close(); ExtensionAuth.cancel(id)
health.forget(id); _statuses.value = health.inactiveNow()
@@ -1051,12 +1134,28 @@ object Extensions {
override suspend fun spotify(extensionId: String, call: SpotifyCall): String {
if (!MyspotiRuntime.isStarted) throw IllegalStateException("no Spotify account")
// Playback commands go through the arbiter like myspoti.player's; a dropped one answers null.
+ if (call.area == "player" && call.method == "setLocalMute") return setLocalMute(extensionId, call)
if (call.area == "player" && call.method in ARBITRATED && !arbitrate(extensionId, call.method)) return "null"
if (call.area == "devices" && call.method != "list" && !arbitrate(extensionId, "transfer")) return "null"
return dispatcher.execute(call)
}
- private val ARBITRATED = setOf("play", "pause", "resume", "seek", "next", "previous", "setShuffle", "setRepeat", "skipTo")
+ private val ARBITRATED = setOf("play", "pause", "resume", "seek", "next", "previous", "setShuffle", "setRepeat", "skipTo", "setLocalMute")
+
+ /** The host's side of the mute: only while the local player plays, one extension, rate limited, auto-cleared. */
+ private suspend fun setLocalMute(extensionId: String, call: SpotifyCall): String {
+ val on = kotlinx.serialization.json.Json.parseToJsonElement(call.argsJson).let { it as? kotlinx.serialization.json.JsonArray }
+ ?.firstOrNull()?.let { (it as? kotlinx.serialization.json.JsonPrimitive)?.content } == "true"
+ if (!on) {
+ if (!Extensions.mirror.disable(extensionId)) return "null"
+ try { return dispatcher.execute(call) } finally { Extensions.mirrorEndedBy(extensionId) }
+ }
+ if (!arbitrate(extensionId, "setLocalMute")) return "null"
+ val (playing, uri, dur) = SongPlayer.localSnapshot3()
+ Extensions.mirror.enable(extensionId, playing, uri, dur)?.let { Extensions.log(extensionId, "refused: $it"); throw IllegalStateException(it) }
+ return try { dispatcher.execute(call).also { Extensions.mirrorStartedBy(extensionId) } }
+ catch (t: Throwable) { Extensions.mirror.disable(extensionId); throw t }
+ }
override fun refresh(extensionId: String, surface: String) { blocksTick.value++ }
diff --git a/base/app/src/main/java/com/music/spotui/ui/components/MeaningSheet.kt b/base/app/src/main/java/com/music/spotui/ui/components/MeaningSheet.kt
index 83ee4f5f..84e03c85 100644
--- a/base/app/src/main/java/com/music/spotui/ui/components/MeaningSheet.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/components/MeaningSheet.kt
@@ -41,13 +41,13 @@ import com.music.spotui.data.api.GeniusMeaning
/** The reader's choice between Genius's own words and their translation, for the whole session. */
-private val showOriginal = mutableStateOf(false)
+internal val showOriginal = mutableStateOf(false)
/** Genius's words as shown: each text in the reader's language as soon as its translation arrives. */
-private class ShownMeaning(val meaning: GeniusMeaning.Meaning, val translating: Boolean, val canTranslate: Boolean)
+internal class ShownMeaning(val meaning: GeniusMeaning.Meaning, val translating: Boolean, val canTranslate: Boolean)
@Composable
-private fun rememberShown(original: GeniusMeaning.Meaning, texts: List<String>): ShownMeaning {
+internal fun rememberShown(original: GeniusMeaning.Meaning, texts: List<String>): ShownMeaning {
val lang = readerLanguage()
// The texts on screen are asked for first (the rest may already be on their way in the background).
LaunchedEffect(original, texts) { texts.forEach { GeniusMeaning.requestTranslation(original, it, lang) } }
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/lyrics/ImmersiveLyricsPanel.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/lyrics/ImmersiveLyricsPanel.kt
index f3feaaf3..db9f3270 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/lyrics/ImmersiveLyricsPanel.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/lyrics/ImmersiveLyricsPanel.kt
@@ -22,6 +22,8 @@ import androidx.compose.animation.core.infiniteRepeatable
import androidx.compose.animation.core.rememberInfiniteTransition
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
+import androidx.compose.foundation.ExperimentalFoundationApi
+import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.clickable
import androidx.compose.foundation.gestures.animateScrollBy
import androidx.compose.foundation.interaction.DragInteraction
@@ -71,6 +73,8 @@ import androidx.compose.ui.draw.drawWithCache
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.PathEffect
+import androidx.compose.ui.graphics.StrokeCap
import androidx.compose.ui.graphics.TransformOrigin
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.input.nestedscroll.nestedScroll
@@ -117,7 +121,7 @@ import kotlin.math.abs
* alpha carries the same hierarchy on older devices.
*
* Scrolling by hand clears the blur and suspends the auto-follow, so you can read ahead; a
- * moment after you stop it snaps back to the song. Tapping a line seeks to it.
+ * moment after you stop it snaps back to the song. Tapping a line seeks to it; holding one that Genius explains opens the note.
*
* The list brings its own side gutter and top margin; [contentPadding] is the extra room the
* list keeps clear of whatever the player draws over it.
@@ -279,6 +283,25 @@ private fun LyricsList(
val head = rememberLyricsPlayhead(trackKey, playing && isSynced)
val clock = head.clock
+ // Genius's notes on the lines, read in the background when the song started (App.kt) and kept
+ // by track id; a line it explains is dotted and opens the note on a long press. Tap still seeks.
+ val trackId = SongPlayer.nowPlaying.value.uri.substringAfterLast(':')
+ val genTitle = Graph.currentSongState.title.value
+ val genArtist = Graph.currentSongState.singer.value
+ val genLang = com.music.spotui.ui.components.readerLanguage()
+ val meaning = com.music.spotui.data.api.GeniusMeaning.current.value?.takeIf { it.first == trackId }?.second
+ LaunchedEffect(trackId, genTitle, genArtist) {
+ if (meaning == null) com.music.spotui.data.api.GeniusMeaning.prefetch(trackId, genTitle, genArtist, genLang)
+ }
+ val notes = remember(rows, meaning) {
+ meaning?.let { com.music.spotui.ui.components.notesByLine(it, rows.map { r -> r.text }) }.orEmpty()
+ }
+ var noteOpen by remember(trackKey) { mutableStateOf<Int?>(null) }
+ val haptics = androidx.compose.ui.platform.LocalHapticFeedback.current
+ noteOpen?.let { n ->
+ com.music.spotui.ui.immersive.sheets.ImmersiveMeaningSheet(trackId, genTitle, genArtist, n) { noteOpen = null }
+ }
+
val activeRow by remember(rows, isSynced) {
derivedStateOf { if (!isSynced) -1 else activeRow(rows, clock.longValue) }
}
@@ -415,6 +438,13 @@ private fun LyricsList(
blurOk = blurOk,
glowing = blurOk,
clock = clock,
+ annotated = index in notes,
+ onHold = notes[index]?.let { n ->
+ {
+ haptics.performHapticFeedback(androidx.compose.ui.hapticfeedback.HapticFeedbackType.LongPress)
+ noteOpen = n
+ }
+ },
onSeek = { timeMs ->
head.announceJump()
SongPlayer.seekTo(timeMs)
@@ -427,6 +457,7 @@ private fun LyricsList(
private const val BLUR_SWITCH_MS = 200
+@OptIn(ExperimentalFoundationApi::class)
@Composable
private fun PanelRow(
index: Int,
@@ -440,6 +471,8 @@ private fun PanelRow(
blurOk: Boolean,
glowing: Boolean,
clock: MutableLongState,
+ annotated: Boolean,
+ onHold: (() -> Unit)?,
onSeek: (Long) -> Unit,
) {
if (!synced && row.isGap) {
@@ -537,7 +570,21 @@ private fun PanelRow(
}
.blur(blur, BlurredEdgeTreatment.Unbounded)
.clip(RoundedCornerShape(10.dp))
- .clickable(enabled = synced, interactionSource = interaction, indication = null) { onSeek(row.timeMs) }
+ .then(if (annotated) Modifier.drawBehind {
+ // Genius explains this line: a faint dotted line under it, quiet beside the singing.
+ val y = size.height - GLOW_ROOM.toPx() + 2.dp.toPx()
+ drawLine(
+ color = Color.White.copy(alpha = 0.22f),
+ start = Offset(GLOW_ROOM.toPx(), y), end = Offset(size.width - GLOW_ROOM.toPx(), y),
+ strokeWidth = 1.5.dp.toPx(), cap = StrokeCap.Round,
+ pathEffect = PathEffect.dashPathEffect(floatArrayOf(0.1f, 5.dp.toPx())),
+ )
+ } else Modifier)
+ .combinedClickable(
+ enabled = synced || onHold != null, interactionSource = interaction, indication = null,
+ onLongClick = onHold,
+ onClick = { if (synced) onSeek(row.timeMs) },
+ )
CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Ltr) {
Column(modifier = shape) {
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/lyrics/ImmersiveQueuePanel.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/lyrics/ImmersiveQueuePanel.kt
index c71fb3f1..57d0bbc4 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/lyrics/ImmersiveQueuePanel.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/lyrics/ImmersiveQueuePanel.kt
@@ -71,6 +71,13 @@ import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.mutableIntStateOf
+import android.os.SystemClock
+import app.myspoti.host.android.Logbook
+import androidx.compose.animation.core.animate
+import androidx.compose.runtime.rememberCoroutineScope
+import androidx.compose.ui.layout.onPlaced
+import androidx.compose.ui.layout.positionInParent
+import kotlinx.coroutines.launch
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.runtime.withFrameNanos
@@ -136,14 +143,30 @@ fun ImmersiveQueuePanel(modifier: Modifier = Modifier, contentPadding: PaddingVa
// Rows just dragged, shown in their new order until the queue reports exactly that order (or
// PENDING_ORDER_MS passes): the reports in between are of the queue before the move.
var pending by remember { mutableStateOf<QueueDragMath.Pending<QRow>?>(null) }
+ var settling by remember { mutableStateOf(false) }
+ fun endPending(p: QueueDragMath.Pending<QRow>, why: String) {
+ if (pending !== p) return
+ pending = null; settling = false
+ Logbook.log("queue order: dropped ($why)")
+ }
LaunchedEffect(queue, pending) {
val p = pending ?: return@LaunchedEffect
- if (p.over(queue.queued.map { it.uri }, queue.nextUp.map { it.uri }, queue.current?.url)) pending = null
+ val now = SystemClock.elapsedRealtime()
+ when (val v = p.report(queue.queued.map { it.uri }, queue.nextUp.map { it.uri }, queue.current?.url, now)) {
+ QueueDragMath.Verdict.Keep -> {}
+ QueueDragMath.Verdict.Matched -> { settling = true; Logbook.log("queue order: matched by the engine's report") }
+ is QueueDragMath.Verdict.Drop -> endPending(p, v.why)
+ }
}
+ // Limits by time alone: the engine may stay silent past either.
LaunchedEffect(pending) {
val p = pending ?: return@LaunchedEffect
- delay(PENDING_ORDER_MS)
- if (pending === p) pending = null
+ delay(SLOW_REPORT_MS)
+ if (pending === p && !settling) Logbook.log("queue order: no report yet after ${SLOW_REPORT_MS}ms, kept")
+ while (pending === p) {
+ delay(250)
+ p.expired(SystemClock.elapsedRealtime())?.let { endPending(p, it) }
+ }
}
val rows = shownRows(queue, pending, removed)
val queued = rows.filter { it.queued }
@@ -159,12 +182,26 @@ fun ImmersiveQueuePanel(modifier: Modifier = Modifier, contentPadding: PaddingVa
val rowsNow by rememberUpdatedState(rows)
val hover by remember { derivedStateOf { hoverOf(listState, rowsNow, drag) } }
val hoverNow by rememberUpdatedState(hover)
- val onDrop: (QRow) -> Unit = drop@{ row ->
- val (queuedNew, nextNew, call) = dropPlan(rowsNow, row, hoverNow) ?: return@drop
+ val onDrop: (QRow) -> Boolean = drop@{ row ->
+ val (queuedNew, nextNew, call) = dropPlan(rowsNow, row, hoverNow) ?: return@drop false
+ val before = pending?.detach()
pending = QueueDragMath.Pending(
- queuedNew, nextNew, queuedNew.map { it.item.uri }, nextNew.map { it.item.uri }, queue.current?.url,
+ queuedNew, nextNew,
+ rowsNow.filter { it.queued }.map { it.item.uri }, rowsNow.filter { !it.queued }.map { it.item.uri },
+ queuedNew.map { it.item.uri }, nextNew.map { it.item.uri },
+ row.item.uri, queue.current?.url, SystemClock.elapsedRealtime(), before,
)
+ settling = false
+ Logbook.log("queue order: set (${row.item.uri} to ${if (row.queued) "queue" else "next"}${if (queuedNew.any { it.key == row.key }) " -> queue" else " -> next"})")
call()
+ true
+ }
+ val offsetOf: (String) -> Int? = { k -> listState.layoutInfo.visibleItemsInfo.firstOrNull { it.key == k }?.offset }
+ // After a drop the rows are where they were drawn, so none is moved again: see [QueueDrag.settling].
+ LaunchedEffect(drag.settling) {
+ if (!drag.settling) return@LaunchedEffect
+ delay(300)
+ drag.settling = false
}
// The finger near the top or bottom edge scrolls the list, the row staying under it.
@@ -242,7 +279,7 @@ fun ImmersiveQueuePanel(modifier: Modifier = Modifier, contentPadding: PaddingVa
)
}
}
- queueSection(queued, rowsNow, removed, drag, { hoverNow }, onDrop)
+ queueSection(queued, rowsNow, removed, drag, { hoverNow }, onDrop, offsetOf)
}
if (nextUp.isNotEmpty()) {
item(key = HEADING_NEXT) {
@@ -255,7 +292,7 @@ fun ImmersiveQueuePanel(modifier: Modifier = Modifier, contentPadding: PaddingVa
modifier = Modifier.padding(top = 16.dp, bottom = 6.dp).then(queueMotion()),
)
}
- queueSection(nextUp, rowsNow, removed, drag, { hoverNow }, onDrop)
+ queueSection(nextUp, rowsNow, removed, drag, { hoverNow }, onDrop, offsetOf)
}
if (!hasCurrent && queued.isEmpty() && nextUp.isEmpty()) {
item(key = "empty") {
@@ -273,7 +310,7 @@ fun ImmersiveQueuePanel(modifier: Modifier = Modifier, contentPadding: PaddingVa
/** One queue row: [index] in the flat list (queued rows, then the context's), [key] stable across moves. */
private data class QRow(val key: String, val item: SongPlayer.QueueItem, val queued: Boolean, val index: Int)
-private const val PENDING_ORDER_MS = 3_000L
+private const val SLOW_REPORT_MS = 3_000L
/**
* The rows to draw: the order just dropped while the engine has not reported it (its reports in
@@ -282,22 +319,32 @@ private const val PENDING_ORDER_MS = 3_000L
* with a move, and a changed key makes the row vanish and reappear.
*/
private fun shownRows(queue: SongPlayer.EngineQueue, pending: QueueDragMath.Pending<QRow>?, removed: List<String>): List<QRow> {
- if (pending != null) {
- return (pending.queued + pending.next).filter { it.key !in removed }.mapIndexed { i, r -> r.copy(index = i) }
+ // The same keys whichever list is drawn, so swapping the pending order for the engine's moves nothing.
+ val all = if (pending != null) {
+ (pending.queued + pending.next).map { Triple(it.item, it.queued, 0) }
+ } else {
+ queue.queued.map { Triple(it, true, 0) } + queue.nextUp.map { Triple(it, false, 0) }
}
val seen = HashMap<String, Int>()
- fun key(item: SongPlayer.QueueItem): String {
+ return all.map { (item, queued, _) ->
val count = seen.merge(item.uri, 1, Int::plus)!!
- return if (count == 1) item.uri else "${item.uri}~$count"
- }
- val all = queue.queued.map { Triple(key(it), it, true) } + queue.nextUp.map { Triple(key(it), it, false) }
- return all.filter { it.first !in removed }.mapIndexed { i, (k, item, queued) -> QRow(k, item, queued, i) }
+ Triple(if (count == 1) item.uri else "${item.uri}~$count", item, queued)
+ }.filter { it.first !in removed }.mapIndexed { i, (k, item, queued) -> QRow(k, item, queued, i) }
}
/** The row being dragged by its handle: which one, and how far it is from its slot. */
private class QueueDrag {
var key by mutableStateOf<String?>(null)
var offset by mutableFloatStateOf(0f)
+ /**
+ * Just dropped. The rows are drawn where they were (the dragged one under the finger, the others
+ * stepped aside) and the list takes the new order in the same frame, so no row has to move: a
+ * placement animation then would take each back to its old slot and bring it forth again.
+ */
+ var settling by mutableStateOf(false)
+ /** The dropped row, and where it was drawn (list coordinates), until its new slot is laid out. */
+ var awaitKey: String? = null
+ var awaitVisual = 0f
}
/** Where the dragged row hovers: its flat index, the gap among the other rows, and which side of the context heading. */
@@ -360,7 +407,8 @@ private fun LazyListScope.queueSection(
removed: SnapshotStateList<String>,
drag: QueueDrag,
hover: () -> Hover?,
- onDrop: (QRow) -> Unit,
+ onDrop: (QRow) -> Boolean,
+ offsetOf: (String) -> Int?,
) {
items(section.size, key = { section[it].key }) { i ->
val row = section[i]
@@ -372,6 +420,13 @@ private fun LazyListScope.queueSection(
val shift = hover()?.let { h -> if (dragged) 0 else QueueDragMath.step(row.index, h.from, h.slot) } ?: 0
val dropNow by rememberUpdatedState(onDrop)
val rowNow by rememberUpdatedState(row)
+ // What is left of the drop to walk off: the row's drawn position less its slot's.
+ val settle = remember { mutableFloatStateOf(0f) }
+ val scope = rememberCoroutineScope()
+ fun settleBack(from: Float) {
+ settle.floatValue = from
+ scope.launch { animate(from, 0f, animationSpec = tween(180, easing = FastOutSlowInEasing)) { v, _ -> settle.floatValue = v } }
+ }
val dismiss = rememberSwipeToDismissBoxState(confirmValueChange = { value ->
if (value == SwipeToDismissBoxValue.EndToStart) {
removed += key
@@ -384,9 +439,17 @@ private fun LazyListScope.queueSection(
SwipeToDismissBox(
state = dismiss,
enableDismissFromStartToEnd = false,
- modifier = (if (dragged) Modifier else queueMotion())
- .zIndex(if (dragged) 1f else 0f)
- .graphicsLayer { translationY = if (dragged) drag.offset else shift * rowPx },
+ modifier = Modifier
+ .onPlaced { coords ->
+ // The dropped row's new slot is laid out: it was drawn elsewhere, and walks the difference.
+ if (drag.awaitKey == key) {
+ drag.awaitKey = null
+ settleBack(drag.awaitVisual - coords.positionInParent().y)
+ }
+ }
+ .then(if (dragged || drag.settling) Modifier else queueMotion())
+ .zIndex(if (dragged || settle.floatValue != 0f) 1f else 0f)
+ .graphicsLayer { translationY = (if (dragged) drag.offset else shift * rowPx) + settle.floatValue },
backgroundContent = {
// Drawn only while swiping: the row is transparent, so at rest this × showed
// through behind the drag handle.
@@ -425,7 +488,16 @@ private fun LazyListScope.queueSection(
onDragStart = { drag.key = key; drag.offset = 0f },
onDragEnd = {
// Worked out while the row is still where it was dropped.
- if (drag.key == key) dropNow(rowNow)
+ if (drag.key == key) {
+ val visual = offsetOf(key)?.let { it + drag.offset }
+ val dragOffset = drag.offset
+ // The new order, the drawn positions and the end of the drag are
+ // one change: no frame shows the old order or a row put back.
+ val moved = dropNow(rowNow)
+ drag.settling = true
+ if (moved && visual != null) { drag.awaitKey = key; drag.awaitVisual = visual }
+ else settleBack(dragOffset)
+ }
drag.key = null
drag.offset = 0f
},
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/lyrics/QueueDragMath.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/lyrics/QueueDragMath.kt
index 829b4750..67b6a76e 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/lyrics/QueueDragMath.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/lyrics/QueueDragMath.kt
@@ -67,20 +67,79 @@ internal object QueueDragMath {
fun held(place: Place, queueSize: Int, canLeaveQueue: Boolean, fromQueue: Boolean): Place =
if (fromQueue && !canLeaveQueue && !place.toQueue) Place(true, queueSize) else place
+ /** What the engine's latest report means for a [Pending] order. */
+ sealed interface Verdict {
+ /** Nothing to do: the pending order stays (the engine is still before / half-way through the move, or settling). */
+ data object Keep : Verdict
+ /** The engine now shows the expected order. */
+ data object Matched : Verdict
+ /** The pending order is over; the engine's is trusted from now. */
+ data class Drop(val why: String) : Verdict
+ }
+
/**
- * The order just dropped, shown until the engine reports it. [queued] / [next] are the rows,
- * [queuedUris] / [nextUris] the songs' uris in that order, [current] what played then.
+ * The order just dropped, shown until the engine can be trusted again. [queued] / [next] are the
+ * rows, the uris the same songs in order: [preQueued] / [preNext] before the move, [expQueued] /
+ * [expNext] after it. [dragged] is the moved song's uri, [current] what played then.
+ *
+ * The engine reports the move late and in steps (Spotify: the song out of one part, then
+ * queued at the end, then placed), and may repeat or reorder reports. So the order is kept:
+ * through reports of the queue as it was or half-way through this move (however long the
+ * round-trip takes, up to [MAX_MS]), through [GRACE_MS] after the expected order is reported
+ * (a late report of an older state is ignored), and ended by a report that is none of those,
+ * by another song playing, or by those limits. A drop made before the last one was reported
+ * chains to it: its reports are expected on the way.
*/
class Pending<T>(
val queued: List<T>, val next: List<T>,
- private val queuedUris: List<String>, private val nextUris: List<String>,
- private val current: String?,
+ private val preQueued: List<String>, private val preNext: List<String>,
+ private val expQueued: List<String>, private val expNext: List<String>,
+ private val dragged: String, private val current: String?, private val setAt: Long,
+ private val previous: Pending<T>? = null,
) {
- /**
- * The engine's report ends it when it shows the same order, or another song plays now. Reports
- * before that (the queue as it was, or half-way: a song out of one part, not yet in the other) do not.
- */
- fun over(reportedQueued: List<String>, reportedNext: List<String>, reportedCurrent: String?): Boolean =
- (reportedQueued == queuedUris && reportedNext == nextUris) || reportedCurrent != current
+ var matchedAt: Long? = null
+ private set
+
+ private fun isExpected(q: List<String>, n: List<String>) = q == expQueued && n == expNext
+ private fun isBefore(q: List<String>, n: List<String>) = q == preQueued && n == preNext
+
+ /** Half-way: the song is out of both parts, or queued at the end only; the rest as it ends up. */
+ private fun isHalfWay(q: List<String>, n: List<String>): Boolean {
+ if (q.filter { it != dragged } != expQueued.filter { it != dragged } ||
+ n.filter { it != dragged } != expNext.filter { it != dragged }) return false
+ val count = q.count { it == dragged } + n.count { it == dragged }
+ return count == 0 || (count == 1 && n.none { it == dragged } && q.lastOrNull() == dragged)
+ }
+
+ /** A report of the queue before this move or part-way through it (or through the drops it follows). */
+ private fun passing(q: List<String>, n: List<String>): Boolean =
+ isBefore(q, n) || isHalfWay(q, n) ||
+ previous?.let { it.isExpected(q, n) || it.passing(q, n) } == true
+
+ fun report(q: List<String>, n: List<String>, reportedCurrent: String?, now: Long): Verdict {
+ if (reportedCurrent != current) return Verdict.Drop("another song plays")
+ expired(now)?.let { return Verdict.Drop(it) }
+ val matched = matchedAt
+ return when {
+ isExpected(q, n) -> if (matched == null) { matchedAt = now; Verdict.Matched } else Verdict.Keep
+ passing(q, n) -> Verdict.Keep
+ else -> Verdict.Drop(if (matched == null) "engine shows another order" else "queue changed after the move")
+ }
+ }
+
+ /** Why the order is over by time alone, else null. */
+ fun expired(now: Long): String? = when {
+ matchedAt?.let { now - it >= GRACE_MS } == true -> "settled"
+ now - setAt >= MAX_MS -> "no final report in ${MAX_MS / 1000}s"
+ else -> null
+ }
+
+ /** Chains are not needed once this one is reported: [previous] is let go. */
+ fun detach(): Pending<T> = Pending(queued, next, preQueued, preNext, expQueued, expNext, dragged, current, setAt, null)
}
+
+ /** After the expected order is reported, reports of older states are ignored this long. */
+ const val GRACE_MS = 1_500L
+ /** The longest the engine is waited for. */
+ const val MAX_MS = 10_000L
}
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/pages/ImmersiveSettingsScreen.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/pages/ImmersiveSettingsScreen.kt
index 17e79d26..6b671935 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/pages/ImmersiveSettingsScreen.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/pages/ImmersiveSettingsScreen.kt
@@ -27,6 +27,7 @@ import androidx.compose.material.icons.rounded.Palette
import androidx.compose.material.icons.rounded.PlayArrow
import androidx.compose.material.icons.rounded.SignalCellularAlt
import androidx.compose.material.icons.rounded.Info
+import androidx.compose.material.icons.rounded.Refresh
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
@@ -119,7 +120,7 @@ fun ImmersiveSettingsScreen(navController: NavController) {
) { p ->
when (p) {
SettingsPage.Root -> SettingsRoot(navController, open, back)
- SettingsPage.Playback -> PlaybackPage(open, back)
+ SettingsPage.Playback -> PlaybackPage(navController, open, back)
SettingsPage.StreamingWifi -> StreamingPage(cellular = false, back)
SettingsPage.StreamingCell -> StreamingPage(cellular = true, back)
SettingsPage.Crossfade -> CrossfadePage(back)
@@ -174,13 +175,32 @@ private fun SettingsRoot(navController: NavController, open: (SettingsPage) -> U
// ---------------------------------------------------------------- Playback
+private val ImmersiveSourceLook = com.music.spotui.ui.screens.SourceLook(
+ Immersive.Text, Immersive.TextSecondary, Immersive.Accent, Immersive.BodyStrong, Immersive.Caption)
+
+/** The order a source action asks extensions in, as a card ([com.music.spotui.ui.screens.SourceOrderList]); nothing without any such extension. */
+private fun androidx.compose.foundation.lazy.LazyListScope.sourcesGroup(action: app.myspoti.extensions.Action, navController: NavController) {
+ if (com.music.spotui.extensions.Extensions.sources(action).isEmpty()) return
+ val audio = action == app.myspoti.extensions.Action.AUDIO_SOURCE
+ immersiveGroup("sources:${action.key}",
+ headerRes = if (audio) R.string.sources_audio_title else R.string.sources_download_title,
+ footerRes = if (audio) R.string.sources_audio_footer else R.string.sources_download_footer) {
+ row {
+ com.music.spotui.ui.screens.SourceOrderList(action, spotifyLast = audio, look = ImmersiveSourceLook,
+ onOpen = { navController.navigate(com.music.spotui.ui.screens.installedRoute(it)) },
+ rowPadding = Modifier.padding(horizontal = 16.dp, vertical = 8.dp))
+ }
+ }
+}
+
@Composable
-private fun PlaybackPage(open: (SettingsPage) -> Unit, back: () -> Unit) {
+private fun PlaybackPage(navController: NavController, open: (SettingsPage) -> Unit, back: () -> Unit) {
val ctx = LocalContext.current
val wifi = getStreamingQuality(ctx, false)
val cell = getStreamingQuality(ctx, true)
val label = { q: StreamingQuality -> StreamingChoices.first { it.first == q }.second }
var canvasWifiOnly by remember { mutableStateOf(com.music.spotui.data.preferences.isCanvasWifiOnly(ctx)) }
+ var headsetSkip by remember { mutableStateOf(app.myspoti.host.android.PlaybackService.skipsOnEpisodes(ctx)) }
var keepPlaying by remember { mutableStateOf(app.myspoti.host.android.PlaybackService.keepsPlayingOnClose(ctx)) }
var wordSync by remember { mutableStateOf(com.music.spotui.data.preferences.isLyricsWordSync(ctx)) }
val crossfade = com.music.spotui.data.preferences.CrossfadePref.seconds
@@ -212,7 +232,15 @@ private fun PlaybackPage(open: (SettingsPage) -> Unit, back: () -> Unit) {
detail = stringResource(R.string.settings_keep_playing_detail),
)
}
+ row {
+ ImmersiveSwitchRow(
+ stringResource(R.string.settings_headset_skip_title), checked = headsetSkip,
+ onChecked = { headsetSkip = it; app.myspoti.host.android.PlaybackService.setSkipsOnEpisodes(ctx, it) },
+ detail = stringResource(R.string.settings_headset_skip_detail),
+ )
+ }
}
+ sourcesGroup(app.myspoti.extensions.Action.AUDIO_SOURCE, navController)
immersiveGroup("visuals") {
row {
ImmersiveSwitchRow(
@@ -291,8 +319,9 @@ private fun DownloadsPage(navController: NavController, open: (SettingsPage) ->
onClick = { open(SettingsPage.DownloadQuality) })
}
}
- // Where downloads come from: a download-source extension.
- immersiveGroup("source") {
+ // Where downloads come from: the download-source extensions, in the order they are asked.
+ sourcesGroup(app.myspoti.extensions.Action.DOWNLOAD_SOURCE, navController)
+ if (com.music.spotui.extensions.Extensions.sources(app.myspoti.extensions.Action.DOWNLOAD_SOURCE).isEmpty()) immersiveGroup("source") {
row {
ImmersiveGroupRow(
stringResource(R.string.downloads_source_row_title),
@@ -566,7 +595,7 @@ private fun LanguagePage(back: () -> Unit) {
private fun AppPage(navController: NavController, back: () -> Unit) {
val ctx = LocalContext.current
val scope = rememberCoroutineScope()
- var checking by remember { mutableStateOf(false) }
+ val check = com.music.spotui.data.api.rememberUpdateCheckState(ctx)
ImmersivePage(title = stringResource(R.string.settings_section_app), onBack = back) {
immersiveGroup("updates") {
row {
@@ -574,20 +603,21 @@ private fun AppPage(navController: NavController, back: () -> Unit) {
onChecked = { com.music.spotui.data.preferences.AutoUpdateCheckPref.set(ctx, it) }, detail = stringResource(R.string.settings_auto_update_detail))
}
row {
+ val known = com.music.spotui.updateRelease.value ?: remember { com.music.spotui.data.api.UpdateChecker.known(ctx) }
+ val detail = buildString {
+ if (known != null) appendLine(ctx.getString(R.string.settings_update_available, known.version))
+ check.message?.takeIf { known == null || check.isError }?.let { appendLine(it) }
+ append(check.lastCheckedText)
+ }
ImmersiveGroupRow(
- stringResource(if (checking) R.string.settings_update_checking else R.string.settings_check_update_title),
- detail = stringResource(R.string.settings_check_update_detail),
- enabled = !checking,
- onClick = {
- if (!checking) {
- checking = true
- scope.launch {
- val found = runCatching { com.music.spotui.data.api.UpdateChecker.check(ctx, manual = true) }.getOrNull()
- checking = false
- // The card is the app's one update UI: fill it, it shows itself.
- if (found != null) com.music.spotui.updateRelease.value = found
- else android.widget.Toast.makeText(ctx, ctx.getString(R.string.settings_update_check_latest), android.widget.Toast.LENGTH_SHORT).show()
- }
+ stringResource(R.string.settings_about_version, app.myspoti.engine.BuildConfig.VERSION_NAME),
+ detail = detail,
+ detailColor = if (check.isError) ImmersiveDestructive else Immersive.TextSecondary,
+ onClick = if (known != null) ({ com.music.spotui.updateRelease.value = known }) else null,
+ trailing = {
+ if (check.checking) androidx.compose.material3.CircularProgressIndicator(Modifier.size(22.dp), strokeWidth = 2.dp, color = Immersive.Accent)
+ else androidx.compose.material3.IconButton(onClick = { scope.launch { check.run() } }) {
+ androidx.compose.material3.Icon(Icons.Rounded.Refresh, stringResource(R.string.settings_update_refresh), tint = Immersive.Accent)
}
},
)
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/player/ImmersivePlayer.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/player/ImmersivePlayer.kt
index d795351f..b6d678a8 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/player/ImmersivePlayer.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/player/ImmersivePlayer.kt
@@ -451,6 +451,7 @@ fun ImmersivePlayer(
)
// Buttons from extensions (player.buttons), under the player's own controls.
val extTrack = remember(state.title, state.artist) { com.music.spotui.extensions.Extensions.currentTrack() }
+ com.music.spotui.extensions.MirrorIndicator()
com.music.spotui.extensions.ExtensionPlayerButtons(extTrack)
Spacer(Modifier.height(18.dp))
}
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/screens/ImmersiveArtistScreen.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/screens/ImmersiveArtistScreen.kt
index 518c41fb..150e0256 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/screens/ImmersiveArtistScreen.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/screens/ImmersiveArtistScreen.kt
@@ -166,7 +166,7 @@ private fun ArtistLoading(navController: NavController, artistName: String, artH
state = listState,
userScrollEnabled = false,
contentPadding = PaddingValues(bottom = Immersive.BottomChrome),
- modifier = Modifier.fillMaxSize(),
+ modifier = Modifier.fillMaxSize().immersiveHazeSource(),
) {
item(key = "header") { ArtistNameHeader(name = artistName, artHeight = artHeight) }
immersiveDetailSkeleton(isArtist = true)
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/screens/ImmersiveContextScreen.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/screens/ImmersiveContextScreen.kt
index fd360efe..f4461cad 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/screens/ImmersiveContextScreen.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/screens/ImmersiveContextScreen.kt
@@ -197,7 +197,7 @@ private fun ContextLoading(navController: NavController, sleeve: Dp) {
state = listState,
userScrollEnabled = false,
contentPadding = PaddingValues(top = immersiveTopContentPadding(), bottom = Immersive.BottomChrome),
- modifier = Modifier.fillMaxSize(),
+ modifier = Modifier.fillMaxSize().immersiveHazeSource(),
) {
item(key = "skeleton:context:header") {
Column(Modifier.fillMaxWidth().padding(bottom = 18.dp), horizontalAlignment = Alignment.CenterHorizontally) {
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/screens/ImmersiveHomeScreen.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/screens/ImmersiveHomeScreen.kt
index 8eb3108a..a43b47ac 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/screens/ImmersiveHomeScreen.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/screens/ImmersiveHomeScreen.kt
@@ -67,6 +67,7 @@ import com.music.spotui.ui.immersive.shell.ImmersiveFloatingHeader
import com.music.spotui.ui.immersive.shell.LocalBarControlSize
import com.music.spotui.ui.immersive.shell.immersiveChromeScroll
import com.music.spotui.ui.immersive.shell.immersiveHeaderContentPadding
+import com.music.spotui.ui.immersive.shell.rememberTopBarCollapse
import com.music.spotui.ui.navigation.TabReselect
import com.music.spotui.ui.navigation.albumRoute
import com.music.spotui.ui.navigation.artistRoute
@@ -183,7 +184,7 @@ fun ImmersiveHomeScreen(navController: NavController) {
}
}
// The greeting and the profile disc on floating glass; the feed scrolls under it.
- ImmersiveFloatingHeader(title) {
+ ImmersiveFloatingHeader(title, collapse = rememberTopBarCollapse(listState, 24.dp)) {
val size = LocalBarControlSize.current
Box(
Modifier.size(size).graphicsLayer { scaleX = size / 44.dp; scaleY = scaleX },
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/sheets/ImmersiveMeaningSheet.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/sheets/ImmersiveMeaningSheet.kt
new file mode 100644
index 00000000..8880c290
--- /dev/null
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/sheets/ImmersiveMeaningSheet.kt
@@ -0,0 +1,162 @@
+package com.music.spotui.ui.immersive.sheets
+
+import android.content.Intent
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.heightIn
+import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.navigationBarsPadding
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.rememberScrollState
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.foundation.verticalScroll
+import androidx.compose.material3.CircularProgressIndicator
+import androidx.compose.material3.ExperimentalMaterial3Api
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.produceState
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.platform.LocalConfiguration
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.res.stringResource
+import androidx.compose.ui.text.AnnotatedString
+import androidx.compose.ui.text.LinkAnnotation
+import androidx.compose.ui.text.SpanStyle
+import androidx.compose.ui.text.TextLinkStyles
+import androidx.compose.ui.text.buildAnnotatedString
+import androidx.compose.ui.text.style.TextDecoration
+import androidx.compose.ui.text.withLink
+import androidx.compose.ui.unit.dp
+import app.myspoti.engine.R
+import com.music.spotui.data.api.GeniusMeaning
+import com.music.spotui.ui.components.readerLanguage
+import com.music.spotui.ui.components.rememberShown
+import com.music.spotui.ui.components.showOriginal
+import com.music.spotui.ui.immersive.Immersive
+import com.music.spotui.ui.immersive.components.immersiveClickable
+
+/** What the sheet has to show: still being read, nothing on Genius, Genius out of reach, or the meaning. */
+private sealed interface MeaningLoad {
+ data object Loading : MeaningLoad
+ data object None : MeaningLoad
+ data object Failed : MeaningLoad
+ class Ready(val meaning: GeniusMeaning.Meaning) : MeaningLoad
+}
+
+/**
+ * Genius's words on the Immersive glass sheet, from the same [GeniusMeaning] the Classic look
+ * reads (nothing new on the network: the look-up begun when the song started, or the cached one).
+ * [noteIndex] set: the explanation of one lyric line; null: the song as a whole ("About").
+ * The text is read off the main thread and keyed on [trackId].
+ */
+@OptIn(ExperimentalMaterial3Api::class)
+@Composable
+fun ImmersiveMeaningSheet(
+ trackId: String,
+ title: String,
+ artist: String,
+ noteIndex: Int?,
+ onDismiss: () -> Unit,
+) {
+ val load by produceState<MeaningLoad>(MeaningLoad.Loading, trackId, title, artist) {
+ val ready = GeniusMeaning.current.value?.takeIf { it.first == trackId }?.second
+ ?: GeniusMeaning.cached(title, artist)
+ value = if (ready != null) MeaningLoad.Ready(ready) else try {
+ // find() runs on IO and keeps its own small cache; it throws when Genius can't be reached.
+ GeniusMeaning.find(title, artist)?.let { MeaningLoad.Ready(it) } ?: MeaningLoad.None
+ } catch (e: kotlinx.coroutines.CancellationException) {
+ throw e
+ } catch (e: Exception) {
+ MeaningLoad.Failed
+ }
+ }
+ ImmersiveGlassSheet(onDismiss = onDismiss) {
+ val maxH = LocalConfiguration.current.screenHeightDp.dp * 0.7f
+ Column(Modifier.fillMaxWidth().heightIn(max = maxH).verticalScroll(rememberScrollState()).navigationBarsPadding()) {
+ when (val l = load) {
+ MeaningLoad.Loading -> {
+ ImmersiveSheetTitle(stringResource(R.string.lyrics_meaning_title), subtitle = "$title · $artist")
+ Row(Modifier.fillMaxWidth().padding(vertical = 28.dp), horizontalArrangement = Arrangement.Center) {
+ CircularProgressIndicator(color = Immersive.TextSecondary, strokeWidth = 2.dp, modifier = Modifier.height(24.dp))
+ }
+ }
+ MeaningLoad.None -> {
+ ImmersiveSheetTitle(stringResource(R.string.lyrics_meaning_title), subtitle = "$title · $artist")
+ ImmersiveSheetNote(stringResource(R.string.immersive_genius_none))
+ }
+ MeaningLoad.Failed -> {
+ ImmersiveSheetTitle(stringResource(R.string.lyrics_meaning_title), subtitle = "$title · $artist")
+ ImmersiveSheetNote(stringResource(R.string.immersive_genius_error))
+ }
+ is MeaningLoad.Ready -> MeaningBody(l.meaning, noteIndex)
+ }
+ Spacer(Modifier.height(16.dp))
+ }
+ }
+}
+
+@Composable
+private fun MeaningBody(original: GeniusMeaning.Meaning, noteIndex: Int?) {
+ val note = noteIndex?.let { original.notes.getOrNull(it) }
+ val shown = rememberShown(original, listOfNotNull(if (note != null) note.explanation else original.about))
+ val m = shown.meaning
+ val shownNote = noteIndex?.let { m.notes.getOrNull(it) }
+ val context = LocalContext.current
+ if (shownNote != null) {
+ ImmersiveSheetTitle(shownNote.fragment, subtitle = "${m.title} · ${m.artist}")
+ ImmersiveSheetDivider()
+ LinkedText(shownNote.explanation)
+ } else {
+ ImmersiveSheetTitle(stringResource(R.string.lyrics_meaning_about), subtitle = "${m.title} · ${m.artist}")
+ ImmersiveSheetDivider()
+ if (!m.about.isNullOrBlank()) LinkedText(m.about!!)
+ else ImmersiveSheetNote(stringResource(R.string.immersive_genius_none))
+ }
+ Row(Modifier.fillMaxWidth().padding(horizontal = 22.dp, vertical = 6.dp), verticalAlignment = Alignment.CenterVertically) {
+ when {
+ shown.translating -> Text(stringResource(R.string.lyrics_meaning_translating), style = Immersive.Subhead)
+ shown.canTranslate -> Text(
+ stringResource(if (showOriginal.value) R.string.lyrics_meaning_translate else R.string.lyrics_meaning_original),
+ style = Immersive.Subhead.copy(color = Immersive.Text),
+ modifier = Modifier.clip(RoundedCornerShape(50))
+ .immersiveClickable(onClick = { showOriginal.value = !showOriginal.value })
+ .padding(horizontal = 12.dp, vertical = 6.dp),
+ )
+ }
+ Spacer(Modifier.weight(1f))
+ if (m.url.isNotBlank()) Text(
+ stringResource(R.string.immersive_genius_view),
+ style = Immersive.BodyStrong.copy(color = LocalImmersiveSheetTint.current.accent),
+ modifier = Modifier.clip(RoundedCornerShape(50))
+ .immersiveClickable(onClick = {
+ runCatching { context.startActivity(Intent(Intent.ACTION_VIEW, android.net.Uri.parse(m.url)).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) }
+ })
+ .padding(horizontal = 12.dp, vertical = 8.dp),
+ )
+ }
+}
+
+private val urlRegex = Regex("""https?://[^\s<>"')]+""")
+
+/** The annotation as body text; the web addresses in it open when tapped. */
+@Composable
+private fun LinkedText(text: String) {
+ val accent = LocalImmersiveSheetTint.current.accent
+ val styled: AnnotatedString = buildAnnotatedString {
+ var last = 0
+ for (hit in urlRegex.findAll(text)) {
+ append(text.substring(last, hit.range.first))
+ val url = hit.value.trimEnd('.', ',', ';', ':', '!', '?')
+ withLink(LinkAnnotation.Url(url, TextLinkStyles(SpanStyle(color = accent, textDecoration = TextDecoration.Underline)))) { append(url) }
+ last = hit.range.first + url.length
+ }
+ append(text.substring(last))
+ }
+ Text(styled, style = Immersive.Body.copy(color = Immersive.Text), modifier = Modifier.padding(horizontal = 22.dp, vertical = 14.dp))
+}
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/sheets/ImmersiveSongOptionsSheet.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/sheets/ImmersiveSongOptionsSheet.kt
index 20b8f488..d706fd8d 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/sheets/ImmersiveSongOptionsSheet.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/sheets/ImmersiveSongOptionsSheet.kt
@@ -21,6 +21,7 @@ import androidx.compose.material.icons.rounded.Bookmark
import androidx.compose.material.icons.rounded.Check
import androidx.compose.material.icons.rounded.DeleteOutline
import androidx.compose.material.icons.rounded.Info
+import androidx.compose.material.icons.rounded.Lightbulb
import androidx.compose.material.icons.rounded.Person
import androidx.compose.material.icons.rounded.Radio
import androidx.compose.material.icons.rounded.Share
@@ -78,7 +79,12 @@ fun ImmersiveSongOptionsSheet(
var showSleep by remember { mutableStateOf(false) }
var showCredits by remember { mutableStateOf(false) }
var showSpeed by remember { mutableStateOf(false) }
+ var showMeaning by remember { mutableStateOf(false) }
if (showCredits) { CreditsSheet(song = song, onDismiss = { showCredits = false; onDismiss() }); return }
+ if (showMeaning) {
+ ImmersiveMeaningSheet(song.spotifyTrackId, song.title, song.singer, null) { showMeaning = false; onDismiss() }
+ return
+ }
if (showSpeed) { SpeedSheet(onDismiss = { showSpeed = false; onDismiss() }); return }
if (showSavedIn) { SavedInSheet(song = song, context = context, onDismiss = { showSavedIn = false; onDismiss() }); return }
if (showAddTo) {
@@ -185,6 +191,9 @@ fun ImmersiveSongOptionsSheet(
playerViewModel.goToArtist(song.spotifyTrackId, song.singer) { route -> navController.navigate(route) }
}
ImmersiveSheetRow(Icons.Rounded.Info, stringResource(R.string.track_credits), enabled = hasId) { showCredits = true }
+ if (nowPlaying && hasId && !song.url.startsWith("episode:")) {
+ ImmersiveSheetRow(Icons.Rounded.Lightbulb, stringResource(R.string.lyrics_meaning_title)) { showMeaning = true }
+ }
val trackUri = "spotify:track:${song.spotifyTrackId}"
val excluded by produceState<Boolean?>(null, trackUri) {
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/shell/FloatingTabBar.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/shell/FloatingTabBar.kt
index aaa527c2..4cf6a45c 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/shell/FloatingTabBar.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/shell/FloatingTabBar.kt
@@ -302,7 +302,9 @@ private fun ExpandedTabs(
Box(
modifier = Modifier
.background(colors.backgroundColor, shapes.tabBarShape)
- .clip(shapes.tabBarShape)
+ // No clip() ahead of the glass: it clips itself (as the mini player's does), and a
+ // clipping layer around the glass's own offscreen effect layer is what differs
+ // from the surface that renders correctly.
.then(tabBarContentModifier())
.padding(contentPadding),
) {
@@ -443,7 +445,6 @@ private fun ExpandedStandaloneTab(
isStandalone = true,
modifier = modifier
.background(colors.backgroundColor, shapes.standaloneTabShape)
- .clip(shapes.standaloneTabShape)
.then(tabBarContentModifier())
.clickable(
onClick = standaloneTab.onClick,
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/shell/ImmersiveChrome.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/shell/ImmersiveChrome.kt
index 2117e4a1..d9cbb7cd 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/shell/ImmersiveChrome.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/shell/ImmersiveChrome.kt
@@ -213,7 +213,13 @@ fun ImmersiveBottomChrome(
val miniHeight = mini?.height ?: 0
val height = max(max(tabHeight, pillPx), if (miniHeight > 0) tabHeight + gapPx + miniHeight else 0)
layout(width, height) {
- tab?.placeWithLayer(insetPx, height - tab.height) {
+ // At rest the bar is placed plainly, like the mini player: a glass inside a placement
+ // layer (even an identity one) is not sampled correctly. Only while it folds does it
+ // get the layer for its alpha and scale.
+ if (tab != null && p == 0f) {
+ tab.place(insetPx, height - tab.height)
+ } else {
+ tab?.placeWithLayer(insetPx, height - tab.height) {
val q = progress.value.coerceIn(0f, 1f)
alpha = 1f - q
// Shrinks into the pill's corner.
@@ -221,6 +227,7 @@ fun ImmersiveBottomChrome(
scaleX = lerp(1f, pillPx / tab.width.coerceAtLeast(1).toFloat(), q)
scaleY = lerp(1f, pillPx / tab.height.coerceAtLeast(1).toFloat(), q)
}
+ }
pill?.placeWithLayer(insetPx, height - pill.height) {
val q = progress.value.coerceIn(0f, 1f)
alpha = q
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/shell/ImmersiveGlass.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/shell/ImmersiveGlass.kt
index 4b99cae5..60a21276 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/shell/ImmersiveGlass.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/shell/ImmersiveGlass.kt
@@ -266,22 +266,60 @@ internal class PageBackdrop(private val page: LayerBackdrop) : Backdrop {
) {
val source = page.layerCoordinates
val attached = coordinates != null && source != null && source.isAttached && coordinates.isAttached &&
- !source.isAncestorOf(coordinates)
+ !page.isInsideSource(coordinates)
val sameWindow = attached && source!!.findRoot() === coordinates!!.findRoot()
- // Another window (the sheet's dialog): the recorded layer is drawn at the surface's
+ // Another window (the sheet's dialog): each recorded layer is drawn at the surface's
// position on the screen, which is what both windows share.
val usable = attached && (sameWindow || Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
+ report(usable, source, coordinates, attached, sameWindow, page)
drawRect(if (usable) Immersive.Page else Immersive.GlassFill, topLeft = FAR_TOP_LEFT, size = FAR_SIZE)
if (!usable) return
if (sameWindow) {
with(page) { drawBackdrop(density, coordinates, layerBlock) }
} else {
- val offset = coordinates!!.positionOnScreen() - source!!.positionOnScreen()
- withTransform({ translate(-offset.x, -offset.y) }) { drawLayer(page.graphicsLayer) }
+ val surface = coordinates!!.positionOnScreen()
+ with(page) { drawSources { src -> surface - src.positionOnScreen() } }
}
}
+ /**
+ * One Logbook line per change of state (at most a handful per run): whether the shared page
+ * recording is attached and non-empty, which a diagnostic report then proves or disproves.
+ */
+ private fun report(
+ usable: Boolean,
+ source: LayoutCoordinates?,
+ coordinates: LayoutCoordinates?,
+ attached: Boolean,
+ sameWindow: Boolean,
+ page: LayerBackdrop,
+ ) {
+ val recorded = page.recordedSize()
+ val line = buildString {
+ append("glass: ")
+ append(if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) "LENS" else "LIVE_BLUR")
+ if (recorded.width > 0 && recorded.height > 0) append(" backdrop recorded ${recorded.width}x${recorded.height}")
+ else append(" backdrop empty (0x0)")
+ append(if (usable) ", sampled" else ", NOT sampled")
+ if (coordinates != null && coordinates.isAttached) append(" for a ${coordinates.size.width}x${coordinates.size.height} surface")
+ if (!usable) {
+ append(" [page coordinates ").append(if (source == null) "null" else if (source.isAttached) "attached" else "detached")
+ append(", surface ").append(if (coordinates == null) "null" else if (coordinates.isAttached) "attached" else "detached")
+ append(", same window ").append(sameWindow)
+ append(", surface inside page ").append(attached.not() && coordinates != null && page.isInsideSource(coordinates))
+ append("]")
+ }
+ }
+ if (line == lastReport || reports >= 14) return
+ lastReport = line
+ reports++
+ app.myspoti.host.android.Logbook.log(line)
+ }
+
private companion object {
+ @Volatile var lastReport: String? = null
+ @Volatile var reports = 0
+
// Past every edge, whatever the scale and padding of the recording.
val FAR_TOP_LEFT = Offset(-20_000f, -20_000f)
val FAR_SIZE = Size(40_000f, 40_000f)
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/shell/ImmersiveTopBar.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/shell/ImmersiveTopBar.kt
index 1756dda2..90335eba 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/shell/ImmersiveTopBar.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/shell/ImmersiveTopBar.kt
@@ -44,6 +44,7 @@ import com.music.spotui.ui.look.rememberReduceMotion
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
+import androidx.compose.ui.layout.layout
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.graphics.vector.ImageVector
@@ -152,30 +153,8 @@ fun ImmersiveTopBar(
val page = LocalImmersiveBackdrop.current
val controlSize = rememberBarControlSize()
Box(modifier = modifier.fillMaxWidth()) {
- // The frosted strip and its hairline, fading in with the collapse. Behind everything else.
- Box(
- modifier = Modifier
- .matchParentSize()
- .graphicsLayer { alpha = collapse() }
- .then(
- when {
- // Liquid Glass: the same blur, from the page the glass records (no lens on a strip).
- page != null && hazeState != null && hazeState === LocalImmersiveHaze.current ->
- Modifier.immersiveLiquidGlass(RectangleShape, page, tint = Immersive.Page.copy(alpha = 0.55f), lens = false, rim = false)
- hazeState != null -> Modifier.immersiveFrost(hazeState, tint = Immersive.Page.copy(alpha = 0.55f))
- else -> Modifier.background(Immersive.Page.copy(alpha = 0.94f))
- },
- ),
- )
- Box(
- modifier = Modifier
- .align(Alignment.BottomCenter)
- .fillMaxWidth()
- .height(0.5.dp)
- .graphicsLayer { alpha = collapse() }
- .background(Immersive.Separator),
- )
-
+ // The glass panel hanging from the top (rounded bottom corners), fading in with the collapse.
+ ImmersiveTopGlass(collapse, Modifier.matchParentSize(), hazeState)
Box(
modifier = Modifier
.fillMaxWidth()
@@ -375,8 +354,48 @@ fun LazyListScope.immersiveLargeTitle(
/** The row of [ImmersiveFloatingHeader] under the status bar. */
val ImmersiveHeaderContentHeight = 56.dp
-/** The rounded bottom corners of [ImmersiveFloatingHeader]. */
-private val HeaderCorner = 26.dp
+/** The rounded bottom corners of the top glass panel (the Immersive sheet radius). */
+private val HeaderCorner = 28.dp
+
+/** How far the glass panel extends above the screen, so only its bottom curve and rim are seen. */
+private val HeaderOverscan = 32.dp
+
+private val HeaderShape = RoundedCornerShape(bottomStart = HeaderCorner, bottomEnd = HeaderCorner)
+
+/**
+ * The glass panel of the top bar and the floating header: Liquid Glass (lens, live blur of the page
+ * scrolling under it, rim, tint) or the frost on Android < 13 / with the switch off, in a shape
+ * with rounded bottom corners and a square top. The panel is laid out [HeaderOverscan] taller than
+ * its slot and shifted above the screen, so its top edge, rim and top corners are never visible
+ * and the lens bends along the bottom curve only. It is a sibling of the page (never inside the
+ * recorded node), so it cannot sample itself. [visible] (0..1, read in the draw phase) fades it in
+ * as content scrolls under; with "reduce motion" it snaps instead.
+ */
+@Composable
+internal fun ImmersiveTopGlass(visible: () -> Float, modifier: Modifier, hazeState: HazeState?) {
+ val page = LocalImmersiveBackdrop.current
+ val reduce = rememberReduceMotion()
+ val overscan = with(LocalDensity.current) { HeaderOverscan.roundToPx() }
+ val shape = remember(overscan) { HeaderShape }
+ val glass = when {
+ page != null && hazeState != null && hazeState === LocalImmersiveHaze.current ->
+ Modifier.immersiveLiquidGlass(shape, page)
+ hazeState != null -> Modifier.clip(shape).immersiveFrost(hazeState, tint = Immersive.Page.copy(alpha = 0.55f))
+ else -> Modifier.background(Immersive.Page.copy(alpha = 0.94f), shape)
+ }
+ Box(
+ modifier
+ .layout { measurable, c ->
+ val p = measurable.measure(androidx.compose.ui.unit.Constraints.fixed(c.maxWidth, c.maxHeight + overscan))
+ layout(c.maxWidth, c.maxHeight) { p.place(0, -overscan) }
+ }
+ .graphicsLayer {
+ val v = visible()
+ alpha = if (reduce) (if (v > 0.02f) 1f else 0f) else v
+ }
+ .then(glass),
+ )
+}
/**
* Where a page under [ImmersiveFloatingHeader] should start: just under the glass, with the gap
@@ -407,11 +426,12 @@ fun ImmersiveFloatingHeader(
title: String,
modifier: Modifier = Modifier,
hazeState: HazeState? = LocalImmersiveHaze.current,
+ collapse: () -> Float = { 1f },
trailing: (@Composable RowScope.() -> Unit)? = null,
) {
val controlSize = rememberBarControlSize()
- val shape = remember { RoundedCornerShape(bottomStart = HeaderCorner, bottomEnd = HeaderCorner) }
- Box(modifier.fillMaxWidth().immersiveGlassSurface(shape, hazeState)) {
+ Box(modifier.fillMaxWidth()) {
+ ImmersiveTopGlass(collapse, Modifier.matchParentSize(), hazeState)
Row(
modifier = Modifier
.fillMaxWidth()
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/shell/backdrop/backdrops/LayerBackdrop.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/shell/backdrop/backdrops/LayerBackdrop.kt
index 8d0510e6..0a6a4f0e 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/shell/backdrop/backdrops/LayerBackdrop.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/shell/backdrop/backdrops/LayerBackdrop.kt
@@ -18,6 +18,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
+import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.GraphicsLayerScope
import androidx.compose.ui.graphics.drawscope.ContentDrawScope
import androidx.compose.ui.graphics.drawscope.DrawScope
@@ -53,29 +54,78 @@ class LayerBackdrop internal constructor(
internal var layerCoordinates: LayoutCoordinates? by mutableStateOf(null)
+ /**
+ * The nodes recording into this backdrop, oldest first. During a page transition two pages
+ * record at once; the newest one (the page arriving) owns [layerCoordinates], so the one
+ * leaving can neither overwrite it with its own position nor blank it when it detaches.
+ */
+ internal class Source {
+ var coordinates: LayoutCoordinates? = null
+ /** This source's own recording: every page keeps its own, so two pages in a transition are both sampled. */
+ var layer: GraphicsLayer? = null
+ }
+ internal val sources = ArrayList<Source>()
+
+ internal fun publish(source: Source) {
+ if (sources.lastOrNull() === source) layerCoordinates = source.coordinates
+ }
+
+ internal fun retire(source: Source) {
+ sources.remove(source)
+ layerCoordinates = sources.lastOrNull()?.coordinates
+ }
+
private var inverseLayerScope: InverseLayerScope? = null
+ /** Size of the largest recording (0x0 when no page has recorded yet). */
+ internal fun recordedSize(): androidx.compose.ui.unit.IntSize =
+ sources.mapNotNull { it.layer?.size }.maxByOrNull { it.width.toLong() * it.height } ?: androidx.compose.ui.unit.IntSize.Zero
+
+ /** Whether [c] sits inside one of the recorded pages (it would then draw itself into itself). */
+ internal fun isInsideSource(c: LayoutCoordinates): Boolean = sources.any { s ->
+ var n: LayoutCoordinates? = c
+ var inside = false
+ while (n != null) { if (n === s.coordinates) { inside = true; break }; n = n.parentCoordinates }
+ inside
+ }
+
+ /**
+ * Draws every attached page's recording, oldest first, each at its page's current position
+ * ([offsetOf] maps the page's coordinates to the offset of the surface inside it). During a
+ * transition both pages are drawn where they are this frame, so the glass sees what is on screen.
+ */
+ internal fun DrawScope.drawSources(offsetOf: (LayoutCoordinates) -> Offset) {
+ for (s in sources.toList()) {
+ val c = s.coordinates ?: continue
+ val layer = s.layer ?: continue
+ if (layer.isReleased) {
+ app.myspoti.host.android.Logbook.log("glass: backdrop source sampled after release, skipped")
+ continue
+ }
+ if (!c.isAttached || layer.size.width <= 0) continue
+ val o = offsetOf(c)
+ withTransform({ translate(-o.x, -o.y) }) { drawLayer(layer) }
+ }
+ }
+
override fun DrawScope.drawBackdrop(
density: Density,
coordinates: LayoutCoordinates?,
layerBlock: (GraphicsLayerScope.() -> Unit)?
) {
val coordinates = coordinates ?: return
- val layerCoordinates = layerCoordinates ?: return
withTransform({
if (layerBlock != null) {
with(obtainInverseLayerScope()) { inverseTransform(density, layerBlock) }
}
- val offset =
+ }) {
+ drawSources { src ->
try {
- layerCoordinates.localPositionOf(coordinates)
+ src.localPositionOf(coordinates)
} catch (_: Exception) {
- // TODO: outer transformations lead to wrong position calculation
- coordinates.positionInWindow() - layerCoordinates.positionInWindow()
+ coordinates.positionInWindow() - src.positionInWindow()
}
- translate(-offset.x, -offset.y)
- }) {
- drawLayer(graphicsLayer)
+ }
}
}
diff --git a/base/app/src/main/java/com/music/spotui/ui/immersive/shell/backdrop/backdrops/LayerBackdropModifier.kt b/base/app/src/main/java/com/music/spotui/ui/immersive/shell/backdrop/backdrops/LayerBackdropModifier.kt
index bc2edd93..b65d81ea 100644
--- a/base/app/src/main/java/com/music/spotui/ui/immersive/shell/backdrop/backdrops/LayerBackdropModifier.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/immersive/shell/backdrop/backdrops/LayerBackdropModifier.kt
@@ -20,6 +20,7 @@ import androidx.compose.ui.node.DrawModifierNode
import androidx.compose.ui.node.GlobalPositionAwareModifierNode
import androidx.compose.ui.node.ModifierNodeElement
import androidx.compose.ui.node.invalidateDraw
+import androidx.compose.ui.node.requireGraphicsContext
import androidx.compose.ui.platform.InspectorInfo
import com.music.spotui.ui.immersive.shell.backdrop.internal.recordLayer
@@ -86,23 +87,43 @@ private class LayerBackdropNode(
drawContent()
return
}
- recordLayer(this@LayerBackdropNode, backdrop.graphicsLayer) { backdrop.onDraw(this@draw) }
- drawLayer(backdrop.graphicsLayer)
+ // One recording per source, read in the draw phase so every frame of a transition redraws it.
+ val layer = source.layer
+ if (layer == null || layer.isReleased) {
+ if (layer != null) app.myspoti.host.android.Logbook.log("glass: backdrop source drawn after release, drawing the page directly")
+ return drawContent()
+ }
+ recordLayer(this@LayerBackdropNode, layer) { backdrop.onDraw(this@draw) }
+ drawLayer(layer)
}
- private var own: LayoutCoordinates? = null
+ private val source = LayerBackdrop.Source()
+ private var registeredIn: LayerBackdrop? = null
+
+ override fun onAttach() {
+ registeredIn = backdrop
+ source.layer = requireGraphicsContext().createGraphicsLayer()
+ backdrop.sources.add(source)
+ }
override fun onGloballyPositioned(coordinates: LayoutCoordinates) {
if (coordinates.isAttached) {
- own = coordinates
- backdrop.layerCoordinates = coordinates
+ source.coordinates = coordinates
+ // The backdrop may have been swapped by update(): follow it.
+ if (registeredIn !== backdrop) {
+ registeredIn?.retire(source)
+ registeredIn = backdrop
+ backdrop.sources.add(source)
+ }
+ backdrop.publish(source)
}
}
override fun onDetach() {
- // Vendored change: two pages record into one backdrop while a page transition runs; the
- // one leaving must not blank the coordinates the one staying has just reported.
- if (backdrop.layerCoordinates === own) backdrop.layerCoordinates = null
- own = null
+ registeredIn?.retire(source)
+ registeredIn = null
+ source.coordinates = null
+ source.layer?.let { requireGraphicsContext().releaseGraphicsLayer(it) }
+ source.layer = null
}
}
diff --git a/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionDetail.kt b/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionDetail.kt
index 711c0abf..96889a89 100644
--- a/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionDetail.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionDetail.kt
@@ -63,14 +63,33 @@ import kotlinx.serialization.json.JsonPrimitive
import kotlinx.serialization.json.contentOrNull
import kotlinx.serialization.json.jsonPrimitive
+/**
+ * "by <author> · repository by <owner>": the manifest's author is the package's own claim, so it
+ * is never shown alone as if verified (a package from a file or an address is "not verified").
+ */
+@Composable
+internal fun authorLine(author: String, repo: String?): String {
+ val owner = repo?.let { app.myspoti.extensions.GitHubRepo.parse(it)?.owner }
+ return if (owner != null) stringResource(R.string.update_author_owner, author, owner) else stringResource(R.string.update_author_unverified, author)
+}
+
+/** Updates from the repository are refused: its host ids changed (re-registered or transferred). */
+@Composable
+private fun RepoChangedWarning() {
+ Column(Modifier.fillMaxWidth().padding(horizontal = 16.dp, vertical = 6.dp).clip(RoundedCornerShape(12.dp)).background(Warning.copy(alpha = 0.10f)).padding(12.dp)) {
+ Text(stringResource(R.string.update_repo_changed_title), color = Warning, fontSize = 14.sp, fontWeight = FontWeight.SemiBold)
+ Text(stringResource(R.string.update_repo_changed_body), color = AppMuted, fontSize = 12.sp, modifier = Modifier.padding(top = 2.dp))
+ }
+}
+
/** Icon, name, author, version and category: the top of both detail pages. */
@Composable
-private fun Header(id: String, name: String, author: String, version: String, category: app.myspoti.extensions.Category, iconUrl: String?, iconBytes: ByteArray?) {
+private fun Header(id: String, name: String, author: String, repo: String?, version: String, category: app.myspoti.extensions.Category, iconUrl: String?, iconBytes: ByteArray?) {
Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth().padding(horizontal = 20.dp, vertical = 8.dp)) {
ExtIcon(id, name, iconUrl, iconBytes, 72.dp)
Column(Modifier.padding(start = 16.dp)) {
Text(name, color = AppText, fontSize = 22.sp, fontWeight = FontWeight.Bold, maxLines = 2)
- Text(stringResource(R.string.extension_by, author), color = AppMuted, fontSize = 13.sp, maxLines = 1)
+ Text(authorLine(author, repo), color = AppMuted, fontSize = 13.sp, maxLines = 1)
Row(Modifier.padding(top = 4.dp), horizontalArrangement = Arrangement.spacedBy(6.dp)) {
VersionPill(version)
ExtPill(stringResource(categoryLabel(category)), AppAccent, AppAccent.copy(alpha = 0.15f))
@@ -146,7 +165,7 @@ fun ExtensionEntryScreen(navController: NavController, id: String) {
val installed = registry.find(id)
val action = Store.action(e, installed?.versionCode, appVersion)
val m = e.preview()
- Header(e.id, e.name, e.author, e.version, e.category(), iconOf(repo, e), installed?.let { Extensions.pkg(id)?.icon })
+ Header(e.id, e.name, e.author, e.repo, e.version, e.category(), iconOf(repo, e), installed?.let { Extensions.pkg(id)?.icon })
if (e.repo != null) {
LaunchedEffect(e.repo) { ExtensionStore.loadDownloads(e.repo!!) }
Row(Modifier.padding(horizontal = 20.dp), verticalAlignment = Alignment.CenterVertically) {
@@ -212,7 +231,8 @@ fun ExtensionScreen(navController: NavController, id: String) {
Text(stringResource(R.string.extensions_none), color = AppMuted, modifier = Modifier.padding(20.dp))
return@Page
}
- Header(e.id, e.name, e.author, e.version, m.category(), null, pkg.icon)
+ Header(e.id, e.name, e.author, e.origin?.repo, e.version, m.category(), null, pkg.icon)
+ if (e.updateBlocked != null || ExtensionStore.identityChanged(e)) RepoChangedWarning()
if (e.sourceGone) Text(stringResource(R.string.extension_source_gone), color = Warning, fontSize = 12.sp,
modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp, vertical = 4.dp).clip(RoundedCornerShape(10.dp)).background(Warning.copy(alpha = 0.10f)).padding(12.dp))
@@ -222,7 +242,7 @@ fun ExtensionScreen(navController: NavController, id: String) {
if (refused.isNotEmpty()) RefusedNeedsOk(m.asks().filter { it.key in refused }) {
scope.launch { Extensions.acceptAll(id); enable(id, true) }
}
- e.pendingUpdate?.let { p -> UpdateNeedsOk(e.version, p, onAccept = { scope.launch { runCatching { ExtensionUpdates.accept(id) }.onFailure { toastError(ctx, it) } } },
+ e.pendingUpdate?.let { p -> UpdateNeedsOk(e.name, e.version, p, onAccept = { scope.launch { runCatching { ExtensionUpdates.accept(id) }.onFailure { toastError(ctx, it) } } },
onKeep = { ExtensionUpdates.keepCurrent(id) }) }
// An update in a repository: its button right here.
@@ -394,6 +414,8 @@ private fun SettingEditor(id: String, s: Setting) {
private fun checkResult(r: ExtensionUpdates.Result): Int = when (r) {
ExtensionUpdates.Result.UP_TO_DATE, ExtensionUpdates.Result.NOT_FROM_GITHUB -> R.string.extension_check_up_to_date
ExtensionUpdates.Result.APPLIED -> R.string.extension_check_applied
+ ExtensionUpdates.Result.WAITING -> R.string.update_check_waiting
+ ExtensionUpdates.Result.REPO_CHANGED -> R.string.update_check_repo_changed
ExtensionUpdates.Result.NEEDS_OK -> R.string.extension_check_needs_ok
ExtensionUpdates.Result.DECLINED -> R.string.extension_check_declined
ExtensionUpdates.Result.SOURCE_GONE -> R.string.extension_source_gone
@@ -409,21 +431,31 @@ private fun checkResult(r: ExtensionUpdates.Result): Int = when (r) {
* A protected surface, like the install prompt.
*/
@Composable
-private fun UpdateNeedsOk(from: String, p: com.music.spotui.extensions.PendingUpdate, onAccept: () -> Unit, onKeep: () -> Unit) {
+private fun UpdateNeedsOk(name: String, from: String, p: com.music.spotui.extensions.PendingUpdate, onAccept: () -> Unit, onKeep: () -> Unit) {
com.music.spotui.extensions.ProtectedSurfaceEffect(app.myspoti.extensions.ProtectedSurface.INSTALL)
val critical = p.changes.any { it.critical }
val tint = if (critical) Warning else AppAccent
Column(Modifier.fillMaxWidth().padding(horizontal = 16.dp, vertical = 6.dp).clip(RoundedCornerShape(12.dp)).background(tint.copy(alpha = 0.10f)).padding(12.dp)) {
- Text(stringResource(R.string.extension_update_needs_ok, from, p.kept.version), color = AppText, fontSize = 14.sp, fontWeight = FontWeight.SemiBold)
- Text(stringResource(R.string.extension_update_needs_ok_body), color = AppMuted, fontSize = 12.sp, modifier = Modifier.padding(top = 2.dp, bottom = 6.dp))
+ // Only the code changed (in a package holding powerful rights): Update / Not now, no risk tick.
+ val codeOnly = p.changes.all { it.kind == app.myspoti.extensions.Change.Kind.CODE }
+ val code = p.changes.firstOrNull { it.kind == app.myspoti.extensions.Change.Kind.CODE }
+ if (codeOnly && code != null) {
+ Text(stringResource(R.string.update_code_title, name, code.added + code.removed, code.added, code.removed), color = AppText, fontSize = 14.sp, fontWeight = FontWeight.SemiBold)
+ Text(stringResource(R.string.update_code_body), color = AppMuted, fontSize = 12.sp, modifier = Modifier.padding(top = 2.dp, bottom = 6.dp))
+ } else {
+ Text(stringResource(R.string.extension_update_needs_ok, from, p.kept.version), color = AppText, fontSize = 14.sp, fontWeight = FontWeight.SemiBold)
+ Text(stringResource(R.string.extension_update_needs_ok_body), color = AppMuted, fontSize = 12.sp, modifier = Modifier.padding(top = 2.dp, bottom = 6.dp))
+ }
p.changes.forEach { c -> ChangeRow(c) }
if (p.changelog.isNotBlank()) Text(p.changelog, color = AppMuted, fontSize = 12.sp, maxLines = 4, modifier = Modifier.padding(top = 4.dp))
- if (critical) Text(stringResource(R.string.actions_critical_warning), color = Warning, fontSize = 12.sp, modifier = Modifier.padding(top = 6.dp))
+ if (critical && !codeOnly) Text(stringResource(R.string.actions_critical_warning), color = Warning, fontSize = 12.sp, modifier = Modifier.padding(top = 6.dp))
var risk by remember(p) { mutableStateOf(false) }
- RiskBox(risk) { risk = it }
+ if (!codeOnly) RiskBox(risk) { risk = it }
Row(Modifier.padding(top = 6.dp)) {
- TextButton(enabled = risk, onClick = onAccept) { Text(stringResource(R.string.extension_update_accept), color = if (risk) tint else AppMuted) }
- TextButton(onClick = onKeep) { Text(stringResource(R.string.extension_update_keep), color = AppText) }
+ TextButton(enabled = risk || codeOnly, onClick = onAccept) {
+ Text(stringResource(if (codeOnly) R.string.update_code_update else R.string.extension_update_accept), color = if (risk || codeOnly) tint else AppMuted)
+ }
+ TextButton(onClick = onKeep) { Text(stringResource(if (codeOnly) R.string.update_code_later else R.string.extension_update_keep), color = AppText) }
}
}
}
@@ -460,6 +492,7 @@ private fun ChangeRow(c: app.myspoti.extensions.Change) {
app.myspoti.extensions.Change.Kind.WRITE -> stringResource(R.string.extension_change_write, c.key)
app.myspoti.extensions.Change.Kind.EXCLUSIVE -> stringResource(R.string.extension_change_exclusive, label)
app.myspoti.extensions.Change.Kind.WHY -> stringResource(R.string.extension_change_why, label)
+ app.myspoti.extensions.Change.Kind.CODE -> stringResource(R.string.update_code_files, c.key.ifBlank { "main" } + " (+${c.added}/−${c.removed})")
app.myspoti.extensions.Change.Kind.REPO -> stringResource(R.string.extension_change_repo, c.key, c.before)
app.myspoti.extensions.Change.Kind.AUTHOR -> stringResource(R.string.extension_change_author, c.key, c.before)
app.myspoti.extensions.Change.Kind.REPLACES -> stringResource(R.string.extension_change_replaces, c.key)
diff --git a/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionPage.kt b/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionPage.kt
index 33418764..1652b39e 100644
--- a/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionPage.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionPage.kt
@@ -50,8 +50,6 @@ import com.music.spotui.ui.theme.AppBackground
import com.music.spotui.ui.theme.AppMuted
import com.music.spotui.ui.theme.AppText
import java.io.ByteArrayInputStream
-import java.net.HttpURLConnection
-import java.net.URL
internal fun extensionPageRoute(id: String) = "extension-page/${android.net.Uri.encode(id)}"
@@ -148,20 +146,32 @@ private class SandboxClient(private val hosts: List<String>, private val network
val url = request.url.toString()
if (url.startsWith("data:") || url.startsWith("about:")) return null
if (com.music.spotui.data.DataSaver.active || !PageNetwork.allows(url, request.method, hosts, network, any)) return refused()
+ // OkHttp with the sandbox's Dns: a name that resolves to a local address is never connected to,
+ // and no redirect is followed (a redirect would escape the allowed hosts).
return runCatching {
- val c = URL(url).openConnection() as HttpURLConnection
- c.instanceFollowRedirects = false
- c.useCaches = false
- c.connectTimeout = 10_000; c.readTimeout = 15_000
- c.setRequestProperty("User-Agent", "Myspoti-Extension-Page/1")
- val status = c.responseCode
- if (status !in 200..299) { c.disconnect(); return refused() }
- val type = c.contentType?.substringBefore(';')?.trim() ?: "application/octet-stream"
- val charset = c.contentType?.substringAfter("charset=", "")?.trim()?.ifBlank { null }
- if (c.contentLengthLong > 8L * 1024 * 1024) { c.disconnect(); return refused() }
- val bytes = c.inputStream.use { s -> s.readBytes() }
- c.disconnect()
- WebResourceResponse(type, charset, status, "OK", mapOf("Access-Control-Allow-Origin" to "*"), ByteArrayInputStream(bytes))
+ val req = okhttp3.Request.Builder().url(url).header("User-Agent", "Myspoti-Extension-Page/1").get().build()
+ val client = app.myspoti.extensions.SafeNet.client.newBuilder()
+ .connectTimeout(10, java.util.concurrent.TimeUnit.SECONDS).readTimeout(15, java.util.concurrent.TimeUnit.SECONDS).build()
+ client.newCall(req).execute().use { r ->
+ val status = r.code
+ if (status !in 200..299) return refused()
+ val body = r.body
+ val ct = body.contentType()
+ val type = ct?.let { "${it.type}/${it.subtype}" } ?: "application/octet-stream"
+ val charset = ct?.charset()?.name()
+ if (body.contentLength() > 8L * 1024 * 1024) return refused()
+ val out = java.io.ByteArrayOutputStream()
+ val buf = ByteArray(16 * 1024)
+ body.byteStream().use { s ->
+ while (true) {
+ val n = s.read(buf)
+ if (n < 0) break
+ out.write(buf, 0, n)
+ if (out.size() > 8 * 1024 * 1024) return refused()
+ }
+ }
+ WebResourceResponse(type, charset, status, "OK", mapOf("Access-Control-Allow-Origin" to "*"), ByteArrayInputStream(out.toByteArray()))
+ }
}.getOrElse { refused() }
}
diff --git a/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionParts.kt b/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionParts.kt
index 679f2fce..1910d91b 100644
--- a/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionParts.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionParts.kt
@@ -156,7 +156,7 @@ internal fun rememberPackagePicker(): () -> Unit {
}
}.getOrNull()
}
- if (bytes == null) Toast.makeText(ctx, ctx.getString(R.string.extensions_error, "unreadable file"), Toast.LENGTH_LONG).show()
+ if (bytes == null) Toast.makeText(ctx, ctx.getString(R.string.extensions_unreadable_file), Toast.LENGTH_LONG).show()
else offer(ctx, bytes, "file")
}
}
@@ -200,7 +200,7 @@ internal fun InstallPrompt() {
},
text = {
Column(Modifier.verticalScroll(rememberScrollState())) {
- Text(stringResource(R.string.extensions_prompt_by, m.author, m.version, m.id), color = AppMuted, fontSize = 12.sp)
+ Text(stringResource(R.string.extensions_prompt_by, authorLine(m.author, p.origin?.repo), m.version, m.id), color = AppMuted, fontSize = 12.sp)
Text(stringResource(R.string.extensions_prompt_source, if (p.source == "file") stringResource(R.string.extensions_prompt_source_file) else p.source),
color = AppMuted, fontSize = 12.sp, maxLines = 2, overflow = TextOverflow.Ellipsis)
if (m.description.isNotBlank()) Text(m.description, color = AppText, fontSize = 14.sp, modifier = Modifier.padding(top = 6.dp))
diff --git a/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionsScreen.kt b/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionsScreen.kt
index 0d0260ca..8efda033 100644
--- a/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionsScreen.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/screens/ExtensionsScreen.kt
@@ -371,7 +371,7 @@ private fun StoreRow(
VersionPill(e.version)
}
if (action == StoreAction.INCOMPATIBLE) Text(incompatibleLine(e), color = Warning, fontSize = 12.sp, maxLines = 1, overflow = TextOverflow.Ellipsis)
- else Text(e.description.ifBlank { e.author }, color = AppMuted, fontSize = 12.sp, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ else Text(e.description.ifBlank { authorLine(e.author, e.repo) }, color = AppMuted, fontSize = 12.sp, maxLines = 1, overflow = TextOverflow.Ellipsis)
incompatibleWith(e, registry)?.let { Text(it, color = Warning, fontSize = 12.sp, maxLines = 1, overflow = TextOverflow.Ellipsis) }
if (e.repo != null) RatingLine(rating, hidden)
ActionIcons(e.preview().asks())
@@ -423,7 +423,8 @@ private fun AreaSection(
color = if (active) AppAccent else AppMuted, fontSize = 11.sp, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
- if (list.size >= 2) Row {
+ // Sources are ordered per action, in Settings (see the hint under them).
+ if (list.size >= 2 && area != Area.AUDIO) Row {
IconButton(onClick = { Extensions.movePriority(area, e.id, -1) }, enabled = i > 0, modifier = Modifier.size(28.dp)) {
Icon(Icons.Default.KeyboardArrowUp, stringResource(R.string.extensions_move_up), tint = if (i > 0) AppText else AppMuted.copy(alpha = 0.3f))
}
@@ -433,6 +434,8 @@ private fun AreaSection(
}
}
}
+ if (area == Area.AUDIO && list.size >= 2) Text(stringResource(R.string.sources_order_hint), color = AppMuted, fontSize = 12.sp,
+ modifier = Modifier.padding(horizontal = 20.dp, vertical = 4.dp))
// Who did what here lately.
val recent = remember(activity, area) { activity.filter { it.area == area }.takeLast(3).asReversed() }
if (recent.isNotEmpty()) {
@@ -475,7 +478,7 @@ private fun InstalledRow(e: InstalledExtension, error: String?, status: app.mysp
when {
state != null -> Text(state.first, color = state.second, fontSize = 12.sp, maxLines = 2, overflow = TextOverflow.Ellipsis)
!e.enabled -> Text(stringResource(R.string.extension_off), color = AppMuted, fontSize = 12.sp)
- else -> Text(m?.description?.ifBlank { null } ?: e.author, color = AppMuted, fontSize = 12.sp, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ else -> Text(m?.description?.ifBlank { null } ?: authorLine(e.author, e.origin?.repo), color = AppMuted, fontSize = 12.sp, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
m?.let { ActionIcons(it.asks().filter { a -> a.key in e.granted }) }
extra()
diff --git a/base/app/src/main/java/com/music/spotui/ui/screens/PlayerScreen.kt b/base/app/src/main/java/com/music/spotui/ui/screens/PlayerScreen.kt
index f8ea3ee6..ea006532 100644
--- a/base/app/src/main/java/com/music/spotui/ui/screens/PlayerScreen.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/screens/PlayerScreen.kt
@@ -658,6 +658,7 @@ fun PlayerScreen(navController: NavController) {
)
// Buttons from extensions (player.buttons), under the player's own controls.
val extTrack = androidx.compose.runtime.remember(songTitle, songSinger) { com.music.spotui.extensions.Extensions.currentTrack() }
+ com.music.spotui.extensions.MirrorIndicator()
com.music.spotui.extensions.ExtensionPlayerButtons(extTrack)
// 8dp card margin + this = the official 37dp from the buttons' centre to the card.
Spacer(modifier = Modifier.height(12.dp))
diff --git a/base/app/src/main/java/com/music/spotui/ui/screens/SettingsScreen.kt b/base/app/src/main/java/com/music/spotui/ui/screens/SettingsScreen.kt
index e8b6aff5..49e97713 100644
--- a/base/app/src/main/java/com/music/spotui/ui/screens/SettingsScreen.kt
+++ b/base/app/src/main/java/com/music/spotui/ui/screens/SettingsScreen.kt
@@ -30,6 +30,7 @@ import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Check
+import androidx.compose.material.icons.filled.Refresh
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
@@ -117,6 +118,13 @@ fun SettingsScreen(navController: NavController) {
checked = keepPlaying,
onChecked = { keepPlaying = it; app.myspoti.host.android.PlaybackService.setKeepsPlayingOnClose(ctx, it) },
)
+ var headsetSkip by remember { mutableStateOf(app.myspoti.host.android.PlaybackService.skipsOnEpisodes(ctx)) }
+ OptionRow(
+ label = stringResource(R.string.settings_headset_skip_title),
+ detail = stringResource(R.string.settings_headset_skip_detail),
+ checked = headsetSkip,
+ onChecked = { headsetSkip = it; app.myspoti.host.android.PlaybackService.setSkipsOnEpisodes(ctx, it) },
+ )
// Lyrics: word by word (karaoke) first, or line by line with Spotify's first.
var wordSync by remember { mutableStateOf(com.music.spotui.data.preferences.isLyricsWordSync(ctx)) }
OptionRow(
@@ -131,6 +139,7 @@ fun SettingsScreen(navController: NavController) {
},
)
Divider()
+ SourcesBlock(app.myspoti.extensions.Action.AUDIO_SOURCE, navController)
Section(R.string.settings_section_data)
OptionRow(
@@ -163,8 +172,10 @@ fun SettingsScreen(navController: NavController) {
if (tab == 1) {
Section(R.string.settings_section_downloads)
DownloadQualityPicker()
- // Where downloads come from: a download-source extension.
- Column(
+ // Where downloads come from: the download-source extensions, in the order they are asked.
+ if (com.music.spotui.extensions.Extensions.sources(app.myspoti.extensions.Action.DOWNLOAD_SOURCE).isNotEmpty())
+ SourcesBlock(app.myspoti.extensions.Action.DOWNLOAD_SOURCE, navController)
+ else Column(
Modifier.fillMaxWidth().clickable { navController.navigate(com.music.spotui.ui.navigation.Routes.Extensions.route) }
.padding(horizontal = 20.dp, vertical = 10.dp),
) {
@@ -251,7 +262,6 @@ fun SettingsScreen(navController: NavController) {
checked = com.music.spotui.data.preferences.AutoUpdateCheckPref.on,
onChecked = { com.music.spotui.data.preferences.AutoUpdateCheckPref.set(ctx, it) },
)
- CheckUpdateRow()
// The hidden Web Player stuck or crashed: rebuild it without leaving the app.
Column(
Modifier.fillMaxWidth().clickable {
@@ -309,6 +319,19 @@ private fun ExtensionSettingsRows(navController: NavController) {
Divider()
}
+/** The order a source action asks extensions in ([SourceOrderList]); nothing without any such extension. */
+@Composable
+private fun SourcesBlock(action: app.myspoti.extensions.Action, navController: NavController) {
+ val registry by com.music.spotui.extensions.Extensions.registry.collectAsStateWithLifecycle()
+ val audio = action == app.myspoti.extensions.Action.AUDIO_SOURCE
+ if (remember(registry) { com.music.spotui.extensions.Extensions.sources(action).isEmpty() }) return
+ Section(if (audio) R.string.sources_audio_title else R.string.sources_download_title)
+ SourceOrderList(action, spotifyLast = audio, look = SourceLook.Classic, onOpen = { navController.navigate(installedRoute(it)) })
+ Text(stringResource(if (audio) R.string.sources_audio_footer else R.string.sources_download_footer), color = AppMuted, fontSize = 12.sp,
+ modifier = Modifier.padding(horizontal = 20.dp, vertical = 4.dp))
+ if (audio) Divider()
+}
+
@Composable
private fun Section(title: Int) {
Text(stringResource(title).uppercase(), color = com.music.spotui.ui.theme.AppAccent, fontSize = 12.sp, fontWeight = FontWeight.Bold,
@@ -536,51 +559,43 @@ private fun OptionRow(label: String, detail: String, checked: Boolean,
}
}
-/** The installed version and, when a newer one is known, the update on offer (its card opens on tap). */
+/**
+ * The installed version with a refresh button: it asks GitHub right now (no cache), shows the
+ * answer and the time of the last check. A newer release opens the update card on tap.
+ */
@Composable
private fun AboutRow() {
val ctx = androidx.compose.ui.platform.LocalContext.current
+ val scope = androidx.compose.runtime.rememberCoroutineScope()
+ val check = com.music.spotui.data.api.rememberUpdateCheckState(ctx)
// Also what "Later" put aside: the card in the app offers it again from here.
val live = com.music.spotui.updateRelease.value
val known = live ?: remember { com.music.spotui.data.api.UpdateChecker.known(ctx) }
- Column(
+ Row(
Modifier.fillMaxWidth()
.then(if (known != null) Modifier.clickable { com.music.spotui.updateRelease.value = known } else Modifier)
- .padding(horizontal = 20.dp, vertical = 10.dp),
+ .padding(start = 20.dp, end = 8.dp, top = 6.dp, bottom = 6.dp),
+ verticalAlignment = Alignment.CenterVertically,
) {
- Text(stringResource(R.string.settings_about_version, app.myspoti.engine.BuildConfig.VERSION_NAME), color = AppText, fontSize = 16.sp)
- if (known != null) {
- Text(stringResource(R.string.settings_update_available, known.version), color = com.music.spotui.ui.theme.AppAccent, fontSize = 14.sp,
- fontWeight = FontWeight.Bold, modifier = Modifier.padding(top = 2.dp))
- Text(stringResource(R.string.settings_update_available_detail), color = AppMuted, fontSize = 12.sp)
+ Column(Modifier.weight(1f)) {
+ Text(stringResource(R.string.settings_about_version, app.myspoti.engine.BuildConfig.VERSION_NAME), color = AppText, fontSize = 16.sp)
+ if (known != null) {
+ Text(stringResource(R.string.settings_update_available, known.version), color = com.music.spotui.ui.theme.AppAccent, fontSize = 14.sp,
+ fontWeight = FontWeight.Bold, modifier = Modifier.padding(top = 2.dp))
+ Text(stringResource(R.string.settings_update_available_detail), color = AppMuted, fontSize = 12.sp)
+ }
+ check.message?.takeIf { known == null || check.isError }?.let {
+ Text(it, color = if (check.isError) androidx.compose.material3.MaterialTheme.colorScheme.error else AppText, fontSize = 13.sp, modifier = Modifier.padding(top = 2.dp))
+ }
+ Text(check.lastCheckedText, color = AppMuted, fontSize = 12.sp)
}
- }
-}
-
-/** "Check for updates now": the launch check can be off; this one always asks. */
-@Composable
-private fun CheckUpdateRow() {
- val ctx = androidx.compose.ui.platform.LocalContext.current
- val scope = androidx.compose.runtime.rememberCoroutineScope()
- var checking by remember { androidx.compose.runtime.mutableStateOf(false) }
- androidx.compose.foundation.layout.Column(
- Modifier.fillMaxWidth().clickable(enabled = !checking) {
- if (checking) return@clickable
- checking = true
- scope.launch {
- val found = runCatching { com.music.spotui.data.api.UpdateChecker.check(ctx, manual = true) }.getOrNull()
- checking = false
- // The card is the app's one update UI: fill it, it shows itself.
- if (found != null) com.music.spotui.updateRelease.value = found
- else android.widget.Toast.makeText(ctx, ctx.getString(R.string.settings_update_check_latest), android.widget.Toast.LENGTH_SHORT).show()
+ if (check.checking) {
+ androidx.compose.material3.CircularProgressIndicator(Modifier.padding(12.dp).size(24.dp), strokeWidth = 2.dp, color = AppMuted)
+ } else {
+ androidx.compose.material3.IconButton(onClick = { scope.launch { check.run() } }) {
+ androidx.compose.material3.Icon(Icons.Default.Refresh, stringResource(R.string.settings_update_refresh), tint = AppMuted)
}
- }.padding(horizontal = 20.dp, vertical = 10.dp),
- ) {
- Text(
- stringResource(if (checking) R.string.settings_update_checking else R.string.settings_check_update_title),
- color = AppText, fontSize = 16.sp,
- )
- Text(stringResource(R.string.settings_check_update_detail), color = AppMuted, fontSize = 12.sp)
+ }
}
}
diff --git a/base/app/src/main/java/com/music/spotui/ui/screens/SourceOrder.kt b/base/app/src/main/java/com/music/spotui/ui/screens/SourceOrder.kt
new file mode 100644
index 00000000..ed099084
--- /dev/null
+++ b/base/app/src/main/java/com/music/spotui/ui/screens/SourceOrder.kt
@@ -0,0 +1,152 @@
+package com.music.spotui.ui.screens
+
+import androidx.compose.animation.AnimatedVisibility
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.layout.widthIn
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.KeyboardArrowDown
+import androidx.compose.material.icons.filled.KeyboardArrowUp
+import androidx.compose.material.icons.rounded.ExpandLess
+import androidx.compose.material.icons.rounded.ExpandMore
+import androidx.compose.material3.Icon
+import androidx.compose.material3.IconButton
+import androidx.compose.material3.Text
+import androidx.compose.material3.TextButton
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.collectAsState
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.saveable.rememberSaveable
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.res.stringResource
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.style.TextOverflow
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import app.myspoti.engine.R
+import app.myspoti.extensions.Action
+import app.myspoti.extensions.Area
+import com.music.spotui.extensions.Extensions
+import com.music.spotui.extensions.InstalledExtension
+import com.music.spotui.extensions.SPOTIFY_SOURCE
+import com.music.spotui.ui.theme.AppAccent
+import com.music.spotui.ui.theme.AppMuted
+import com.music.spotui.ui.theme.AppText
+
+/** The colours and type a source list is drawn with: the classic look's or the Immersive one's. */
+internal class SourceLook(
+ val text: Color, val muted: Color, val accent: Color,
+ val name: TextStyle, val line: TextStyle,
+) {
+ companion object {
+ val Classic = SourceLook(AppText, AppMuted, AppAccent,
+ TextStyle(color = AppText, fontSize = 15.sp, fontWeight = FontWeight.SemiBold), TextStyle(color = AppMuted, fontSize = 12.sp))
+ }
+}
+
+/**
+ * The order the source [action] (audio or downloads) asks in, for Settings: one row per
+ * extension with only what matters (its place, name and whether it answers) and arrows to
+ * reorder; its version, author, reason and last use open under it on demand. [spotifyLast]: the
+ * audio order, where Spotify has a row of its own that moves too (the sources under it are not
+ * asked).
+ */
+@Composable
+internal fun SourceOrderList(action: Action, spotifyLast: Boolean, look: SourceLook, onOpen: (String) -> Unit, rowPadding: Modifier = Modifier.padding(horizontal = 20.dp, vertical = 8.dp)) {
+ val registry by Extensions.registry.collectAsState()
+ val errors by Extensions.errors.collectAsState()
+ val statuses by Extensions.statuses.collectAsState()
+ val activity by Extensions.activity.state.collectAsState()
+ val line = remember(registry, action) { Extensions.sourceLine(action).filter { spotifyLast || it != SPOTIFY_SOURCE } }
+ val spotifyAt = line.indexOf(SPOTIFY_SOURCE)
+ Column(Modifier.fillMaxWidth()) {
+ line.forEachIndexed { i, id ->
+ val arrows: @Composable () -> Unit = { MoveArrows(action, id, i, line.size, look) }
+ val e = registry.find(id)
+ if (id == SPOTIFY_SOURCE) Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth().then(rowPadding)) {
+ Rank(i + 1, look)
+ Column(Modifier.weight(1f)) {
+ Text(stringResource(R.string.sources_spotify), style = look.name, maxLines = 1)
+ Text(stringResource(R.string.sources_spotify_detail), style = look.line, maxLines = 2, overflow = TextOverflow.Ellipsis)
+ }
+ arrows()
+ } else if (e != null) {
+ SourceRow(e, i, action, errors[e.id], statuses[e.id], activity.lastOrNull { it.extensionId == e.id && it.area == Area.AUDIO },
+ below = spotifyAt in 0 until i, look, rowPadding, arrows) { onOpen(e.id) }
+ }
+ }
+ if (line.isEmpty()) Text(stringResource(R.string.downloads_source_row_off), style = look.line, modifier = rowPadding)
+ }
+}
+
+@Composable
+private fun MoveArrows(action: Action, id: String, i: Int, count: Int, look: SourceLook) {
+ if (count < 2) return
+ IconButton(onClick = { Extensions.moveSource(action, id, -1) }, enabled = i > 0, modifier = Modifier.size(34.dp)) {
+ Icon(Icons.Default.KeyboardArrowUp, stringResource(R.string.extensions_move_up), tint = if (i > 0) look.text else look.muted.copy(alpha = 0.3f))
+ }
+ IconButton(onClick = { Extensions.moveSource(action, id, 1) }, enabled = i < count - 1, modifier = Modifier.size(34.dp)) {
+ Icon(Icons.Default.KeyboardArrowDown, stringResource(R.string.extensions_move_down), tint = if (i < count - 1) look.text else look.muted.copy(alpha = 0.3f))
+ }
+}
+
+@Composable
+private fun Rank(n: Int, look: SourceLook) =
+ Text("$n", color = look.muted, fontSize = 13.sp, fontWeight = FontWeight.Bold, modifier = Modifier.widthIn(min = 22.dp))
+
+@Composable
+private fun SourceRow(
+ e: InstalledExtension, i: Int, action: Action, error: String?, status: app.myspoti.extensions.ExtensionStatus?,
+ last: app.myspoti.extensions.ActivityLog.Entry?, below: Boolean, look: SourceLook, rowPadding: Modifier, arrows: @Composable () -> Unit, onOpen: () -> Unit,
+) {
+ var open by rememberSaveable(e.id, action.key) { mutableStateOf(false) }
+ val pkg = remember(e.id, e.sha256) { Extensions.pkg(e.id) }
+ val problem = stateLine(e, error, status)
+ Column(Modifier.fillMaxWidth()) {
+ Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth().clickable { open = !open }.then(rowPadding)) {
+ Rank(i + 1, look)
+ ExtIcon(e.id, e.name, null, pkg?.icon, size = 34.dp)
+ Spacer(Modifier.width(10.dp))
+ Column(Modifier.weight(1f)) {
+ Text(e.name, style = look.name.copy(color = if (e.enabled && !below) look.text else look.muted), maxLines = 1, overflow = TextOverflow.Ellipsis)
+ when {
+ problem != null -> Text(problem.first, style = look.line.copy(color = problem.second), maxLines = 1, overflow = TextOverflow.Ellipsis)
+ !e.enabled -> Text(stringResource(R.string.extension_off), style = look.line, maxLines = 1)
+ below -> Text(stringResource(R.string.sources_below_spotify), style = look.line, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ else -> Text(stringResource(R.string.sources_ready), style = look.line.copy(color = look.accent), maxLines = 1)
+ }
+ }
+ Icon(if (open) Icons.Rounded.ExpandLess else Icons.Rounded.ExpandMore,
+ stringResource(if (open) R.string.sources_details_hide else R.string.sources_details_show), tint = look.muted, modifier = Modifier.size(20.dp))
+ arrows()
+ }
+ // What is only useful now and then, behind the row's chevron.
+ AnimatedVisibility(open) {
+ Column(Modifier.fillMaxWidth().padding(start = 86.dp, end = 20.dp, bottom = 6.dp)) {
+ Text(stringResource(R.string.sources_detail_version, e.version, e.author.ifBlank { "—" }), style = look.line)
+ pkg?.manifest?.declared()?.firstOrNull { it.name == action.key }?.why?.takeIf { it.isNotBlank() }?.let {
+ Text(it, style = look.line, maxLines = 3, overflow = TextOverflow.Ellipsis)
+ }
+ last?.let {
+ val ago = android.text.format.DateUtils.getRelativeTimeSpanString(it.at, System.currentTimeMillis(), android.text.format.DateUtils.MINUTE_IN_MILLIS).toString()
+ Text(stringResource(R.string.sources_last_used, it.text, ago), style = look.line, maxLines = 2, overflow = TextOverflow.Ellipsis)
+ }
+ TextButton(onClick = onOpen, contentPadding = androidx.compose.foundation.layout.PaddingValues(0.dp)) {
+ Text(stringResource(R.string.sources_open), color = look.accent, fontSize = 13.sp)
+ }
+ }
+ }
+ }
+}
diff --git a/base/app/src/main/res/values-af/sources_strings.xml b/base/app/src/main/res/values-af/sources_strings.xml
new file mode 100644
index 00000000..b8176085
--- /dev/null
+++ b/base/app/src/main/res/values-af/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Oudio-bronne</string>
+ <string name="sources_download_title">Aflaai-bronne</string>
+ <string name="sources_audio_footer">Van bo na onder gevra vir elke liedjie: die eerste een wat dit het, speel dit. Gebruik die pyltjies om die volgorde te verander.</string>
+ <string name="sources_download_footer">Van bo na onder gevra: die eerste een wat die liedjie het, lewer die lêer. Gebruik die pyltjies om die volgorde te verander.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Speel wanneer geen bron hierbo die liedjie het nie</string>
+ <string name="sources_ready">Gereed</string>
+ <string name="sources_details_show">Wys besonderhede</string>
+ <string name="sources_details_hide">Versteek besonderhede</string>
+ <string name="sources_detail_version">Weergawe %1$s · deur %2$s</string>
+ <string name="sources_last_used">Laaste: %1$s, %2$s</string>
+ <string name="sources_open">Maak die uitbreiding oop</string>
+ <string name="sources_order_hint">Bronne word gevra in die volgorde wat in Instellings gestel is (Speel, Aflaaie).</string>
+ <string name="sources_below_spotify">Word nie gevra nie: Spotify is bo</string>
+</resources>
diff --git a/base/app/src/main/res/values-am/sources_strings.xml b/base/app/src/main/res/values-am/sources_strings.xml
new file mode 100644
index 00000000..65a80af0
--- /dev/null
+++ b/base/app/src/main/res/values-am/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">የድምጽ ምንጮች</string>
+ <string name="sources_download_title">የማውረጃ ምንጮች</string>
+ <string name="sources_audio_footer">ለእያንዳንዱ ዘፈን ከላይ ወደ ታች ይጠየቃሉ፦ ያለው የመጀመሪያው ይጫወታል። ቅደም ተከተሉን ለመቀየር ቀስቶችን ይጠቀሙ።</string>
+ <string name="sources_download_footer">ከላይ ወደ ታች ይጠየቃሉ፦ ዘፈኑ ያለው የመጀመሪያው ምንጭ ፋይሉን ይሰጣል። ቅደም ተከተሉን ለመቀየር ቀስቶችን ይጠቀሙ።</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">ከላይ ምንም ምንጭ ዘፈኑ ከሌለው ይጫወታል</string>
+ <string name="sources_ready">ዝግጁ</string>
+ <string name="sources_details_show">ዝርዝሮችን አሳይ</string>
+ <string name="sources_details_hide">ዝርዝሮችን ደብቅ</string>
+ <string name="sources_detail_version">ስሪት %1$s · በ%2$s</string>
+ <string name="sources_last_used">የመጨረሻ፦ %1$s, %2$s</string>
+ <string name="sources_open">ቅጥያውን ክፈት</string>
+ <string name="sources_order_hint">ምንጮች በቅንብሮች ውስጥ (መልሶ ማጫወት፣ ማውረዶች) በተዋቀረው ቅደም ተከተል ይጠየቃሉ።</string>
+ <string name="sources_below_spotify">አልተጠየቀም፦ Spotify ከላይ ነው</string>
+</resources>
diff --git a/base/app/src/main/res/values-ar-rEG/sources_strings.xml b/base/app/src/main/res/values-ar-rEG/sources_strings.xml
new file mode 100644
index 00000000..0d1671bc
--- /dev/null
+++ b/base/app/src/main/res/values-ar-rEG/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">مصادر الصوت</string>
+ <string name="sources_download_title">مصادر التنزيل</string>
+ <string name="sources_audio_footer">بيتسأل من فوق لتحت لكل أغنية: أول مصدر يكون عنده الأغنية بيشغّلها. استخدم الأسهم عشان تغيّر الترتيب.</string>
+ <string name="sources_download_footer">بيتسأل من فوق لتحت: أول مصدر عنده الأغنية بيدّي الملف. استخدم الأسهم عشان تغيّر الترتيب.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">بيشتغل لما مفيش مصدر فوقه فيه الأغنية</string>
+ <string name="sources_ready">جاهز</string>
+ <string name="sources_details_show">اعرض التفاصيل</string>
+ <string name="sources_details_hide">اخفي التفاصيل</string>
+ <string name="sources_detail_version">النسخة %1$s · بواسطة %2$s</string>
+ <string name="sources_last_used">آخر مرة: %1$s، %2$s</string>
+ <string name="sources_open">افتح الإضافة</string>
+ <string name="sources_order_hint">المصادر بتتسأل بالترتيب اللي متظبط في الإعدادات (التشغيل، التنزيلات).</string>
+ <string name="sources_below_spotify">مش هيتسأل: Spotify فوق</string>
+</resources>
diff --git a/base/app/src/main/res/values-ar-rMA/sources_strings.xml b/base/app/src/main/res/values-ar-rMA/sources_strings.xml
new file mode 100644
index 00000000..b15b5172
--- /dev/null
+++ b/base/app/src/main/res/values-ar-rMA/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">مصادر الصوت</string>
+ <string name="sources_download_title">مصادر التحميل</string>
+ <string name="sources_audio_footer">كيتسولو من فوق لتحت على كل أغنية: أول واحد عندو الأغنية كيشغلها. استعمل السهام باش تبدل الترتيب.</string>
+ <string name="sources_download_footer">كيتسولو من فوق لتحت: أول مصدر عندو الأغنية كيعطي الملف. استعمل السهام باش تبدل الترتيب.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">كيتشغل ملي ما كاينش مصدر فوقو عندو الأغنية</string>
+ <string name="sources_ready">واجد</string>
+ <string name="sources_details_show">عرض التفاصيل</string>
+ <string name="sources_details_hide">خبي التفاصيل</string>
+ <string name="sources_detail_version">النسخة %1$s · من طرف %2$s</string>
+ <string name="sources_last_used">آخر مرة: %1$s، %2$s</string>
+ <string name="sources_open">حل الإضافة</string>
+ <string name="sources_order_hint">المصادر كيتسولو بالترتيب اللي متحدد فالإعدادات (التشغيل، التحميلات).</string>
+ <string name="sources_below_spotify">ما كيتسالش: Spotify فوق</string>
+</resources>
diff --git a/base/app/src/main/res/values-ar-rSA/sources_strings.xml b/base/app/src/main/res/values-ar-rSA/sources_strings.xml
new file mode 100644
index 00000000..91fe0724
--- /dev/null
+++ b/base/app/src/main/res/values-ar-rSA/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">مصادر الصوت</string>
+ <string name="sources_download_title">مصادر التنزيل</string>
+ <string name="sources_audio_footer">يُسأل من الأعلى إلى الأسفل لكل أغنية: أول مصدر يتوفر لديه يشغّلها. استخدم الأسهم لتغيير الترتيب.</string>
+ <string name="sources_download_footer">يُسأل من الأعلى إلى الأسفل: أول مصدر يتوفر لديه الأغنية يوفّر الملف. استخدم الأسهم لتغيير الترتيب.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">يُشغَّل عندما لا يملك أي مصدر أعلاه الأغنية</string>
+ <string name="sources_ready">جاهز</string>
+ <string name="sources_details_show">عرض التفاصيل</string>
+ <string name="sources_details_hide">إخفاء التفاصيل</string>
+ <string name="sources_detail_version">النسخة %1$s · بواسطة %2$s</string>
+ <string name="sources_last_used">آخر استخدام: %1$s، %2$s</string>
+ <string name="sources_open">فتح الإضافة</string>
+ <string name="sources_order_hint">تُسأل المصادر بالترتيب المحدد في الإعدادات (التشغيل، التنزيلات).</string>
+ <string name="sources_below_spotify">لا يُطلب: Spotify في الأعلى</string>
+</resources>
diff --git a/base/app/src/main/res/values-ar/sources_strings.xml b/base/app/src/main/res/values-ar/sources_strings.xml
new file mode 100644
index 00000000..09d998be
--- /dev/null
+++ b/base/app/src/main/res/values-ar/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">مصادر الصوت</string>
+ <string name="sources_download_title">مصادر التنزيل</string>
+ <string name="sources_audio_footer">يتم السؤال من الأعلى إلى الأسفل لكل أغنية: أول مصدر يتوفر لديه يشغّلها. استخدم الأسهم لتغيير الترتيب.</string>
+ <string name="sources_download_footer">يتم السؤال من الأعلى إلى الأسفل: أول مصدر يتوفر لديه الأغنية يوفّر الملف. استخدم الأسهم لتغيير الترتيب.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">يُشغَّل عندما لا يملك أي مصدر أعلاه الأغنية</string>
+ <string name="sources_ready">جاهز</string>
+ <string name="sources_details_show">عرض التفاصيل</string>
+ <string name="sources_details_hide">إخفاء التفاصيل</string>
+ <string name="sources_detail_version">الإصدار %1$s · بواسطة %2$s</string>
+ <string name="sources_last_used">آخر استخدام: %1$s، %2$s</string>
+ <string name="sources_open">فتح الإضافة</string>
+ <string name="sources_order_hint">يتم السؤال عن المصادر بالترتيب المحدد في الإعدادات (التشغيل، التنزيلات).</string>
+ <string name="sources_below_spotify">لا يُطلب: Spotify في الأعلى</string>
+</resources>
diff --git a/base/app/src/main/res/values-az/sources_strings.xml b/base/app/src/main/res/values-az/sources_strings.xml
new file mode 100644
index 00000000..c1578be2
--- /dev/null
+++ b/base/app/src/main/res/values-az/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Audio mənbələri</string>
+ <string name="sources_download_title">Yükləmə mənbələri</string>
+ <string name="sources_audio_footer">Hər mahnı üçün yuxarıdan aşağıya soruşulur: onu olan ilk mənbə oxudur. Sırasını dəyişmək üçün oxlardan istifadə edin.</string>
+ <string name="sources_download_footer">Yuxarıdan aşağıya soruşulur: mahnını olan ilk mənbə faylı verir. Sırasını dəyişmək üçün oxlardan istifadə edin.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Yuxarıdakı heç bir mənbədə mahnı olmadıqda çalınır</string>
+ <string name="sources_ready">Hazırdır</string>
+ <string name="sources_details_show">Təfərrüatları göstər</string>
+ <string name="sources_details_hide">Təfərrüatları gizlət</string>
+ <string name="sources_detail_version">Versiya %1$s · müəllif %2$s</string>
+ <string name="sources_last_used">Son: %1$s, %2$s</string>
+ <string name="sources_open">Genişləndirməni aç</string>
+ <string name="sources_order_hint">Mənbələr Parametrlərdə (Oxutma, Yükləmələr) təyin olunmuş sıra ilə soruşulur.</string>
+ <string name="sources_below_spotify">Soruşulmur: Spotify yuxarıdadır</string>
+</resources>
diff --git a/base/app/src/main/res/values-bg/sources_strings.xml b/base/app/src/main/res/values-bg/sources_strings.xml
new file mode 100644
index 00000000..39b28bdd
--- /dev/null
+++ b/base/app/src/main/res/values-bg/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Аудио източници</string>
+ <string name="sources_download_title">Източници за изтегляне</string>
+ <string name="sources_audio_footer">Питат се отгоре надолу за всяка песен: първият, който я има, я възпроизвежда. Използвайте стрелките, за да смените реда.</string>
+ <string name="sources_download_footer">Питат се отгоре надолу: първият източник, който има песента, дава файла. Използвайте стрелките, за да смените реда.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Възпроизвежда се, когато никой източник над него няма песента</string>
+ <string name="sources_ready">Готово</string>
+ <string name="sources_details_show">Показване на подробностите</string>
+ <string name="sources_details_hide">Скриване на подробностите</string>
+ <string name="sources_detail_version">Версия %1$s · от %2$s</string>
+ <string name="sources_last_used">Последно: %1$s, %2$s</string>
+ <string name="sources_open">Отвори разширението</string>
+ <string name="sources_order_hint">Източниците се питат в реда, зададен в Настройки (Възпроизвеждане, Изтегляния).</string>
+ <string name="sources_below_spotify">Не се пита: Spotify е по-горе</string>
+</resources>
diff --git a/base/app/src/main/res/values-bn/sources_strings.xml b/base/app/src/main/res/values-bn/sources_strings.xml
new file mode 100644
index 00000000..9b016bf8
--- /dev/null
+++ b/base/app/src/main/res/values-bn/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">অডিও উৎস</string>
+ <string name="sources_download_title">ডাউনলোড উৎস</string>
+ <string name="sources_audio_footer">প্রতিটি গানের জন্য ওপর থেকে নিচে জিজ্ঞাসা করা হয়: যার কাছে আছে প্রথমটি সেটি চালায়। ক্রম বদলাতে তীর ব্যবহার করুন।</string>
+ <string name="sources_download_footer">ওপর থেকে নিচে জিজ্ঞাসা করা হয়: গানটি আছে এমন প্রথম উৎস ফাইল দেয়। ক্রম বদলাতে তীর ব্যবহার করুন।</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">উপরের কোনো উৎসে গানটি না থাকলে চলে</string>
+ <string name="sources_ready">প্রস্তুত</string>
+ <string name="sources_details_show">বিস্তারিত দেখান</string>
+ <string name="sources_details_hide">বিস্তারিত লুকান</string>
+ <string name="sources_detail_version">সংস্করণ %1$s · লেখক %2$s</string>
+ <string name="sources_last_used">শেষ: %1$s, %2$s</string>
+ <string name="sources_open">এক্সটেনশন খুলুন</string>
+ <string name="sources_order_hint">সেটিংস-এ (প্লেব্যাক, ডাউনলোড) নির্ধারিত ক্রমে উৎসগুলো জিজ্ঞাসা করা হয়।</string>
+ <string name="sources_below_spotify">জিজ্ঞাসা করা হয় না: Spotify উপরে আছে</string>
+</resources>
diff --git a/base/app/src/main/res/values-bs/sources_strings.xml b/base/app/src/main/res/values-bs/sources_strings.xml
new file mode 100644
index 00000000..32c3e7f2
--- /dev/null
+++ b/base/app/src/main/res/values-bs/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Izvori zvuka</string>
+ <string name="sources_download_title">Izvori preuzimanja</string>
+ <string name="sources_audio_footer">Pitaju se od vrha prema dnu za svaku pjesmu: prvi koji je ima je pušta. Strelicama promijenite redoslijed.</string>
+ <string name="sources_download_footer">Pitaju se od vrha prema dnu: prvi izvor koji ima pjesmu daje datoteku. Strelicama promijenite redoslijed.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Pušta se kada nijedan izvor iznad nema pjesmu</string>
+ <string name="sources_ready">Spremno</string>
+ <string name="sources_details_show">Prikaži detalje</string>
+ <string name="sources_details_hide">Sakrij detalje</string>
+ <string name="sources_detail_version">Verzija %1$s · autor %2$s</string>
+ <string name="sources_last_used">Zadnje: %1$s, %2$s</string>
+ <string name="sources_open">Otvori proširenje</string>
+ <string name="sources_order_hint">Izvori se pitaju redoslijedom postavljenim u Postavkama (Reprodukcija, Preuzimanja).</string>
+ <string name="sources_below_spotify">Ne traži se: Spotify je iznad</string>
+</resources>
diff --git a/base/app/src/main/res/values-ca/sources_strings.xml b/base/app/src/main/res/values-ca/sources_strings.xml
new file mode 100644
index 00000000..48ec0185
--- /dev/null
+++ b/base/app/src/main/res/values-ca/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Fonts d\'àudio</string>
+ <string name="sources_download_title">Fonts de descàrrega</string>
+ <string name="sources_audio_footer">Es pregunten de dalt a baix per a cada cançó: la primera que la té la reprodueix. Fes servir les fletxes per canviar l\'ordre.</string>
+ <string name="sources_download_footer">Es pregunten de dalt a baix: la primera font que té la cançó dona el fitxer. Fes servir les fletxes per canviar l\'ordre.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Es reprodueix quan cap font de dalt no té la cançó</string>
+ <string name="sources_ready">Preparat</string>
+ <string name="sources_details_show">Mostra els detalls</string>
+ <string name="sources_details_hide">Amaga els detalls</string>
+ <string name="sources_detail_version">Versió %1$s · per %2$s</string>
+ <string name="sources_last_used">Última: %1$s, %2$s</string>
+ <string name="sources_open">Obre l\'extensió</string>
+ <string name="sources_order_hint">Les fonts es pregunten en l\'ordre definit a Configuració (Reproducció, Descàrregues).</string>
+ <string name="sources_below_spotify">No es pregunta: Spotify és a dalt</string>
+</resources>
diff --git a/base/app/src/main/res/values-cs/sources_strings.xml b/base/app/src/main/res/values-cs/sources_strings.xml
new file mode 100644
index 00000000..701740ff
--- /dev/null
+++ b/base/app/src/main/res/values-cs/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Zdroje zvuku</string>
+ <string name="sources_download_title">Zdroje stahování</string>
+ <string name="sources_audio_footer">Dotazují se shora dolů u každé skladby: první, který ji má, ji přehraje. Šipkami změníte pořadí.</string>
+ <string name="sources_download_footer">Dotazují se shora dolů: první zdroj, který skladbu má, dodá soubor. Šipkami změníte pořadí.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Přehraje se, když žádný zdroj nad ním skladbu nemá</string>
+ <string name="sources_ready">Připraveno</string>
+ <string name="sources_details_show">Zobrazit podrobnosti</string>
+ <string name="sources_details_hide">Skrýt podrobnosti</string>
+ <string name="sources_detail_version">Verze %1$s · od %2$s</string>
+ <string name="sources_last_used">Naposledy: %1$s, %2$s</string>
+ <string name="sources_open">Otevřít rozšíření</string>
+ <string name="sources_order_hint">Zdroje se dotazují v pořadí nastaveném v Nastavení (Přehrávání, Stahování).</string>
+ <string name="sources_below_spotify">Nedotazuje se: Spotify je nahoře</string>
+</resources>
diff --git a/base/app/src/main/res/values-da/sources_strings.xml b/base/app/src/main/res/values-da/sources_strings.xml
new file mode 100644
index 00000000..97f3bc9d
--- /dev/null
+++ b/base/app/src/main/res/values-da/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Lydkilder</string>
+ <string name="sources_download_title">Downloadkilder</string>
+ <string name="sources_audio_footer">Spørges fra top til bund for hver sang: den første, der har den, afspiller den. Brug pilene til at ændre rækkefølgen.</string>
+ <string name="sources_download_footer">Spørges fra top til bund: den første kilde, der har sangen, leverer filen. Brug pilene til at ændre rækkefølgen.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Afspilles, når ingen kilde ovenfor har sangen</string>
+ <string name="sources_ready">Klar</string>
+ <string name="sources_details_show">Vis detaljer</string>
+ <string name="sources_details_hide">Skjul detaljer</string>
+ <string name="sources_detail_version">Version %1$s · af %2$s</string>
+ <string name="sources_last_used">Sidst: %1$s, %2$s</string>
+ <string name="sources_open">Åbn udvidelsen</string>
+ <string name="sources_order_hint">Kilder spørges i den rækkefølge, der er angivet under Indstillinger (Afspilning, Downloads).</string>
+ <string name="sources_below_spotify">Spørges ikke: Spotify er ovenfor</string>
+</resources>
diff --git a/base/app/src/main/res/values-de/extensions_strings.xml b/base/app/src/main/res/values-de/extensions_strings.xml
index 28783bdb..117eb1ec 100644
--- a/base/app/src/main/res/values-de/extensions_strings.xml
+++ b/base/app/src/main/res/values-de/extensions_strings.xml
@@ -208,4 +208,9 @@
<string name="ext_grants_title">Immer erlaubt</string>
<string name="ext_grants_note">Spotify-Änderungen, die diese Erweiterung ohne Nachfrage vornimmt. Eine widerrufen, um erneut gefragt zu werden.</string>
<string name="ext_grant_revoke">Widerrufen</string>
+ <string name="extensions_unreadable_file">Die Datei konnte nicht gelesen werden</string>
+ <string name="ext_welcome_title">%1$s ist installiert</string>
+ <string name="ext_welcome_steps">Zum Abschluss</string>
+ <string name="ext_welcome_from">Von der Erweiterung verfasst.</string>
+ <string name="ext_welcome_ok">Verstanden</string>
</resources>
diff --git a/base/app/src/main/res/values-de/immersive_detail_strings.xml b/base/app/src/main/res/values-de/immersive_detail_strings.xml
new file mode 100644
index 00000000..aef29dda
--- /dev/null
+++ b/base/app/src/main/res/values-de/immersive_detail_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_detail_pause">Pause</string>
+ <string name="immersive_detail_save">In der Bibliothek speichern</string>
+ <string name="immersive_detail_unsave">Aus der Bibliothek entfernen</string>
+ <string name="immersive_detail_find">In der Liste suchen</string>
+ <string name="immersive_detail_smart_shuffle_on">Intelligente Zufallswiedergabe an: Empfehlungen werden in die gemischte Liste eingefügt.</string>
+ <string name="immersive_detail_more">Mehr</string>
+ <string name="immersive_detail_less">Weniger</string>
+ <string name="immersive_detail_featured_on">Zu hören auf</string>
+ <string name="immersive_detail_remove_local">Aus dieser Playlist entfernen</string>
+ <string name="immersive_detail_follow">Folgen</string>
+ <string name="immersive_detail_unfollow">Entfolgen</string>
+</resources>
diff --git a/base/app/src/main/res/values-de/immersive_genius_strings.xml b/base/app/src/main/res/values-de/immersive_genius_strings.xml
new file mode 100644
index 00000000..b77ec3e7
--- /dev/null
+++ b/base/app/src/main/res/values-de/immersive_genius_strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_genius_none">Genius hat nichts zu diesem Titel.</string>
+ <string name="immersive_genius_error">Genius ist gerade nicht erreichbar.</string>
+ <string name="immersive_genius_view">Auf Genius ansehen</string>
+</resources>
diff --git a/base/app/src/main/res/values-de/immersive_glass_strings.xml b/base/app/src/main/res/values-de/immersive_glass_strings.xml
new file mode 100644
index 00000000..fa54696f
--- /dev/null
+++ b/base/app/src/main/res/values-de/immersive_glass_strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="settings_liquid_glass_title">Liquid Glass</string>
+ <string name="settings_liquid_glass_detail">Leisten verformen sich und spiegeln die Seite dahinter wie Glas</string>
+ <string name="settings_liquid_glass_unsupported">Erfordert Android 12 oder neuer</string>
+ <string name="settings_liquid_glass_reduced">Stattdessen Milchglas, solange das Telefon Unschärfe oder Animationen reduziert</string>
+ <string name="immersive_expand_tab_bar">Alle Tabs anzeigen</string>
+</resources>
diff --git a/base/app/src/main/res/values-de/immersive_lyrics_strings.xml b/base/app/src/main/res/values-de/immersive_lyrics_strings.xml
new file mode 100644
index 00000000..b83e548b
--- /dev/null
+++ b/base/app/src/main/res/values-de/immersive_lyrics_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_lyrics_instrumental">Instrumental</string>
+ <string name="immersive_lyrics_none">Keine Lyrics für diesen Titel</string>
+ <string name="immersive_queue_title">Warteschlange</string>
+ <string name="immersive_queue_now_playing">Aktuelle Wiedergabe</string>
+ <string name="immersive_queue_empty">Nichts in der Warteschlange</string>
+ <string name="immersive_queue_remove">Aus der Warteschlange entfernen</string>
+ <string name="immersive_queue_reorder">In der Warteschlange verschieben</string>
+ <string name="immersive_queue_shuffle">Zufallswiedergabe</string>
+ <string name="immersive_queue_repeat">Wiederholen</string>
+</resources>
diff --git a/base/app/src/main/res/values-de/immersive_pages_strings.xml b/base/app/src/main/res/values-de/immersive_pages_strings.xml
new file mode 100644
index 00000000..5ec40a1c
--- /dev/null
+++ b/base/app/src/main/res/values-de/immersive_pages_strings.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_pages_songs">Titel</string>
+ <string name="immersive_pages_artists">Künstler</string>
+ <string name="immersive_pages_albums">Alben</string>
+ <string name="immersive_pages_unknown_artist">Unbekannter Künstler</string>
+ <string name="immersive_pages_unknown_album">Unbekanntes Album</string>
+ <string name="immersive_pages_name_hint">Name</string>
+ <string name="immersive_pages_play_group">%1$s abspielen</string>
+</resources>
diff --git a/base/app/src/main/res/values-de/immersive_player_strings.xml b/base/app/src/main/res/values-de/immersive_player_strings.xml
new file mode 100644
index 00000000..d93661c9
--- /dev/null
+++ b/base/app/src/main/res/values-de/immersive_player_strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_player_close">Player schließen</string>
+ <string name="immersive_player_play">Wiedergabe</string>
+ <string name="immersive_player_pause">Pause</string>
+ <string name="immersive_player_previous">Zurück</string>
+ <string name="immersive_player_next">Weiter</string>
+ <string name="immersive_player_like">Zu Lieblingssongs hinzufügen</string>
+ <string name="immersive_player_unlike">Aus Lieblingssongs entfernen</string>
+ <string name="immersive_player_more">Mehr</string>
+ <string name="immersive_player_lyrics">Lyrics</string>
+ <string name="immersive_player_lyrics_close">Lyrics schließen</string>
+ <string name="immersive_player_queue">Als Nächstes</string>
+ <string name="immersive_player_queue_close">Warteschlange schließen</string>
+ <string name="immersive_player_devices">Geräte</string>
+ <string name="immersive_player_shuffle_on">Zufallswiedergabe: an</string>
+ <string name="immersive_player_shuffle_off">Zufallswiedergabe: aus</string>
+ <string name="immersive_player_repeat_off">Wiederholen: aus</string>
+ <string name="immersive_player_repeat_all">Wiederholen: alle</string>
+ <string name="immersive_player_repeat_one">Wiederholen: Titel</string>
+ <string name="immersive_player_volume_down">Leiser</string>
+ <string name="immersive_player_volume_up">Lauter</string>
+ <string name="immersive_player_ad">Werbung</string>
+ <string name="immersive_player_explicit">Explizit</string>
+ <string name="immersive_player_added_to_liked">Zu Lieblingssongs hinzugefügt</string>
+ <string name="immersive_player_mini_player">Player öffnen</string>
+</resources>
diff --git a/base/app/src/main/res/values-de/immersive_screens_strings.xml b/base/app/src/main/res/values-de/immersive_screens_strings.xml
new file mode 100644
index 00000000..278067c5
--- /dev/null
+++ b/base/app/src/main/res/values-de/immersive_screens_strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_screens_account">Konto</string>
+ <string name="immersive_screens_account_page">Kontoseite</string>
+ <string name="immersive_screens_account_page_detail">Abo, Datenschutz und Geräte</string>
+ <string name="immersive_screens_top_result">Top-Ergebnis</string>
+ <string name="immersive_screens_reset_order">Zurück zur Standardreihenfolge</string>
+</resources>
diff --git a/base/app/src/main/res/values-de/immersive_shell_strings.xml b/base/app/src/main/res/values-de/immersive_shell_strings.xml
new file mode 100644
index 00000000..6a0b2eec
--- /dev/null
+++ b/base/app/src/main/res/values-de/immersive_shell_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_shell_back">Zurück</string>
+ <string name="immersive_shell_more">Weitere Optionen</string>
+ <string name="immersive_shell_search_hint">Suchen</string>
+ <string name="immersive_shell_search_clear">Suche löschen</string>
+ <string name="immersive_shell_play">Wiedergabe</string>
+ <string name="immersive_shell_shuffle">Zufallswiedergabe</string>
+ <string name="immersive_shell_see_all">Alle anzeigen</string>
+ <string name="immersive_shell_now_playing">Aktuelle Wiedergabe</string>
+ <string name="immersive_shell_explicit">Explizit</string>
+</resources>
diff --git a/base/app/src/main/res/values-de/myspoti_strings.xml b/base/app/src/main/res/values-de/myspoti_strings.xml
index 46d26f9b..346b6b31 100644
--- a/base/app/src/main/res/values-de/myspoti_strings.xml
+++ b/base/app/src/main/res/values-de/myspoti_strings.xml
@@ -440,4 +440,85 @@
<string name="playlist_member_owner">Ersteller</string>
<string name="playlist_member_collab">Mitwirkende*r</string>
<string name="playlist_members_more">%1$s und %2$d weitere</string>
+ <string name="downloads_lists">Alben und Playlists</string>
+ <string name="downloads_singles">Titel</string>
+ <string name="downloads_kind_album">Album</string>
+ <string name="downloads_kind_playlist">Playlist</string>
+ <string name="downloads_kind_liked">Lieblingssongs</string>
+ <string name="settings_tab_appearance">Darstellung</string>
+ <string name="settings_tab_about">Info</string>
+ <string name="settings_about_version">Version %1$s</string>
+ <string name="settings_update_available">Version %1$s verfügbar</string>
+ <string name="settings_update_available_detail">Tippen, um sie herunterzuladen und zu installieren</string>
+ <string name="setup_look_title">Wähle deinen Look</string>
+ <string name="setup_look_subtitle">Sieh dir die Vorschau an und wähle den, der dir gefällt.</string>
+ <string name="look_classic">Klassisch</string>
+ <string name="look_classic_detail">Dunkler Player im Farbton des Covers, runder Wiedergabeknopf</string>
+ <string name="look_immersive">Immersiv</string>
+ <string name="look_immersive_detail">Großes Cover, Albumfarben, animierte Lyrics</string>
+ <string name="setup_look_preview">Vorschau des Looks „%1$s“</string>
+ <string name="setup_look_tap_hint">Tippen, um die Vorschau anzuhalten, wischen zum Wechseln</string>
+ <string name="setup_look_still_hint">Animationen sind auf diesem Telefon deaktiviert: drei Standbilder</string>
+ <string name="setup_look_still_player">Player</string>
+ <string name="setup_look_still_paused">Pausiert</string>
+ <string name="setup_look_still_lyrics">Lyrics</string>
+ <string name="look_demo_all">Alle</string>
+ <string name="look_demo_music">Musik</string>
+ <string name="look_demo_podcasts">Podcasts</string>
+ <string name="look_demo_section">Für dich gemacht</string>
+ <string name="settings_update_refresh">Nach Updates suchen</string>
+ <string name="settings_update_uptodate_now">Aktuell (gerade geprüft)</string>
+ <string name="settings_update_last_checked">Zuletzt geprüft: %1$s</string>
+ <string name="settings_update_never">Nie geprüft</string>
+ <string name="settings_update_rate_limited">GitHub begrenzt gerade die Anfragen. Versuche es in ein paar Minuten erneut.</string>
+ <string name="settings_update_failed">Updates konnten nicht geprüft werden. Prüfe deine Verbindung.</string>
+ <string name="drm_missing">Wiedergabe ist hier nicht möglich: Das Android System WebView dieses Telefons hat kein funktionierendes Widevine-DRM, das Spotify benötigt. Aktualisiere Android System WebView und Chrome im Play Store und wähle es unter Einstellungen &gt; Entwickleroptionen &gt; WebView-Implementierung aus.</string>
+ <string name="song_unavailable_skipped">%1$s ist nicht verfügbar und wurde übersprungen.</string>
+ <string name="song_unavailable">%1$s ist nicht verfügbar.</string>
+ <string name="songs_skipped_by_spotify">Spotify hat immer wieder Titel übersprungen, die es nicht abspielen konnte, daher wurde die Wiedergabe pausiert. Tippe auf Wiedergabe, um es erneut zu versuchen, oder prüfe dein Konto und deine Verbindung.</string>
+ <string name="playlist_leave">Playlist verlassen</string>
+ <string name="playlist_leave_confirm">%1$s verlassen? Du bist dann kein Mitwirkender mehr und kannst keine Titel mehr hinzufügen oder entfernen. Um wieder beizutreten, brauchst du einen neuen Einladungslink.</string>
+ <string name="playlist_leave_button">Verlassen</string>
+ <string name="playlist_member_listener">Zuhörer</string>
+ <string name="playlist_member_remove_collab">Als Mitwirkenden entfernen</string>
+ <string name="playlist_member_make_collab">Zum Mitwirkenden machen</string>
+ <string name="playlist_member_remove">Aus der Playlist entfernen</string>
+ <string name="playlist_stop_collab_private">Zusammenarbeit an %1$s beenden? Die Mitwirkenden werden zu Zuhörern: Sie können sie weiterhin hören, aber keine Titel mehr hinzufügen oder entfernen. Bereits geteilte Einladungslinks bleiben bis zu ihrem Ablauf (bis zu 7 Tage) gültig und können nicht widerrufen werden.</string>
+ <string name="playlist_stop_collab_public">Zusammenarbeit an %1$s beenden? Die Mitwirkenden werden aus der Playlist entfernt. Bereits geteilte Einladungslinks bleiben bis zu ihrem Ablauf (bis zu 7 Tage) gültig und können nicht widerrufen werden.</string>
+ <string name="library_chip_playlists">Playlists</string>
+ <string name="library_chip_artists">Künstler</string>
+ <string name="library_chip_albums">Alben</string>
+ <string name="library_chip_songs">Titel</string>
+ <string name="add_playlist_to_playlist">Playlist zu einer anderen Playlist hinzufügen</string>
+ <string name="add_collection_reading">Titel werden gelesen…</string>
+ <string name="add_collection_nothing">Nichts hinzuzufügen</string>
+ <string name="add_collection_done">%1$d Titel zu %2$s hinzugefügt</string>
+ <string name="duplicate_title_some">Einige sind bereits enthalten</string>
+ <string name="duplicate_title_all">Bereits enthalten</string>
+ <string name="duplicate_text_some">Einige dieser Titel sind bereits in %1$s.</string>
+ <string name="duplicate_text_all">Diese Titel sind bereits in %1$s.</string>
+ <string name="duplicate_add_all">Alle hinzufügen</string>
+ <string name="duplicate_add_new">Neue hinzufügen</string>
+ <string name="duplicate_add_anyway">Trotzdem hinzufügen</string>
+ <string name="duplicate_dont_add">Nicht hinzufügen</string>
+ <string name="settings_music_video_title">Musikvideos</string>
+ <string name="settings_music_video_detail">Die Videotaste im Player und Clips, die von selbst starten. Aus: nur Audio und Canvas.</string>
+ <string name="downloads_need_source">Downloads brauchen eine Quell-Erweiterung. Installiere eine unter Einstellungen, Erweiterungen.</string>
+ <string name="downloads_source_row_title">Download-Quelle</string>
+ <string name="downloads_source_row_on">Eine Erweiterung liefert die Dateien. Tippen, um Erweiterungen zu verwalten.</string>
+ <string name="downloads_source_row_off">Noch keine: installiere eine Download-Quell-Erweiterung.</string>
+ <string name="profile_block">Blockieren</string>
+ <string name="profile_unblock">Blockierung aufheben</string>
+ <string name="profile_block_title">%1$s blockieren?</string>
+ <string name="profile_block_confirm">%1$s kann dir nicht mehr folgen und dein Profil sowie deine öffentlichen Playlists nicht mehr sehen. Du kannst die Blockierung jederzeit im Profil aufheben.</string>
+ <string name="profile_blocked">Du hast diesen Nutzer blockiert</string>
+ <string name="profile_block_failed">Blockierung konnte nicht geändert werden, versuche es erneut</string>
+ <string name="profile_more_options">Weitere Optionen</string>
+ <string name="settings_look_title">Look</string>
+ <string name="look_offer_title">Neuer Look verfügbar</string>
+ <string name="look_offer_try">Immersiv testen</string>
+ <string name="look_offer_keep">Klassisch behalten</string>
+ <string name="look_offer_note">Du kannst es später unter Einstellungen &gt; Anzeige und Sprache ändern.</string>
+ <string name="settings_headset_skip_title">Kopfhörertasten springen 15 s bei Podcasts</string>
+ <string name="settings_headset_skip_detail">Aus: sie wechseln zur nächsten oder vorherigen Folge</string>
</resources>
diff --git a/base/app/src/main/res/values-de/security_strings.xml b/base/app/src/main/res/values-de/security_strings.xml
new file mode 100644
index 00000000..1e872259
--- /dev/null
+++ b/base/app/src/main/res/values-de/security_strings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="action_playback_mirror">Hält Spotify hier lautlos am Laufen; zählt Wiedergaben auf deinem Konto</string>
+ <string name="mirror_indicator">Spotify gespiegelt von %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-de/sources_strings.xml b/base/app/src/main/res/values-de/sources_strings.xml
new file mode 100644
index 00000000..6491da47
--- /dev/null
+++ b/base/app/src/main/res/values-de/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Audioquellen</string>
+ <string name="sources_download_title">Download-Quellen</string>
+ <string name="sources_audio_footer">Wird von oben nach unten für jeden Titel abgefragt: Die erste Quelle, die ihn hat, spielt ihn ab. Mit den Pfeilen änderst du die Reihenfolge.</string>
+ <string name="sources_download_footer">Wird von oben nach unten abgefragt: Die erste Quelle, die den Titel hat, liefert die Datei. Mit den Pfeilen änderst du die Reihenfolge.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Wird abgespielt, wenn keine Quelle darüber den Titel hat</string>
+ <string name="sources_ready">Bereit</string>
+ <string name="sources_details_show">Details anzeigen</string>
+ <string name="sources_details_hide">Details ausblenden</string>
+ <string name="sources_detail_version">Version %1$s · von %2$s</string>
+ <string name="sources_last_used">Zuletzt: %1$s, %2$s</string>
+ <string name="sources_open">Erweiterung öffnen</string>
+ <string name="sources_order_hint">Quellen werden in der in den Einstellungen festgelegten Reihenfolge abgefragt (Wiedergabe, Downloads).</string>
+ <string name="sources_below_spotify">Nicht abgefragt: Spotify steht darüber</string>
+</resources>
diff --git a/base/app/src/main/res/values-de/stats_strings.xml b/base/app/src/main/res/values-de/stats_strings.xml
new file mode 100644
index 00000000..39a53752
--- /dev/null
+++ b/base/app/src/main/res/values-de/stats_strings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="stats_tab_spotify">Auf Spotify</string>
+ <string name="stats_tab_phone">Auf diesem Telefon</string>
+ <string name="stats_range_short">Letzte 4 Wochen</string>
+ <string name="stats_range_medium">Letzte 6 Monate</string>
+ <string name="stats_range_long">Letztes Jahr</string>
+ <string name="stats_artists_ranked">%1$d Künstler in deinem Hörverlauf</string>
+ <string name="stats_empty">Spotify hat für diesen Zeitraum noch keine Top-Künstler oder -Titel. Hör weiter und schau später wieder vorbei.</string>
+ <string name="stats_failed">Spotify hat deine Statistiken nicht gesendet.</string>
+ <string name="stats_spotify_note">Von Spotify gerankt, basierend auf allem, was dieses Konto auf jedem Gerät abgespielt hat. Spotify teilt weder Wiedergabezahlen noch Hörminuten: Die Minuten unter „Auf diesem Telefon“ sind Myspotis eigene Zählung.</string>
+ <string name="stats_weekly_minutes">Minuten pro Woche</string>
+ <string name="stats_this_week">Diese Woche: %1$d Min.</string>
+ <string name="stats_listening_stats">Hörstatistiken</string>
+ <string name="friends_title">Freundesaktivität</string>
+ <string name="friends_detail">Was die Personen hören, denen du folgst</string>
+ <string name="friends_now">Jetzt</string>
+ <string name="friends_empty">Noch keine Freundesaktivität. Freunde, denen du folgst und die ihre Höraktivität auf Spotify teilen, erscheinen hier.</string>
+ <string name="friends_failed">Spotify hat die Freundesaktivität nicht gesendet.</string>
+ <string name="friends_refresh">Aktualisieren</string>
+ <string name="artist_top_short">Dein Künstler Nr. %1$d der letzten 4 Wochen</string>
+ <string name="artist_top_medium">Dein Künstler Nr. %1$d der letzten 6 Monate</string>
+ <string name="artist_top_long">Dein Künstler Nr. %1$d des letzten Jahres</string>
+</resources>
diff --git a/base/app/src/main/res/values-de/strings.xml b/base/app/src/main/res/values-de/strings.xml
index cd7a5971..93ac1b77 100644
--- a/base/app/src/main/res/values-de/strings.xml
+++ b/base/app/src/main/res/values-de/strings.xml
@@ -20,4 +20,5 @@
<string name="account_page_title">Spotify-Konto</string>
<string name="account_page_detail">Abo, Datenschutz und Geräte, auf spotify.com</string>
<string name="player_source_downloaded">Heruntergeladen</string>
+ <string name="extension_change_write">Darf jetzt auch an Spotify senden: %1$s</string>
</resources>
diff --git a/base/app/src/main/res/values-de/update_consent_strings.xml b/base/app/src/main/res/values-de/update_consent_strings.xml
new file mode 100644
index 00000000..5e64cd59
--- /dev/null
+++ b/base/app/src/main/res/values-de/update_consent_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="update_code_title">Der Code von %1$s hat sich geändert (%2$d Zeilen, +%3$d/−%4$d)</string>
+ <string name="update_code_body">Diese Erweiterung besitzt mächtige Rechte (kritische Aktionen oder weiter Netzwerkzugriff); neuer Code wird nie ohne dein OK ausgeführt.</string>
+ <string name="update_code_files">Geänderte Dateien: %1$s</string>
+ <string name="update_code_update">Aktualisieren</string>
+ <string name="update_code_later">Jetzt nicht</string>
+ <string name="update_check_waiting">Update gefunden: Es wird in 24 Stunden automatisch angewendet</string>
+ <string name="update_check_repo_changed">Update abgelehnt: Das Repository hat den Besitzer gewechselt</string>
+ <string name="update_repo_changed_title">Repository hat den Besitzer gewechselt</string>
+ <string name="update_repo_changed_body">Dieses Repository wurde unter demselben Namen neu registriert oder übertragen; seine Updates sind blockiert. Deinstalliere es oder installiere es nur neu, wenn du dem neuen Besitzer vertraust.</string>
+ <string name="update_author_owner">von %1$s · Repository von %2$s</string>
+ <string name="update_author_unverified">von %1$s · nicht überprüft</string>
+</resources>
diff --git a/base/app/src/main/res/values-el/extensions_strings.xml b/base/app/src/main/res/values-el/extensions_strings.xml
index aa4cb63e..3739c4c6 100644
--- a/base/app/src/main/res/values-el/extensions_strings.xml
+++ b/base/app/src/main/res/values-el/extensions_strings.xml
@@ -208,4 +208,9 @@
<string name="ext_grants_title">Πάντα επιτρεπόμενα</string>
<string name="ext_grants_note">Αλλαγές στο Spotify που κάνει αυτή η επέκταση χωρίς να ρωτήσει. Ανακαλέστε μία για να ερωτάστε ξανά.</string>
<string name="ext_grant_revoke">Ανάκληση</string>
+ <string name="extensions_unreadable_file">Δεν ήταν δυνατή η ανάγνωση του αρχείου</string>
+ <string name="ext_welcome_title">Το %1$s εγκαταστάθηκε</string>
+ <string name="ext_welcome_steps">Για να ολοκληρώσετε</string>
+ <string name="ext_welcome_from">Γράφτηκε από την επέκταση.</string>
+ <string name="ext_welcome_ok">Εντάξει</string>
</resources>
diff --git a/base/app/src/main/res/values-el/immersive_detail_strings.xml b/base/app/src/main/res/values-el/immersive_detail_strings.xml
new file mode 100644
index 00000000..50179779
--- /dev/null
+++ b/base/app/src/main/res/values-el/immersive_detail_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_detail_pause">Παύση</string>
+ <string name="immersive_detail_save">Αποθήκευση στη βιβλιοθήκη</string>
+ <string name="immersive_detail_unsave">Κατάργηση από τη βιβλιοθήκη</string>
+ <string name="immersive_detail_find">Εύρεση στη λίστα</string>
+ <string name="immersive_detail_smart_shuffle_on">Η έξυπνη τυχαία αναπαραγωγή είναι ενεργή: οι προτάσεις προστίθενται στη λίστα.</string>
+ <string name="immersive_detail_more">Περισσότερα</string>
+ <string name="immersive_detail_less">Λιγότερα</string>
+ <string name="immersive_detail_featured_on">Περιλαμβάνεται σε</string>
+ <string name="immersive_detail_remove_local">Κατάργηση από αυτήν τη λίστα αναπαραγωγής</string>
+ <string name="immersive_detail_follow">Παρακολούθηση</string>
+ <string name="immersive_detail_unfollow">Κατάργηση παρακολούθησης</string>
+</resources>
diff --git a/base/app/src/main/res/values-el/immersive_genius_strings.xml b/base/app/src/main/res/values-el/immersive_genius_strings.xml
new file mode 100644
index 00000000..50fec949
--- /dev/null
+++ b/base/app/src/main/res/values-el/immersive_genius_strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_genius_none">Το Genius δεν έχει τίποτα για αυτό το τραγούδι.</string>
+ <string name="immersive_genius_error">Το Genius δεν είναι προσβάσιμο αυτή τη στιγμή.</string>
+ <string name="immersive_genius_view">Προβολή στο Genius</string>
+</resources>
diff --git a/base/app/src/main/res/values-el/immersive_glass_strings.xml b/base/app/src/main/res/values-el/immersive_glass_strings.xml
new file mode 100644
index 00000000..4c376d71
--- /dev/null
+++ b/base/app/src/main/res/values-el/immersive_glass_strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="settings_liquid_glass_title">Liquid Glass</string>
+ <string name="settings_liquid_glass_detail">Οι γραμμές κυρτώνουν και αντανακλούν τη σελίδα πίσω τους, σαν γυαλί</string>
+ <string name="settings_liquid_glass_unsupported">Απαιτείται Android 12 ή νεότερο</string>
+ <string name="settings_liquid_glass_reduced">Αντί γι\' αυτό, αμμοβολή όταν το τηλέφωνο μειώνει τη θόλωση ή τις κινήσεις</string>
+ <string name="immersive_expand_tab_bar">Εμφάνιση όλων των καρτελών</string>
+</resources>
diff --git a/base/app/src/main/res/values-el/immersive_lyrics_strings.xml b/base/app/src/main/res/values-el/immersive_lyrics_strings.xml
new file mode 100644
index 00000000..2c42d47d
--- /dev/null
+++ b/base/app/src/main/res/values-el/immersive_lyrics_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_lyrics_instrumental">Ενόργανο</string>
+ <string name="immersive_lyrics_none">Δεν υπάρχουν στίχοι για αυτό το κομμάτι</string>
+ <string name="immersive_queue_title">Ουρά</string>
+ <string name="immersive_queue_now_playing">Αναπαράγεται τώρα</string>
+ <string name="immersive_queue_empty">Η ουρά είναι άδεια</string>
+ <string name="immersive_queue_remove">Κατάργηση από την ουρά</string>
+ <string name="immersive_queue_reorder">Μετακίνηση στην ουρά</string>
+ <string name="immersive_queue_shuffle">Τυχαία σειρά</string>
+ <string name="immersive_queue_repeat">Επανάληψη</string>
+</resources>
diff --git a/base/app/src/main/res/values-el/immersive_pages_strings.xml b/base/app/src/main/res/values-el/immersive_pages_strings.xml
new file mode 100644
index 00000000..25df0d3a
--- /dev/null
+++ b/base/app/src/main/res/values-el/immersive_pages_strings.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_pages_songs">Τραγούδια</string>
+ <string name="immersive_pages_artists">Καλλιτέχνες</string>
+ <string name="immersive_pages_albums">Άλμπουμ</string>
+ <string name="immersive_pages_unknown_artist">Άγνωστος καλλιτέχνης</string>
+ <string name="immersive_pages_unknown_album">Άγνωστο άλμπουμ</string>
+ <string name="immersive_pages_name_hint">Όνομα</string>
+ <string name="immersive_pages_play_group">Αναπαραγωγή: %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-el/immersive_player_strings.xml b/base/app/src/main/res/values-el/immersive_player_strings.xml
new file mode 100644
index 00000000..d90f5f3f
--- /dev/null
+++ b/base/app/src/main/res/values-el/immersive_player_strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_player_close">Κλείσιμο του προγράμματος αναπαραγωγής</string>
+ <string name="immersive_player_play">Αναπαραγωγή</string>
+ <string name="immersive_player_pause">Παύση</string>
+ <string name="immersive_player_previous">Προηγούμενο</string>
+ <string name="immersive_player_next">Επόμενο</string>
+ <string name="immersive_player_like">Προσθήκη στα τραγούδια που σου αρέσουν</string>
+ <string name="immersive_player_unlike">Κατάργηση από τα τραγούδια που σου αρέσουν</string>
+ <string name="immersive_player_more">Περισσότερα</string>
+ <string name="immersive_player_lyrics">Στίχοι</string>
+ <string name="immersive_player_lyrics_close">Κλείσιμο των στίχων</string>
+ <string name="immersive_player_queue">Επόμενο</string>
+ <string name="immersive_player_queue_close">Κλείσιμο της ουράς</string>
+ <string name="immersive_player_devices">Συσκευές</string>
+ <string name="immersive_player_shuffle_on">Τυχαία σειρά: ενεργή</string>
+ <string name="immersive_player_shuffle_off">Τυχαία σειρά: ανενεργή</string>
+ <string name="immersive_player_repeat_off">Επανάληψη: ανενεργή</string>
+ <string name="immersive_player_repeat_all">Επανάληψη: όλα</string>
+ <string name="immersive_player_repeat_one">Επανάληψη: ένα</string>
+ <string name="immersive_player_volume_down">Μείωση έντασης</string>
+ <string name="immersive_player_volume_up">Αύξηση έντασης</string>
+ <string name="immersive_player_ad">Διαφήμιση</string>
+ <string name="immersive_player_explicit">Ακατάλληλο περιεχόμενο</string>
+ <string name="immersive_player_added_to_liked">Προστέθηκε στα τραγούδια που σου αρέσουν</string>
+ <string name="immersive_player_mini_player">Άνοιγμα του προγράμματος αναπαραγωγής</string>
+</resources>
diff --git a/base/app/src/main/res/values-el/immersive_screens_strings.xml b/base/app/src/main/res/values-el/immersive_screens_strings.xml
new file mode 100644
index 00000000..58ea88d8
--- /dev/null
+++ b/base/app/src/main/res/values-el/immersive_screens_strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_screens_account">Λογαριασμός</string>
+ <string name="immersive_screens_account_page">Σελίδα λογαριασμού</string>
+ <string name="immersive_screens_account_page_detail">Πρόγραμμα, απόρρητο και συσκευές</string>
+ <string name="immersive_screens_top_result">Κορυφαίο αποτέλεσμα</string>
+ <string name="immersive_screens_reset_order">Επιστροφή στην προεπιλεγμένη σειρά</string>
+</resources>
diff --git a/base/app/src/main/res/values-el/immersive_shell_strings.xml b/base/app/src/main/res/values-el/immersive_shell_strings.xml
new file mode 100644
index 00000000..6f679cba
--- /dev/null
+++ b/base/app/src/main/res/values-el/immersive_shell_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_shell_back">Πίσω</string>
+ <string name="immersive_shell_more">Περισσότερες επιλογές</string>
+ <string name="immersive_shell_search_hint">Αναζήτηση</string>
+ <string name="immersive_shell_search_clear">Εκκαθάριση αναζήτησης</string>
+ <string name="immersive_shell_play">Αναπαραγωγή</string>
+ <string name="immersive_shell_shuffle">Τυχαία σειρά</string>
+ <string name="immersive_shell_see_all">Εμφάνιση όλων</string>
+ <string name="immersive_shell_now_playing">Αναπαράγεται τώρα</string>
+ <string name="immersive_shell_explicit">Ακατάλληλο περιεχόμενο</string>
+</resources>
diff --git a/base/app/src/main/res/values-el/myspoti_strings.xml b/base/app/src/main/res/values-el/myspoti_strings.xml
index f3cd0670..a871e460 100644
--- a/base/app/src/main/res/values-el/myspoti_strings.xml
+++ b/base/app/src/main/res/values-el/myspoti_strings.xml
@@ -440,4 +440,85 @@
<string name="playlist_member_owner">Δημιουργός</string>
<string name="playlist_member_collab">Συνεργάτης</string>
<string name="playlist_members_more">%1$s και %2$d ακόμα</string>
+ <string name="downloads_lists">Άλμπουμ και λίστες αναπαραγωγής</string>
+ <string name="downloads_singles">Τραγούδια</string>
+ <string name="downloads_kind_album">Άλμπουμ</string>
+ <string name="downloads_kind_playlist">Λίστα αναπαραγωγής</string>
+ <string name="downloads_kind_liked">Τραγούδια που σου αρέσουν</string>
+ <string name="settings_tab_appearance">Εμφάνιση</string>
+ <string name="settings_tab_about">Πληροφορίες</string>
+ <string name="settings_about_version">Έκδοση %1$s</string>
+ <string name="settings_update_available">Διαθέσιμη έκδοση %1$s</string>
+ <string name="settings_update_available_detail">Πατήστε για λήψη και εγκατάσταση</string>
+ <string name="setup_look_title">Επιλέξτε την εμφάνισή σας</string>
+ <string name="setup_look_subtitle">Δείτε την προεπισκόπηση και επιλέξτε αυτήν που σας αρέσει.</string>
+ <string name="look_classic">Κλασική</string>
+ <string name="look_classic_detail">Σκούρο πρόγραμμα αναπαραγωγής με χρώματα από το εξώφυλλο, στρογγυλό κουμπί αναπαραγωγής</string>
+ <string name="look_immersive">Εμβυθιστική</string>
+ <string name="look_immersive_detail">Μεγάλο εξώφυλλο, χρώματα του άλμπουμ, κινούμενοι στίχοι</string>
+ <string name="setup_look_preview">Προεπισκόπηση της εμφάνισης «%1$s»</string>
+ <string name="setup_look_tap_hint">Πατήστε την προεπισκόπηση για παύση, σύρετε για αλλαγή</string>
+ <string name="setup_look_still_hint">Οι κινήσεις είναι απενεργοποιημένες σε αυτό το τηλέφωνο: τρία στατικά καρέ</string>
+ <string name="setup_look_still_player">Πρόγραμμα αναπαραγωγής</string>
+ <string name="setup_look_still_paused">Σε παύση</string>
+ <string name="setup_look_still_lyrics">Στίχοι</string>
+ <string name="look_demo_all">Όλα</string>
+ <string name="look_demo_music">Μουσική</string>
+ <string name="look_demo_podcasts">Podcast</string>
+ <string name="look_demo_section">Φτιαγμένα για εσάς</string>
+ <string name="settings_update_refresh">Έλεγχος για ενημερώσεις</string>
+ <string name="settings_update_uptodate_now">Ενημερωμένο (έλεγχος μόλις τώρα)</string>
+ <string name="settings_update_last_checked">Τελευταίος έλεγχος: %1$s</string>
+ <string name="settings_update_never">Δεν έχει γίνει έλεγχος</string>
+ <string name="settings_update_rate_limited">Το GitHub περιορίζει αυτήν τη στιγμή τα αιτήματα. Δοκιμάστε ξανά σε λίγα λεπτά.</string>
+ <string name="settings_update_failed">Δεν ήταν δυνατός ο έλεγχος για ενημερώσεις. Ελέγξτε τη σύνδεσή σας.</string>
+ <string name="drm_missing">Η αναπαραγωγή δεν είναι δυνατή εδώ: το Android System WebView αυτού του τηλεφώνου δεν διαθέτει λειτουργικό Widevine DRM, το οποίο απαιτεί το Spotify. Ενημερώστε το Android System WebView και το Chrome στο Play Store και επιλέξτε το στις Ρυθμίσεις &gt; Επιλογές προγραμματιστή &gt; Υλοποίηση WebView.</string>
+ <string name="song_unavailable_skipped">Το «%1$s» δεν είναι διαθέσιμο και παραλείφθηκε.</string>
+ <string name="song_unavailable">Το «%1$s» δεν είναι διαθέσιμο.</string>
+ <string name="songs_skipped_by_spotify">Το Spotify συνέχιζε να παραλείπει τραγούδια που δεν μπορούσε να αναπαραγάγει, οπότε η αναπαραγωγή τέθηκε σε παύση. Πατήστε αναπαραγωγή για νέα προσπάθεια ή ελέγξτε τον λογαριασμό και τη σύνδεσή σας.</string>
+ <string name="playlist_leave">Αποχώρηση από τη λίστα αναπαραγωγής</string>
+ <string name="playlist_leave_confirm">Αποχώρηση από το «%1$s»; Δεν θα είστε πλέον συνεργάτης και δεν θα μπορείτε να προσθέτετε ή να αφαιρείτε τραγούδια. Για να ξαναμπείτε, θα χρειαστείτε νέο σύνδεσμο πρόσκλησης.</string>
+ <string name="playlist_leave_button">Αποχώρηση</string>
+ <string name="playlist_member_listener">Ακροατής</string>
+ <string name="playlist_member_remove_collab">Κατάργηση ως συνεργάτη</string>
+ <string name="playlist_member_make_collab">Ορισμός ως συνεργάτη</string>
+ <string name="playlist_member_remove">Κατάργηση από τη λίστα αναπαραγωγής</string>
+ <string name="playlist_stop_collab_private">Διακοπή συνεργασίας στο «%1$s»; Οι συνεργάτες γίνονται ακροατές: μπορούν ακόμη να την ακούν, αλλά δεν προσθέτουν ή αφαιρούν τραγούδια. Οι σύνδεσμοι πρόσκλησης που έχουν ήδη κοινοποιηθεί ισχύουν μέχρι να λήξουν (έως 7 ημέρες) και δεν μπορούν να ακυρωθούν.</string>
+ <string name="playlist_stop_collab_public">Διακοπή συνεργασίας στο «%1$s»; Οι συνεργάτες αφαιρούνται από τη λίστα αναπαραγωγής. Οι σύνδεσμοι πρόσκλησης που έχουν ήδη κοινοποιηθεί ισχύουν μέχρι να λήξουν (έως 7 ημέρες) και δεν μπορούν να ακυρωθούν.</string>
+ <string name="library_chip_playlists">Λίστες αναπαραγωγής</string>
+ <string name="library_chip_artists">Καλλιτέχνες</string>
+ <string name="library_chip_albums">Άλμπουμ</string>
+ <string name="library_chip_songs">Τραγούδια</string>
+ <string name="add_playlist_to_playlist">Προσθήκη λίστας αναπαραγωγής σε άλλη λίστα</string>
+ <string name="add_collection_reading">Ανάγνωση των τραγουδιών…</string>
+ <string name="add_collection_nothing">Δεν υπάρχει τίποτα για προσθήκη</string>
+ <string name="add_collection_done">Προστέθηκαν %1$d τραγούδια στο «%2$s»</string>
+ <string name="duplicate_title_some">Ορισμένα έχουν ήδη προστεθεί</string>
+ <string name="duplicate_title_all">Έχουν ήδη προστεθεί</string>
+ <string name="duplicate_text_some">Ορισμένα από αυτά τα τραγούδια υπάρχουν ήδη στο «%1$s».</string>
+ <string name="duplicate_text_all">Αυτά τα τραγούδια υπάρχουν ήδη στο «%1$s».</string>
+ <string name="duplicate_add_all">Προσθήκη όλων</string>
+ <string name="duplicate_add_new">Προσθήκη των νέων</string>
+ <string name="duplicate_add_anyway">Προσθήκη ούτως ή άλλως</string>
+ <string name="duplicate_dont_add">Να μην προστεθούν</string>
+ <string name="settings_music_video_title">Μουσικά βίντεο</string>
+ <string name="settings_music_video_detail">Το κουμπί βίντεο στο πρόγραμμα αναπαραγωγής και τα κλιπ που ξεκινούν μόνα τους. Ανενεργό: μόνο ήχος και Canvas.</string>
+ <string name="downloads_need_source">Οι λήψεις χρειάζονται μια επέκταση πηγής. Εγκαταστήστε μία στις Ρυθμίσεις, Επεκτάσεις.</string>
+ <string name="downloads_source_row_title">Πηγή λήψεων</string>
+ <string name="downloads_source_row_on">Μια επέκταση παρέχει τα αρχεία. Πατήστε για διαχείριση των επεκτάσεων.</string>
+ <string name="downloads_source_row_off">Καμία ακόμη: εγκαταστήστε μια επέκταση πηγής λήψεων.</string>
+ <string name="profile_block">Αποκλεισμός</string>
+ <string name="profile_unblock">Άρση αποκλεισμού</string>
+ <string name="profile_block_title">Αποκλεισμός του χρήστη %1$s;</string>
+ <string name="profile_block_confirm">Ο χρήστης %1$s δεν θα μπορεί να σας ακολουθεί ή να βλέπει το προφίλ και τις δημόσιες λίστες αναπαραγωγής σας. Μπορείτε να άρετε τον αποκλεισμό από το προφίλ του οποιαδήποτε στιγμή.</string>
+ <string name="profile_blocked">Αποκλείσατε αυτόν τον χρήστη</string>
+ <string name="profile_block_failed">Δεν ήταν δυνατή η αλλαγή του αποκλεισμού, δοκιμάστε ξανά</string>
+ <string name="profile_more_options">Περισσότερες επιλογές</string>
+ <string name="settings_look_title">Εμφάνιση</string>
+ <string name="look_offer_title">Διαθέσιμη νέα εμφάνιση</string>
+ <string name="look_offer_try">Δοκιμή Εμβυθιστικής</string>
+ <string name="look_offer_keep">Διατήρηση Κλασικής</string>
+ <string name="look_offer_note">Μπορείτε να την αλλάξετε αργότερα στις Ρυθμίσεις &gt; Οθόνη και γλώσσα.</string>
+ <string name="settings_headset_skip_title">Κουμπιά ακουστικών: 15 δ στα podcast</string>
+ <string name="settings_headset_skip_detail">Απενεργοποιημένο: πηγαίνουν στο επόμενο ή προηγούμενο επεισόδιο</string>
</resources>
diff --git a/base/app/src/main/res/values-el/security_strings.xml b/base/app/src/main/res/values-el/security_strings.xml
new file mode 100644
index 00000000..e01476ca
--- /dev/null
+++ b/base/app/src/main/res/values-el/security_strings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="action_playback_mirror">Κρατά το Spotify να παίζει αθόρυβα εδώ· μετρά ακροάσεις στον λογαριασμό σας</string>
+ <string name="mirror_indicator">Spotify σε αντικατοπτρισμό από %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-el/sources_strings.xml b/base/app/src/main/res/values-el/sources_strings.xml
new file mode 100644
index 00000000..94796f8e
--- /dev/null
+++ b/base/app/src/main/res/values-el/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Πηγές ήχου</string>
+ <string name="sources_download_title">Πηγές λήψης</string>
+ <string name="sources_audio_footer">Ερωτώνται από πάνω προς τα κάτω για κάθε τραγούδι: η πρώτη που το έχει το παίζει. Χρησιμοποιήστε τα βέλη για να αλλάξετε τη σειρά.</string>
+ <string name="sources_download_footer">Ερωτώνται από πάνω προς τα κάτω: η πρώτη πηγή που έχει το τραγούδι δίνει το αρχείο. Χρησιμοποιήστε τα βέλη για να αλλάξετε τη σειρά.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Παίζει όταν καμία πηγή από πάνω δεν έχει το τραγούδι</string>
+ <string name="sources_ready">Έτοιμο</string>
+ <string name="sources_details_show">Εμφάνιση λεπτομερειών</string>
+ <string name="sources_details_hide">Απόκρυψη λεπτομερειών</string>
+ <string name="sources_detail_version">Έκδοση %1$s · από %2$s</string>
+ <string name="sources_last_used">Τελευταία: %1$s, %2$s</string>
+ <string name="sources_open">Άνοιγμα της επέκτασης</string>
+ <string name="sources_order_hint">Οι πηγές ερωτώνται με τη σειρά που έχει οριστεί στις Ρυθμίσεις (Αναπαραγωγή, Λήψεις).</string>
+ <string name="sources_below_spotify">Δεν ερωτάται: το Spotify είναι από πάνω</string>
+</resources>
diff --git a/base/app/src/main/res/values-el/stats_strings.xml b/base/app/src/main/res/values-el/stats_strings.xml
new file mode 100644
index 00000000..0ff82348
--- /dev/null
+++ b/base/app/src/main/res/values-el/stats_strings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="stats_tab_spotify">Στο Spotify</string>
+ <string name="stats_tab_phone">Σε αυτό το τηλέφωνο</string>
+ <string name="stats_range_short">Τελευταίες 4 εβδομάδες</string>
+ <string name="stats_range_medium">Τελευταίοι 6 μήνες</string>
+ <string name="stats_range_long">Τελευταίο έτος</string>
+ <string name="stats_artists_ranked">%1$d καλλιτέχνες στο ιστορικό ακρόασής σας</string>
+ <string name="stats_empty">Το Spotify δεν έχει ακόμη κορυφαίους καλλιτέχνες ή κομμάτια για αυτό το διάστημα. Συνεχίστε να ακούτε και ελέγξτε ξανά αργότερα.</string>
+ <string name="stats_failed">Το Spotify δεν έστειλε τα στατιστικά σας.</string>
+ <string name="stats_spotify_note">Κατάταξη από το Spotify βάσει όσων αναπαρήγαγε αυτός ο λογαριασμός, σε κάθε συσκευή. Το Spotify δεν μοιράζεται αναπαραγωγές ή λεπτά ακρόασης: τα λεπτά στο «Σε αυτό το τηλέφωνο» είναι η δική μέτρηση του Myspoti.</string>
+ <string name="stats_weekly_minutes">Λεπτά ανά εβδομάδα</string>
+ <string name="stats_this_week">Αυτή την εβδομάδα: %1$d λεπτά</string>
+ <string name="stats_listening_stats">Στατιστικά ακρόασης</string>
+ <string name="friends_title">Δραστηριότητα φίλων</string>
+ <string name="friends_detail">Τι ακούν οι άνθρωποι που ακολουθείτε</string>
+ <string name="friends_now">Τώρα</string>
+ <string name="friends_empty">Δεν υπάρχει ακόμη δραστηριότητα φίλων. Οι φίλοι που ακολουθείτε και μοιράζονται τη δραστηριότητα ακρόασής τους στο Spotify εμφανίζονται εδώ.</string>
+ <string name="friends_failed">Το Spotify δεν έστειλε τη δραστηριότητα των φίλων.</string>
+ <string name="friends_refresh">Ανανέωση</string>
+ <string name="artist_top_short">Ο υπ\' αριθμόν %1$d καλλιτέχνης σας των τελευταίων 4 εβδομάδων</string>
+ <string name="artist_top_medium">Ο υπ\' αριθμόν %1$d καλλιτέχνης σας των τελευταίων 6 μηνών</string>
+ <string name="artist_top_long">Ο υπ\' αριθμόν %1$d καλλιτέχνης σας του τελευταίου έτους</string>
+</resources>
diff --git a/base/app/src/main/res/values-el/strings.xml b/base/app/src/main/res/values-el/strings.xml
index 6248e256..9a3143dc 100644
--- a/base/app/src/main/res/values-el/strings.xml
+++ b/base/app/src/main/res/values-el/strings.xml
@@ -23,4 +23,5 @@
<string name="account_page_title">Λογαριασμός Spotify</string>
<string name="account_page_detail">Πρόγραμμα, απόρρητο και συσκευές, στο spotify.com</string>
<string name="player_source_downloaded">Έχει ληφθεί</string>
+ <string name="extension_change_write">Μπορεί πλέον να στέλνει και στο Spotify: %1$s</string>
</resources>
diff --git a/base/app/src/main/res/values-el/update_consent_strings.xml b/base/app/src/main/res/values-el/update_consent_strings.xml
new file mode 100644
index 00000000..9184c8d5
--- /dev/null
+++ b/base/app/src/main/res/values-el/update_consent_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="update_code_title">Ο κώδικας του %1$s άλλαξε (%2$d γραμμές, +%3$d/−%4$d)</string>
+ <string name="update_code_body">Αυτή η επέκταση έχει ισχυρά δικαιώματα (κρίσιμες ενέργειες ή ευρεία πρόσβαση στο δίκτυο), οπότε νέος κώδικας δεν εκτελείται ποτέ χωρίς την έγκρισή σας.</string>
+ <string name="update_code_files">Αρχεία που άλλαξαν: %1$s</string>
+ <string name="update_code_update">Ενημέρωση</string>
+ <string name="update_code_later">Όχι τώρα</string>
+ <string name="update_check_waiting">Βρέθηκε ενημέρωση: θα εφαρμοστεί μόνη της σε 24 ώρες</string>
+ <string name="update_check_repo_changed">Η ενημέρωση απορρίφθηκε: το αποθετήριο άλλαξε ιδιοκτήτη</string>
+ <string name="update_repo_changed_title">Το αποθετήριο άλλαξε ιδιοκτήτη</string>
+ <string name="update_repo_changed_body">Αυτό το αποθετήριο καταχωρήθηκε ξανά ή μεταφέρθηκε με το ίδιο όνομα, γι\'αυτό οι ενημερώσεις του έχουν μπλοκαριστεί. Απεγκαταστήστε το ή εγκαταστήστε το ξανά μόνο αν εμπιστεύεστε τον νέο ιδιοκτήτη.</string>
+ <string name="update_author_owner">από %1$s · αποθετήριο του %2$s</string>
+ <string name="update_author_unverified">από %1$s · μη επαληθευμένο</string>
+</resources>
diff --git a/base/app/src/main/res/values-en-rGB/sources_strings.xml b/base/app/src/main/res/values-en-rGB/sources_strings.xml
new file mode 100644
index 00000000..cecd4f68
--- /dev/null
+++ b/base/app/src/main/res/values-en-rGB/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Audio sources</string>
+ <string name="sources_download_title">Download sources</string>
+ <string name="sources_audio_footer">Asked from top to bottom for each song: the first one that has it plays it. Use the arrows to change the order.</string>
+ <string name="sources_download_footer">Asked from top to bottom: the first one that has the song gives the file. Use the arrows to change the order.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Plays when no source above it has the song</string>
+ <string name="sources_ready">Ready</string>
+ <string name="sources_details_show">Show details</string>
+ <string name="sources_details_hide">Hide details</string>
+ <string name="sources_detail_version">Version %1$s · by %2$s</string>
+ <string name="sources_last_used">Last: %1$s, %2$s</string>
+ <string name="sources_open">Open the extension</string>
+ <string name="sources_order_hint">Sources are asked in the order set in Settings (Playback, Downloads).</string>
+ <string name="sources_below_spotify">Not asked: Spotify is above</string>
+</resources>
diff --git a/base/app/src/main/res/values-es-rAR/sources_strings.xml b/base/app/src/main/res/values-es-rAR/sources_strings.xml
new file mode 100644
index 00000000..a275ee28
--- /dev/null
+++ b/base/app/src/main/res/values-es-rAR/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Fuentes de audio</string>
+ <string name="sources_download_title">Fuentes de descarga</string>
+ <string name="sources_audio_footer">Se consultan de arriba abajo para cada canción: la primera que la tenga la reproduce. Usá las flechas para cambiar el orden.</string>
+ <string name="sources_download_footer">Se consultan de arriba abajo: la primera fuente que tenga la canción entrega el archivo. Usá las flechas para cambiar el orden.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Se reproduce cuando ninguna fuente de arriba tiene la canción</string>
+ <string name="sources_ready">Lista</string>
+ <string name="sources_details_show">Mostrar detalles</string>
+ <string name="sources_details_hide">Ocultar detalles</string>
+ <string name="sources_detail_version">Versión %1$s · por %2$s</string>
+ <string name="sources_last_used">Última: %1$s, %2$s</string>
+ <string name="sources_open">Abrir la extensión</string>
+ <string name="sources_order_hint">Las fuentes se consultan en el orden definido en Configuración (Reproducción, Descargas).</string>
+ <string name="sources_below_spotify">No se consulta: Spotify está arriba</string>
+</resources>
diff --git a/base/app/src/main/res/values-es-rMX/sources_strings.xml b/base/app/src/main/res/values-es-rMX/sources_strings.xml
new file mode 100644
index 00000000..dd9521ef
--- /dev/null
+++ b/base/app/src/main/res/values-es-rMX/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Fuentes de audio</string>
+ <string name="sources_download_title">Fuentes de descarga</string>
+ <string name="sources_audio_footer">Se consultan de arriba hacia abajo para cada canción: la primera que la tenga la reproduce. Usa las flechas para cambiar el orden.</string>
+ <string name="sources_download_footer">Se consultan de arriba hacia abajo: la primera fuente que tenga la canción entrega el archivo. Usa las flechas para cambiar el orden.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Se reproduce cuando ninguna fuente de arriba tiene la canción</string>
+ <string name="sources_ready">Listo</string>
+ <string name="sources_details_show">Mostrar detalles</string>
+ <string name="sources_details_hide">Ocultar detalles</string>
+ <string name="sources_detail_version">Versión %1$s · por %2$s</string>
+ <string name="sources_last_used">Última: %1$s, %2$s</string>
+ <string name="sources_open">Abrir la extensión</string>
+ <string name="sources_order_hint">Las fuentes se consultan en el orden definido en Configuración (Reproducción, Descargas).</string>
+ <string name="sources_below_spotify">No se consulta: Spotify está arriba</string>
+</resources>
diff --git a/base/app/src/main/res/values-es/extensions_strings.xml b/base/app/src/main/res/values-es/extensions_strings.xml
index aaedf9cc..de5ef916 100644
--- a/base/app/src/main/res/values-es/extensions_strings.xml
+++ b/base/app/src/main/res/values-es/extensions_strings.xml
@@ -208,4 +208,9 @@
<string name="ext_grants_title">Siempre permitido</string>
<string name="ext_grants_note">Cambios en Spotify que esta extensión hace sin preguntar. Revocar uno hace que vuelva a pedir confirmación.</string>
<string name="ext_grant_revoke">Revocar</string>
+ <string name="extensions_unreadable_file">No se pudo leer el archivo</string>
+ <string name="ext_welcome_title">%1$s está instalada</string>
+ <string name="ext_welcome_steps">Para terminar</string>
+ <string name="ext_welcome_from">Escrito por la extensión.</string>
+ <string name="ext_welcome_ok">Entendido</string>
</resources>
diff --git a/base/app/src/main/res/values-es/immersive_detail_strings.xml b/base/app/src/main/res/values-es/immersive_detail_strings.xml
new file mode 100644
index 00000000..39f7e245
--- /dev/null
+++ b/base/app/src/main/res/values-es/immersive_detail_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_detail_pause">Pausa</string>
+ <string name="immersive_detail_save">Guardar en la biblioteca</string>
+ <string name="immersive_detail_unsave">Quitar de la biblioteca</string>
+ <string name="immersive_detail_find">Buscar en la lista</string>
+ <string name="immersive_detail_smart_shuffle_on">Reproducción aleatoria inteligente activada: las recomendaciones se mezclan en la lista.</string>
+ <string name="immersive_detail_more">Más</string>
+ <string name="immersive_detail_less">Menos</string>
+ <string name="immersive_detail_featured_on">Aparece en</string>
+ <string name="immersive_detail_remove_local">Quitar de esta playlist</string>
+ <string name="immersive_detail_follow">Seguir</string>
+ <string name="immersive_detail_unfollow">Dejar de seguir</string>
+</resources>
diff --git a/base/app/src/main/res/values-es/immersive_genius_strings.xml b/base/app/src/main/res/values-es/immersive_genius_strings.xml
new file mode 100644
index 00000000..31d45394
--- /dev/null
+++ b/base/app/src/main/res/values-es/immersive_genius_strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_genius_none">Genius no tiene nada sobre esta canción.</string>
+ <string name="immersive_genius_error">No se puede conectar con Genius ahora mismo.</string>
+ <string name="immersive_genius_view">Ver en Genius</string>
+</resources>
diff --git a/base/app/src/main/res/values-es/immersive_glass_strings.xml b/base/app/src/main/res/values-es/immersive_glass_strings.xml
new file mode 100644
index 00000000..19046ead
--- /dev/null
+++ b/base/app/src/main/res/values-es/immersive_glass_strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="settings_liquid_glass_title">Liquid Glass</string>
+ <string name="settings_liquid_glass_detail">Las barras se curvan y reflejan la página que hay detrás, como el cristal</string>
+ <string name="settings_liquid_glass_unsupported">Requiere Android 12 o posterior</string>
+ <string name="settings_liquid_glass_reduced">Se usa un efecto esmerilado mientras el teléfono reduce el desenfoque o las animaciones</string>
+ <string name="immersive_expand_tab_bar">Mostrar todas las pestañas</string>
+</resources>
diff --git a/base/app/src/main/res/values-es/immersive_lyrics_strings.xml b/base/app/src/main/res/values-es/immersive_lyrics_strings.xml
new file mode 100644
index 00000000..35ebd341
--- /dev/null
+++ b/base/app/src/main/res/values-es/immersive_lyrics_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_lyrics_instrumental">Instrumental</string>
+ <string name="immersive_lyrics_none">No hay letra para esta canción</string>
+ <string name="immersive_queue_title">Cola</string>
+ <string name="immersive_queue_now_playing">Reproduciendo ahora</string>
+ <string name="immersive_queue_empty">No hay nada en la cola</string>
+ <string name="immersive_queue_remove">Quitar de la cola</string>
+ <string name="immersive_queue_reorder">Mover en la cola</string>
+ <string name="immersive_queue_shuffle">Aleatorio</string>
+ <string name="immersive_queue_repeat">Repetir</string>
+</resources>
diff --git a/base/app/src/main/res/values-es/immersive_pages_strings.xml b/base/app/src/main/res/values-es/immersive_pages_strings.xml
new file mode 100644
index 00000000..3f846e33
--- /dev/null
+++ b/base/app/src/main/res/values-es/immersive_pages_strings.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_pages_songs">Canciones</string>
+ <string name="immersive_pages_artists">Artistas</string>
+ <string name="immersive_pages_albums">Álbumes</string>
+ <string name="immersive_pages_unknown_artist">Artista desconocido</string>
+ <string name="immersive_pages_unknown_album">Álbum desconocido</string>
+ <string name="immersive_pages_name_hint">Nombre</string>
+ <string name="immersive_pages_play_group">Reproducir %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-es/immersive_player_strings.xml b/base/app/src/main/res/values-es/immersive_player_strings.xml
new file mode 100644
index 00000000..3823414c
--- /dev/null
+++ b/base/app/src/main/res/values-es/immersive_player_strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_player_close">Cerrar el reproductor</string>
+ <string name="immersive_player_play">Reproducir</string>
+ <string name="immersive_player_pause">Pausa</string>
+ <string name="immersive_player_previous">Anterior</string>
+ <string name="immersive_player_next">Siguiente</string>
+ <string name="immersive_player_like">Añadir a Canciones que te gustan</string>
+ <string name="immersive_player_unlike">Quitar de Canciones que te gustan</string>
+ <string name="immersive_player_more">Más</string>
+ <string name="immersive_player_lyrics">Letra</string>
+ <string name="immersive_player_lyrics_close">Cerrar la letra</string>
+ <string name="immersive_player_queue">A continuación</string>
+ <string name="immersive_player_queue_close">Cerrar la cola</string>
+ <string name="immersive_player_devices">Dispositivos</string>
+ <string name="immersive_player_shuffle_on">Aleatorio: activado</string>
+ <string name="immersive_player_shuffle_off">Aleatorio: desactivado</string>
+ <string name="immersive_player_repeat_off">Repetir: desactivado</string>
+ <string name="immersive_player_repeat_all">Repetir: todo</string>
+ <string name="immersive_player_repeat_one">Repetir: una canción</string>
+ <string name="immersive_player_volume_down">Bajar volumen</string>
+ <string name="immersive_player_volume_up">Subir volumen</string>
+ <string name="immersive_player_ad">Anuncio</string>
+ <string name="immersive_player_explicit">Explícito</string>
+ <string name="immersive_player_added_to_liked">Añadida a Canciones que te gustan</string>
+ <string name="immersive_player_mini_player">Abrir el reproductor</string>
+</resources>
diff --git a/base/app/src/main/res/values-es/immersive_screens_strings.xml b/base/app/src/main/res/values-es/immersive_screens_strings.xml
new file mode 100644
index 00000000..1028f346
--- /dev/null
+++ b/base/app/src/main/res/values-es/immersive_screens_strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_screens_account">Cuenta</string>
+ <string name="immersive_screens_account_page">Página de la cuenta</string>
+ <string name="immersive_screens_account_page_detail">Plan, privacidad y dispositivos</string>
+ <string name="immersive_screens_top_result">Mejor resultado</string>
+ <string name="immersive_screens_reset_order">Volver al orden predeterminado</string>
+</resources>
diff --git a/base/app/src/main/res/values-es/immersive_shell_strings.xml b/base/app/src/main/res/values-es/immersive_shell_strings.xml
new file mode 100644
index 00000000..1b19de65
--- /dev/null
+++ b/base/app/src/main/res/values-es/immersive_shell_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_shell_back">Atrás</string>
+ <string name="immersive_shell_more">Más opciones</string>
+ <string name="immersive_shell_search_hint">Buscar</string>
+ <string name="immersive_shell_search_clear">Borrar búsqueda</string>
+ <string name="immersive_shell_play">Reproducir</string>
+ <string name="immersive_shell_shuffle">Aleatorio</string>
+ <string name="immersive_shell_see_all">Ver todo</string>
+ <string name="immersive_shell_now_playing">Reproduciendo ahora</string>
+ <string name="immersive_shell_explicit">Explícito</string>
+</resources>
diff --git a/base/app/src/main/res/values-es/myspoti_strings.xml b/base/app/src/main/res/values-es/myspoti_strings.xml
index 191a5a35..1398b454 100644
--- a/base/app/src/main/res/values-es/myspoti_strings.xml
+++ b/base/app/src/main/res/values-es/myspoti_strings.xml
@@ -440,4 +440,85 @@
<string name="playlist_member_owner">Creador</string>
<string name="playlist_member_collab">Colaborador</string>
<string name="playlist_members_more">%1$s y %2$d más</string>
+ <string name="downloads_lists">Álbumes y playlists</string>
+ <string name="downloads_singles">Canciones</string>
+ <string name="downloads_kind_album">Álbum</string>
+ <string name="downloads_kind_playlist">Playlist</string>
+ <string name="downloads_kind_liked">Canciones que te gustan</string>
+ <string name="settings_tab_appearance">Apariencia</string>
+ <string name="settings_tab_about">Acerca de</string>
+ <string name="settings_about_version">Versión %1$s</string>
+ <string name="settings_update_available">Versión %1$s disponible</string>
+ <string name="settings_update_available_detail">Toca para descargarla e instalarla</string>
+ <string name="setup_look_title">Elige tu aspecto</string>
+ <string name="setup_look_subtitle">Mira la vista previa y elige el que más te guste.</string>
+ <string name="look_classic">Clásico</string>
+ <string name="look_classic_detail">Reproductor oscuro teñido por la portada, botón de reproducción redondo</string>
+ <string name="look_immersive">Inmersivo</string>
+ <string name="look_immersive_detail">Portada grande, colores del álbum, letras animadas</string>
+ <string name="setup_look_preview">Vista previa del aspecto %1$s</string>
+ <string name="setup_look_tap_hint">Toca la vista previa para pausarla, desliza para cambiar</string>
+ <string name="setup_look_still_hint">Las animaciones están desactivadas en este teléfono: tres imágenes fijas</string>
+ <string name="setup_look_still_player">Reproductor</string>
+ <string name="setup_look_still_paused">En pausa</string>
+ <string name="setup_look_still_lyrics">Letra</string>
+ <string name="look_demo_all">Todo</string>
+ <string name="look_demo_music">Música</string>
+ <string name="look_demo_podcasts">Pódcasts</string>
+ <string name="look_demo_section">Hecho para ti</string>
+ <string name="settings_update_refresh">Buscar actualizaciones</string>
+ <string name="settings_update_uptodate_now">Al día (comprobado ahora mismo)</string>
+ <string name="settings_update_last_checked">Última comprobación: %1$s</string>
+ <string name="settings_update_never">Nunca comprobado</string>
+ <string name="settings_update_rate_limited">GitHub está limitando las solicitudes ahora mismo. Inténtalo de nuevo en unos minutos.</string>
+ <string name="settings_update_failed">No se pudo buscar actualizaciones. Revisa tu conexión.</string>
+ <string name="drm_missing">La reproducción no es posible aquí: el Android System WebView de este teléfono no tiene un DRM Widevine que funcione, y Spotify lo necesita. Actualiza Android System WebView y Chrome en Play Store, y selecciónalo en Ajustes &gt; Opciones de desarrollador &gt; Implementación de WebView.</string>
+ <string name="song_unavailable_skipped">%1$s no está disponible y se omitió.</string>
+ <string name="song_unavailable">%1$s no está disponible.</string>
+ <string name="songs_skipped_by_spotify">Spotify seguía omitiendo canciones que no podía reproducir, así que la reproducción se pausó. Toca reproducir para intentarlo de nuevo, o revisa tu cuenta y tu conexión.</string>
+ <string name="playlist_leave">Salir de la playlist</string>
+ <string name="playlist_leave_confirm">¿Salir de %1$s? Dejarás de ser colaborador y no podrás añadir ni quitar canciones. Para volver a unirte, necesitarás un nuevo enlace de invitación.</string>
+ <string name="playlist_leave_button">Salir</string>
+ <string name="playlist_member_listener">Oyente</string>
+ <string name="playlist_member_remove_collab">Quitar como colaborador</string>
+ <string name="playlist_member_make_collab">Hacer colaborador</string>
+ <string name="playlist_member_remove">Quitar de la playlist</string>
+ <string name="playlist_stop_collab_private">¿Dejar de colaborar en %1$s? Sus colaboradores pasan a ser oyentes: podrán seguir escuchándola, pero ya no añadirán ni quitarán canciones. Los enlaces de invitación ya compartidos siguen siendo válidos hasta que caduquen (hasta 7 días) y no se pueden cancelar.</string>
+ <string name="playlist_stop_collab_public">¿Dejar de colaborar en %1$s? Sus colaboradores se quitan de la playlist. Los enlaces de invitación ya compartidos siguen siendo válidos hasta que caduquen (hasta 7 días) y no se pueden cancelar.</string>
+ <string name="library_chip_playlists">Playlists</string>
+ <string name="library_chip_artists">Artistas</string>
+ <string name="library_chip_albums">Álbumes</string>
+ <string name="library_chip_songs">Canciones</string>
+ <string name="add_playlist_to_playlist">Añadir playlist a otra playlist</string>
+ <string name="add_collection_reading">Leyendo las canciones…</string>
+ <string name="add_collection_nothing">Nada que añadir</string>
+ <string name="add_collection_done">%1$d canciones añadidas a %2$s</string>
+ <string name="duplicate_title_some">Algunas ya están añadidas</string>
+ <string name="duplicate_title_all">Ya añadidas</string>
+ <string name="duplicate_text_some">Algunas de estas canciones ya están en %1$s.</string>
+ <string name="duplicate_text_all">Estas canciones ya están en %1$s.</string>
+ <string name="duplicate_add_all">Añadir todas</string>
+ <string name="duplicate_add_new">Añadir las nuevas</string>
+ <string name="duplicate_add_anyway">Añadir de todos modos</string>
+ <string name="duplicate_dont_add">No añadir</string>
+ <string name="settings_music_video_title">Vídeos musicales</string>
+ <string name="settings_music_video_detail">El botón de vídeo del reproductor y los clips que se inician solos. Desactivado: solo audio y Canvas.</string>
+ <string name="downloads_need_source">Las descargas necesitan una extensión de origen. Instala una en Ajustes, Extensiones.</string>
+ <string name="downloads_source_row_title">Origen de descargas</string>
+ <string name="downloads_source_row_on">Una extensión proporciona los archivos. Toca para gestionar las extensiones.</string>
+ <string name="downloads_source_row_off">Ninguna todavía: instala una extensión de origen de descargas.</string>
+ <string name="profile_block">Bloquear</string>
+ <string name="profile_unblock">Desbloquear</string>
+ <string name="profile_block_title">¿Bloquear a %1$s?</string>
+ <string name="profile_block_confirm">%1$s no podrá seguirte ni ver tu perfil y tus playlists públicas. Puedes desbloquearlo desde su perfil en cualquier momento.</string>
+ <string name="profile_blocked">Has bloqueado a este usuario</string>
+ <string name="profile_block_failed">No se pudo cambiar el bloqueo, inténtalo de nuevo</string>
+ <string name="profile_more_options">Más opciones</string>
+ <string name="settings_look_title">Aspecto</string>
+ <string name="look_offer_title">Nuevo aspecto disponible</string>
+ <string name="look_offer_try">Probar Inmersivo</string>
+ <string name="look_offer_keep">Mantener Clásico</string>
+ <string name="look_offer_note">Puedes cambiarlo más tarde en Ajustes &gt; Pantalla e idioma.</string>
+ <string name="settings_headset_skip_title">Botones de auriculares: 15 s en podcasts</string>
+ <string name="settings_headset_skip_detail">Desactivado: pasan al episodio siguiente o anterior</string>
</resources>
diff --git a/base/app/src/main/res/values-es/security_strings.xml b/base/app/src/main/res/values-es/security_strings.xml
new file mode 100644
index 00000000..8c2ce441
--- /dev/null
+++ b/base/app/src/main/res/values-es/security_strings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="action_playback_mirror">Mantiene Spotify sonando en silencio aquí; cuenta reproducciones en tu cuenta</string>
+ <string name="mirror_indicator">Spotify reflejado por %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-es/sources_strings.xml b/base/app/src/main/res/values-es/sources_strings.xml
new file mode 100644
index 00000000..15037b4c
--- /dev/null
+++ b/base/app/src/main/res/values-es/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Fuentes de audio</string>
+ <string name="sources_download_title">Fuentes de descarga</string>
+ <string name="sources_audio_footer">Se consultan de arriba abajo para cada canción: la primera que la tenga la reproduce. Usa las flechas para cambiar el orden.</string>
+ <string name="sources_download_footer">Se consultan de arriba abajo: la primera fuente que tenga la canción da el archivo. Usa las flechas para cambiar el orden.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Se reproduce cuando ninguna fuente de arriba tiene la canción</string>
+ <string name="sources_ready">Lista</string>
+ <string name="sources_details_show">Mostrar detalles</string>
+ <string name="sources_details_hide">Ocultar detalles</string>
+ <string name="sources_detail_version">Versión %1$s · por %2$s</string>
+ <string name="sources_last_used">Última: %1$s, %2$s</string>
+ <string name="sources_open">Abrir la extensión</string>
+ <string name="sources_order_hint">Las fuentes se consultan en el orden definido en Ajustes (Reproducción, Descargas).</string>
+ <string name="sources_below_spotify">No se consulta: Spotify está arriba</string>
+</resources>
diff --git a/base/app/src/main/res/values-es/stats_strings.xml b/base/app/src/main/res/values-es/stats_strings.xml
new file mode 100644
index 00000000..acc07b25
--- /dev/null
+++ b/base/app/src/main/res/values-es/stats_strings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="stats_tab_spotify">En Spotify</string>
+ <string name="stats_tab_phone">En este teléfono</string>
+ <string name="stats_range_short">Últimas 4 semanas</string>
+ <string name="stats_range_medium">Últimos 6 meses</string>
+ <string name="stats_range_long">Último año</string>
+ <string name="stats_artists_ranked">%1$d artistas en tu historial de escucha</string>
+ <string name="stats_empty">Spotify aún no tiene artistas ni canciones más escuchados para este período. Sigue escuchando y vuelve más tarde.</string>
+ <string name="stats_failed">Spotify no envió tus estadísticas.</string>
+ <string name="stats_spotify_note">Clasificación de Spotify a partir de todo lo que reprodujo esta cuenta, en todos los dispositivos. Spotify no comparte reproducciones ni minutos escuchados: los minutos de «En este teléfono» son el recuento propio de Myspoti.</string>
+ <string name="stats_weekly_minutes">Minutos por semana</string>
+ <string name="stats_this_week">Esta semana: %1$d min</string>
+ <string name="stats_listening_stats">Estadísticas de escucha</string>
+ <string name="friends_title">Actividad de amigos</string>
+ <string name="friends_detail">Lo que escuchan las personas a las que sigues</string>
+ <string name="friends_now">Ahora</string>
+ <string name="friends_empty">Aún no hay actividad de amigos. Los amigos a los que sigues y que comparten su actividad de escucha en Spotify aparecerán aquí.</string>
+ <string name="friends_failed">Spotify no envió la actividad de amigos.</string>
+ <string name="friends_refresh">Actualizar</string>
+ <string name="artist_top_short">Tu artista n.º %1$d de las últimas 4 semanas</string>
+ <string name="artist_top_medium">Tu artista n.º %1$d de los últimos 6 meses</string>
+ <string name="artist_top_long">Tu artista n.º %1$d del último año</string>
+</resources>
diff --git a/base/app/src/main/res/values-es/strings.xml b/base/app/src/main/res/values-es/strings.xml
index 410aa114..f18a47f7 100644
--- a/base/app/src/main/res/values-es/strings.xml
+++ b/base/app/src/main/res/values-es/strings.xml
@@ -20,4 +20,5 @@
<string name="account_page_title">Cuenta de Spotify</string>
<string name="account_page_detail">Plan, privacidad y dispositivos, en spotify.com</string>
<string name="player_source_downloaded">Descargada</string>
+ <string name="extension_change_write">Ahora también puede enviar a Spotify: %1$s</string>
</resources>
diff --git a/base/app/src/main/res/values-es/update_consent_strings.xml b/base/app/src/main/res/values-es/update_consent_strings.xml
new file mode 100644
index 00000000..321bf47c
--- /dev/null
+++ b/base/app/src/main/res/values-es/update_consent_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="update_code_title">El código de %1$s cambió (%2$d líneas, +%3$d/−%4$d)</string>
+ <string name="update_code_body">Esta extensión tiene permisos potentes (acciones críticas o acceso amplio a la red), así que nunca se ejecuta código nuevo sin tu aprobación.</string>
+ <string name="update_code_files">Archivos modificados: %1$s</string>
+ <string name="update_code_update">Actualizar</string>
+ <string name="update_code_later">Ahora no</string>
+ <string name="update_check_waiting">Actualización encontrada: se aplicará sola en 24 horas</string>
+ <string name="update_check_repo_changed">Actualización rechazada: el repositorio cambió de propietario</string>
+ <string name="update_repo_changed_title">El repositorio cambió de propietario</string>
+ <string name="update_repo_changed_body">Este repositorio se volvió a registrar o se transfirió con el mismo nombre, por lo que sus actualizaciones están bloqueadas. Desinstálala, o instálala de nuevo solo si confías en el nuevo propietario.</string>
+ <string name="update_author_owner">por %1$s · repositorio de %2$s</string>
+ <string name="update_author_unverified">por %1$s · sin verificar</string>
+</resources>
diff --git a/base/app/src/main/res/values-et/sources_strings.xml b/base/app/src/main/res/values-et/sources_strings.xml
new file mode 100644
index 00000000..24e45a5c
--- /dev/null
+++ b/base/app/src/main/res/values-et/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Heliallikad</string>
+ <string name="sources_download_title">Allalaadimisallikad</string>
+ <string name="sources_audio_footer">Igale loole küsitakse ülevalt alla: esimene, millel see on, mängib selle. Järjekorra muutmiseks kasuta nooli.</string>
+ <string name="sources_download_footer">Küsitakse ülevalt alla: esimene allikas, millel laul on, annab faili. Järjekorra muutmiseks kasuta nooli.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Mängib, kui ülal ükski allikas laulu ei oma</string>
+ <string name="sources_ready">Valmis</string>
+ <string name="sources_details_show">Näita üksikasju</string>
+ <string name="sources_details_hide">Peida üksikasjad</string>
+ <string name="sources_detail_version">Versioon %1$s · autor %2$s</string>
+ <string name="sources_last_used">Viimane: %1$s, %2$s</string>
+ <string name="sources_open">Ava laiend</string>
+ <string name="sources_order_hint">Allikaid küsitakse seadetes (Esitus, Allalaadimised) määratud järjekorras.</string>
+ <string name="sources_below_spotify">Ei küsita: Spotify on ülal</string>
+</resources>
diff --git a/base/app/src/main/res/values-eu/sources_strings.xml b/base/app/src/main/res/values-eu/sources_strings.xml
new file mode 100644
index 00000000..b96b1976
--- /dev/null
+++ b/base/app/src/main/res/values-eu/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Audio-iturriak</string>
+ <string name="sources_download_title">Deskarga-iturriak</string>
+ <string name="sources_audio_footer">Kanta bakoitzeko goitik behera galdetzen dira: hori duen lehenak erreproduzitzen du. Ordena aldatzeko erabili gezia-tekla.</string>
+ <string name="sources_download_footer">Goitik behera galdetzen dira: kanta duen lehen iturriak ematen du fitxategia. Ordena aldatzeko erabili gezia-tekla.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Erreproduzitzen da goiko iturrietan kanta ez dagoenean</string>
+ <string name="sources_ready">Prest</string>
+ <string name="sources_details_show">Erakutsi xehetasunak</string>
+ <string name="sources_details_hide">Ezkutatu xehetasunak</string>
+ <string name="sources_detail_version">%1$s bertsioa · %2$s egilea</string>
+ <string name="sources_last_used">Azkena: %1$s, %2$s</string>
+ <string name="sources_open">Ireki luzapena</string>
+ <string name="sources_order_hint">Iturriak ezarpenetan (Erreprodukzioa, Deskargak) ezarritako ordenan galdetzen dira.</string>
+ <string name="sources_below_spotify">Ez da galdetzen: Spotify gainean dago</string>
+</resources>
diff --git a/base/app/src/main/res/values-fa/sources_strings.xml b/base/app/src/main/res/values-fa/sources_strings.xml
new file mode 100644
index 00000000..98873f11
--- /dev/null
+++ b/base/app/src/main/res/values-fa/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">منابع صدا</string>
+ <string name="sources_download_title">منابع دانلود</string>
+ <string name="sources_audio_footer">برای هر آهنگ از بالا به پایین پرسیده می‌شود: اولین منبعی که آن را داشته باشد پخش می‌کند. با فلش‌ها ترتیب را تغییر دهید.</string>
+ <string name="sources_download_footer">از بالا به پایین پرسیده می‌شود: اولین منبعی که آهنگ را داشته باشد فایل را می‌دهد. با فلش‌ها ترتیب را تغییر دهید.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">وقتی هیچ منبعی بالاتر از آن آهنگ را نداشته باشد پخش می‌شود</string>
+ <string name="sources_ready">آماده</string>
+ <string name="sources_details_show">نمایش جزئیات</string>
+ <string name="sources_details_hide">پنهان کردن جزئیات</string>
+ <string name="sources_detail_version">نسخه %1$s · توسط %2$s</string>
+ <string name="sources_last_used">آخرین: %1$s، %2$s</string>
+ <string name="sources_open">باز کردن افزونه</string>
+ <string name="sources_order_hint">منابع به ترتیبی که در تنظیمات (پخش، دانلودها) تعیین شده پرسیده می‌شوند.</string>
+ <string name="sources_below_spotify">پرسیده نمی‌شود: Spotify بالاتر است</string>
+</resources>
diff --git a/base/app/src/main/res/values-fi/sources_strings.xml b/base/app/src/main/res/values-fi/sources_strings.xml
new file mode 100644
index 00000000..567722f3
--- /dev/null
+++ b/base/app/src/main/res/values-fi/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Äänilähteet</string>
+ <string name="sources_download_title">Latauslähteet</string>
+ <string name="sources_audio_footer">Kysytään ylhäältä alas jokaiselle kappaleelle: ensimmäinen, jolla se on, toistaa sen. Vaihda järjestystä nuolilla.</string>
+ <string name="sources_download_footer">Kysytään ylhäältä alas: ensimmäinen lähde, jolla kappale on, antaa tiedoston. Vaihda järjestystä nuolilla.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Toistetaan, kun mikään yllä oleva lähde ei ole kappaletta</string>
+ <string name="sources_ready">Valmis</string>
+ <string name="sources_details_show">Näytä tiedot</string>
+ <string name="sources_details_hide">Piilota tiedot</string>
+ <string name="sources_detail_version">Versio %1$s · tekijä %2$s</string>
+ <string name="sources_last_used">Viimeisin: %1$s, %2$s</string>
+ <string name="sources_open">Avaa laajennus</string>
+ <string name="sources_order_hint">Lähteet kysytään Asetuksissa (Toisto, Lataukset) määritetyssä järjestyksessä.</string>
+ <string name="sources_below_spotify">Ei kysytä: Spotify on ylempänä</string>
+</resources>
diff --git a/base/app/src/main/res/values-fr-rCA/sources_strings.xml b/base/app/src/main/res/values-fr-rCA/sources_strings.xml
new file mode 100644
index 00000000..4f550d4b
--- /dev/null
+++ b/base/app/src/main/res/values-fr-rCA/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Sources audio</string>
+ <string name="sources_download_title">Sources de téléchargement</string>
+ <string name="sources_audio_footer">Demandées de haut en bas pour chaque titre : la première qui l\'a le joue. Les flèches changent l\'ordre.</string>
+ <string name="sources_download_footer">Demandées de haut en bas : la première qui a le titre fournit le fichier. Les flèches changent l\'ordre.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Joue quand aucune source au-dessus n\'a le titre</string>
+ <string name="sources_ready">Prête</string>
+ <string name="sources_details_show">Afficher les détails</string>
+ <string name="sources_details_hide">Masquer les détails</string>
+ <string name="sources_detail_version">Version %1$s · par %2$s</string>
+ <string name="sources_last_used">Dernière : %1$s, %2$s</string>
+ <string name="sources_open">Ouvrir l\'extension</string>
+ <string name="sources_order_hint">Les sources sont demandées dans l\'ordre réglé dans les Paramètres (Lecture, Téléchargements).</string>
+ <string name="sources_below_spotify">Pas demandée : Spotify est au-dessus</string>
+</resources>
diff --git a/base/app/src/main/res/values-fr/immersive_genius_strings.xml b/base/app/src/main/res/values-fr/immersive_genius_strings.xml
new file mode 100644
index 00000000..1bcf67b4
--- /dev/null
+++ b/base/app/src/main/res/values-fr/immersive_genius_strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_genius_none">Genius n\'a rien sur ce morceau.</string>
+ <string name="immersive_genius_error">Genius est injoignable pour le moment.</string>
+ <string name="immersive_genius_view">Voir sur Genius</string>
+</resources>
diff --git a/base/app/src/main/res/values-fr/myspoti_strings.xml b/base/app/src/main/res/values-fr/myspoti_strings.xml
index eb1fc45a..ee116b98 100644
--- a/base/app/src/main/res/values-fr/myspoti_strings.xml
+++ b/base/app/src/main/res/values-fr/myspoti_strings.xml
@@ -277,6 +277,12 @@
<string name="settings_check_update_detail">Cherche une version plus récente et propose de l\'installer</string>
<string name="settings_update_checking">Vérification…</string>
<string name="settings_update_check_latest">Myspoti est à jour</string>
+ <string name="settings_update_refresh">Vérifier les mises à jour</string>
+ <string name="settings_update_uptodate_now">À jour (vérifié à l\'instant)</string>
+ <string name="settings_update_last_checked">Dernière vérification : %1$s</string>
+ <string name="settings_update_never">Jamais vérifié</string>
+ <string name="settings_update_rate_limited">GitHub limite les requêtes pour le moment. Réessayez dans quelques minutes.</string>
+ <string name="settings_update_failed">Impossible de vérifier les mises à jour. Vérifiez votre connexion.</string>
<!-- A25 : arrêter la file, garder les titres déjà téléchargés. -->
<string name="downloads_stop_all_title">Arrêter tous les téléchargements</string>
<string name="downloads_stop_all_detail">Annule ce qui reste ; les titres déjà téléchargés sont conservés</string>
@@ -518,4 +524,6 @@
<string name="look_offer_try">Essayer Immersif</string>
<string name="look_offer_keep">Garder Classique</string>
<string name="look_offer_note">Vous pourrez le changer plus tard dans Réglages > Affichage et langue.</string>
+ <string name="settings_headset_skip_title">Boutons du casque : 15 s en podcast</string>
+ <string name="settings_headset_skip_detail">Désactivé : ils passent à l\'épisode suivant ou précédent</string>
</resources>
diff --git a/base/app/src/main/res/values-fr/security_strings.xml b/base/app/src/main/res/values-fr/security_strings.xml
new file mode 100644
index 00000000..53b18e85
--- /dev/null
+++ b/base/app/src/main/res/values-fr/security_strings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="action_playback_mirror">Garde Spotify en lecture silencieuse ici ; compte des écoutes sur votre compte</string>
+ <string name="mirror_indicator">Spotify en miroir par %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-fr/sources_strings.xml b/base/app/src/main/res/values-fr/sources_strings.xml
new file mode 100644
index 00000000..4f550d4b
--- /dev/null
+++ b/base/app/src/main/res/values-fr/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Sources audio</string>
+ <string name="sources_download_title">Sources de téléchargement</string>
+ <string name="sources_audio_footer">Demandées de haut en bas pour chaque titre : la première qui l\'a le joue. Les flèches changent l\'ordre.</string>
+ <string name="sources_download_footer">Demandées de haut en bas : la première qui a le titre fournit le fichier. Les flèches changent l\'ordre.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Joue quand aucune source au-dessus n\'a le titre</string>
+ <string name="sources_ready">Prête</string>
+ <string name="sources_details_show">Afficher les détails</string>
+ <string name="sources_details_hide">Masquer les détails</string>
+ <string name="sources_detail_version">Version %1$s · par %2$s</string>
+ <string name="sources_last_used">Dernière : %1$s, %2$s</string>
+ <string name="sources_open">Ouvrir l\'extension</string>
+ <string name="sources_order_hint">Les sources sont demandées dans l\'ordre réglé dans les Paramètres (Lecture, Téléchargements).</string>
+ <string name="sources_below_spotify">Pas demandée : Spotify est au-dessus</string>
+</resources>
diff --git a/base/app/src/main/res/values-fr/update_consent_strings.xml b/base/app/src/main/res/values-fr/update_consent_strings.xml
new file mode 100644
index 00000000..1119cbee
--- /dev/null
+++ b/base/app/src/main/res/values-fr/update_consent_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="update_code_title">Le code de %1$s a changé (%2$d lignes, +%3$d/−%4$d)</string>
+ <string name="update_code_body">Cette extension détient des droits puissants (actions critiques ou accès réseau étendu) : du nouveau code n\'est jamais exécuté sans votre accord.</string>
+ <string name="update_code_files">Fichiers modifiés : %1$s</string>
+ <string name="update_code_update">Mettre à jour</string>
+ <string name="update_code_later">Pas maintenant</string>
+ <string name="update_check_waiting">Mise à jour trouvée : elle s\'appliquera seule dans 24 heures</string>
+ <string name="update_check_repo_changed">Mise à jour refusée : le dépôt a changé de propriétaire</string>
+ <string name="update_repo_changed_title">Le dépôt a changé de propriétaire</string>
+ <string name="update_repo_changed_body">Ce dépôt a été recréé ou transféré sous le même nom : ses mises à jour sont bloquées. Désinstallez-la, ou réinstallez-la seulement si vous faites confiance au nouveau propriétaire.</string>
+ <string name="update_author_owner">par %1$s · dépôt de %2$s</string>
+ <string name="update_author_unverified">par %1$s · non vérifié</string>
+</resources>
diff --git a/base/app/src/main/res/values-gl/sources_strings.xml b/base/app/src/main/res/values-gl/sources_strings.xml
new file mode 100644
index 00000000..13ac4e6c
--- /dev/null
+++ b/base/app/src/main/res/values-gl/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Fontes de audio</string>
+ <string name="sources_download_title">Fontes de descarga</string>
+ <string name="sources_audio_footer">Consúltanse de arriba abaixo para cada canción: a primeira que a teña reprodúcea. Usa as frechas para cambiar a orde.</string>
+ <string name="sources_download_footer">Consúltanse de arriba abaixo: a primeira fonte que teña a canción entrega o ficheiro. Usa as frechas para cambiar a orde.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Reprodúcese cando ningunha fonte de enriba ten a canción</string>
+ <string name="sources_ready">Listo</string>
+ <string name="sources_details_show">Amosar detalles</string>
+ <string name="sources_details_hide">Ocultar detalles</string>
+ <string name="sources_detail_version">Versión %1$s · por %2$s</string>
+ <string name="sources_last_used">Última: %1$s, %2$s</string>
+ <string name="sources_open">Abrir a extensión</string>
+ <string name="sources_order_hint">As fontes consúltanse na orde definida en Axustes (Reprodución, Descargas).</string>
+ <string name="sources_below_spotify">Non se pregunta: Spotify está arriba</string>
+</resources>
diff --git a/base/app/src/main/res/values-gu/sources_strings.xml b/base/app/src/main/res/values-gu/sources_strings.xml
new file mode 100644
index 00000000..65357f8f
--- /dev/null
+++ b/base/app/src/main/res/values-gu/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">ઓડિયો સ્રોત</string>
+ <string name="sources_download_title">ડાઉનલોડ સ્રોત</string>
+ <string name="sources_audio_footer">દરેક ગીત માટે ઉપરથી નીચે પૂછવામાં આવે છે: જેની પાસે તે હોય તે પહેલો ચલાવે છે. ક્રમ બદલવા માટે તીરનો ઉપયોગ કરો.</string>
+ <string name="sources_download_footer">ઉપરથી નીચે પૂછવામાં આવે છે: ગીત ધરાવતો પહેલો સ્રોત ફાઇલ આપે છે. ક્રમ બદલવા માટે તીરનો ઉપયોગ કરો.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">ઉપરના કોઈ સ્રોત પાસે ગીત ન હોય ત્યારે ચાલે છે</string>
+ <string name="sources_ready">તૈયાર</string>
+ <string name="sources_details_show">વિગતો બતાવો</string>
+ <string name="sources_details_hide">વિગતો છુપાવો</string>
+ <string name="sources_detail_version">સંસ્કરણ %1$s · દ્વારા %2$s</string>
+ <string name="sources_last_used">છેલ્લું: %1$s, %2$s</string>
+ <string name="sources_open">એક્સ્ટેંશન ખોલો</string>
+ <string name="sources_order_hint">સ્રોતો સેટિંગ્સમાં (પ્લેબેક, ડાઉનલોડ) સેટ કરેલા ક્રમમાં પૂછવામાં આવે છે.</string>
+ <string name="sources_below_spotify">પૂછવામાં આવતું નથી: Spotify ઉપર છે</string>
+</resources>
diff --git a/base/app/src/main/res/values-hi/sources_strings.xml b/base/app/src/main/res/values-hi/sources_strings.xml
new file mode 100644
index 00000000..5b954a88
--- /dev/null
+++ b/base/app/src/main/res/values-hi/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">ऑडियो स्रोत</string>
+ <string name="sources_download_title">डाउनलोड स्रोत</string>
+ <string name="sources_audio_footer">हर गाने के लिए ऊपर से नीचे पूछा जाता है: जिसके पास वह हो, वही पहला स्रोत उसे चलाता है। क्रम बदलने के लिए तीर इस्तेमाल करें।</string>
+ <string name="sources_download_footer">ऊपर से नीचे पूछा जाता है: जिस पहले स्रोत के पास गाना हो, वह फ़ाइल देता है। क्रम बदलने के लिए तीर इस्तेमाल करें।</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">ऊपर के किसी स्रोत में गाना न होने पर चलता है</string>
+ <string name="sources_ready">तैयार</string>
+ <string name="sources_details_show">विवरण दिखाएं</string>
+ <string name="sources_details_hide">विवरण छिपाएं</string>
+ <string name="sources_detail_version">संस्करण %1$s · द्वारा %2$s</string>
+ <string name="sources_last_used">आखिरी: %1$s, %2$s</string>
+ <string name="sources_open">एक्सटेंशन खोलें</string>
+ <string name="sources_order_hint">स्रोतों से सेटिंग्स (प्लेबैक, डाउनलोड) में तय क्रम में पूछा जाता है।</string>
+ <string name="sources_below_spotify">नहीं पूछा जाता: Spotify ऊपर है</string>
+</resources>
diff --git a/base/app/src/main/res/values-hr/sources_strings.xml b/base/app/src/main/res/values-hr/sources_strings.xml
new file mode 100644
index 00000000..66fa4588
--- /dev/null
+++ b/base/app/src/main/res/values-hr/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Izvori zvuka</string>
+ <string name="sources_download_title">Izvori preuzimanja</string>
+ <string name="sources_audio_footer">Pitaju se od vrha prema dnu za svaku pjesmu: prvi koji je ima reproducira je. Strelicama promijenite redoslijed.</string>
+ <string name="sources_download_footer">Pitaju se od vrha prema dnu: prvi izvor koji ima pjesmu daje datoteku. Strelicama promijenite redoslijed.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Reproducira se kad nijedan izvor iznad nema pjesmu</string>
+ <string name="sources_ready">Spremno</string>
+ <string name="sources_details_show">Prikaži pojedinosti</string>
+ <string name="sources_details_hide">Sakrij pojedinosti</string>
+ <string name="sources_detail_version">Verzija %1$s · autor %2$s</string>
+ <string name="sources_last_used">Zadnje: %1$s, %2$s</string>
+ <string name="sources_open">Otvori proširenje</string>
+ <string name="sources_order_hint">Izvori se pitaju redoslijedom postavljenim u Postavkama (Reprodukcija, Preuzimanja).</string>
+ <string name="sources_below_spotify">Ne traži se: Spotify je iznad</string>
+</resources>
diff --git a/base/app/src/main/res/values-hu/sources_strings.xml b/base/app/src/main/res/values-hu/sources_strings.xml
new file mode 100644
index 00000000..c9b0d6c5
--- /dev/null
+++ b/base/app/src/main/res/values-hu/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Hangforrások</string>
+ <string name="sources_download_title">Letöltési források</string>
+ <string name="sources_audio_footer">Minden dalnál fentről lefelé kérdezzük: az első, amelyiknél megvan, lejátssza. A sorrendet a nyilakkal módosíthatod.</string>
+ <string name="sources_download_footer">Fentről lefelé kérdezzük: az első forrás, amelyiknél megvan a dal, adja a fájlt. A sorrendet a nyilakkal módosíthatod.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Akkor játszik le, ha a fölötte lévő forrásoknál sincs meg a dal</string>
+ <string name="sources_ready">Kész</string>
+ <string name="sources_details_show">Részletek megjelenítése</string>
+ <string name="sources_details_hide">Részletek elrejtése</string>
+ <string name="sources_detail_version">Verzió: %1$s · szerző: %2$s</string>
+ <string name="sources_last_used">Utoljára: %1$s, %2$s</string>
+ <string name="sources_open">Bővítmény megnyitása</string>
+ <string name="sources_order_hint">A források a Beállításokban (Lejátszás, Letöltések) megadott sorrendben kerülnek lekérdezésre.</string>
+ <string name="sources_below_spotify">Nem kérdezzük le: a Spotify fent van</string>
+</resources>
diff --git a/base/app/src/main/res/values-in/sources_strings.xml b/base/app/src/main/res/values-in/sources_strings.xml
new file mode 100644
index 00000000..2dd3c6bf
--- /dev/null
+++ b/base/app/src/main/res/values-in/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Sumber audio</string>
+ <string name="sources_download_title">Sumber unduhan</string>
+ <string name="sources_audio_footer">Ditanyakan dari atas ke bawah untuk setiap lagu: yang pertama memilikinya akan memutarnya. Gunakan panah untuk mengubah urutan.</string>
+ <string name="sources_download_footer">Ditanyakan dari atas ke bawah: sumber pertama yang memiliki lagu akan memberikan filenya. Gunakan panah untuk mengubah urutan.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Diputar saat tidak ada sumber di atasnya yang memiliki lagu</string>
+ <string name="sources_ready">Siap</string>
+ <string name="sources_details_show">Tampilkan detail</string>
+ <string name="sources_details_hide">Sembunyikan detail</string>
+ <string name="sources_detail_version">Versi %1$s · oleh %2$s</string>
+ <string name="sources_last_used">Terakhir: %1$s, %2$s</string>
+ <string name="sources_open">Buka ekstensi</string>
+ <string name="sources_order_hint">Sumber ditanyakan sesuai urutan yang diatur di Pengaturan (Pemutaran, Unduhan).</string>
+ <string name="sources_below_spotify">Tidak ditanyakan: Spotify ada di atas</string>
+</resources>
diff --git a/base/app/src/main/res/values-is/sources_strings.xml b/base/app/src/main/res/values-is/sources_strings.xml
new file mode 100644
index 00000000..75620ae5
--- /dev/null
+++ b/base/app/src/main/res/values-is/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Hljóðgjafar</string>
+ <string name="sources_download_title">Niðurhalsgjafar</string>
+ <string name="sources_audio_footer">Spurt er að ofan niður fyrir hvert lag: fyrsti gjafinn sem hefur það spilar það. Notaðu örvarnar til að breyta röðinni.</string>
+ <string name="sources_download_footer">Spurt er að ofan niður: fyrsti gjafinn sem hefur lagið lætur skrána í té. Notaðu örvarnar til að breyta röðinni.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Spilar þegar enginn gjafi fyrir ofan er með lagið</string>
+ <string name="sources_ready">Tilbúið</string>
+ <string name="sources_details_show">Sýna nánari upplýsingar</string>
+ <string name="sources_details_hide">Fela nánari upplýsingar</string>
+ <string name="sources_detail_version">Útgáfa %1$s · frá %2$s</string>
+ <string name="sources_last_used">Síðast: %1$s, %2$s</string>
+ <string name="sources_open">Opna viðbótina</string>
+ <string name="sources_order_hint">Gjafarnir eru spurðir í þeirri röð sem stillt er í Stillingum (Spilun, Niðurhal).</string>
+ <string name="sources_below_spotify">Ekki spurt: Spotify er fyrir ofan</string>
+</resources>
diff --git a/base/app/src/main/res/values-it/extensions_strings.xml b/base/app/src/main/res/values-it/extensions_strings.xml
index 8b46b8ac..1b1ab9fa 100644
--- a/base/app/src/main/res/values-it/extensions_strings.xml
+++ b/base/app/src/main/res/values-it/extensions_strings.xml
@@ -208,4 +208,9 @@
<string name="ext_grants_title">Sempre consentiti</string>
<string name="ext_grants_note">Modifiche a Spotify che questa estensione apporta senza chiedere. Revocane una per essere di nuovo interpellato.</string>
<string name="ext_grant_revoke">Revoca</string>
+ <string name="extensions_unreadable_file">Impossibile leggere il file</string>
+ <string name="ext_welcome_title">%1$s è installata</string>
+ <string name="ext_welcome_steps">Per finire</string>
+ <string name="ext_welcome_from">Scritto dall\'estensione.</string>
+ <string name="ext_welcome_ok">Ho capito</string>
</resources>
diff --git a/base/app/src/main/res/values-it/immersive_detail_strings.xml b/base/app/src/main/res/values-it/immersive_detail_strings.xml
new file mode 100644
index 00000000..05544bd3
--- /dev/null
+++ b/base/app/src/main/res/values-it/immersive_detail_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_detail_pause">Pausa</string>
+ <string name="immersive_detail_save">Salva nella libreria</string>
+ <string name="immersive_detail_unsave">Rimuovi dalla libreria</string>
+ <string name="immersive_detail_find">Cerca nell\'elenco</string>
+ <string name="immersive_detail_smart_shuffle_on">Riproduzione casuale intelligente attiva: i consigli si uniscono all\'elenco mescolato.</string>
+ <string name="immersive_detail_more">Altro</string>
+ <string name="immersive_detail_less">Meno</string>
+ <string name="immersive_detail_featured_on">Presente in</string>
+ <string name="immersive_detail_remove_local">Rimuovi da questa playlist</string>
+ <string name="immersive_detail_follow">Segui</string>
+ <string name="immersive_detail_unfollow">Smetti di seguire</string>
+</resources>
diff --git a/base/app/src/main/res/values-it/immersive_genius_strings.xml b/base/app/src/main/res/values-it/immersive_genius_strings.xml
new file mode 100644
index 00000000..56062a07
--- /dev/null
+++ b/base/app/src/main/res/values-it/immersive_genius_strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_genius_none">Genius non ha nulla su questo brano.</string>
+ <string name="immersive_genius_error">Genius non è raggiungibile al momento.</string>
+ <string name="immersive_genius_view">Vedi su Genius</string>
+</resources>
diff --git a/base/app/src/main/res/values-it/immersive_glass_strings.xml b/base/app/src/main/res/values-it/immersive_glass_strings.xml
new file mode 100644
index 00000000..49f4b182
--- /dev/null
+++ b/base/app/src/main/res/values-it/immersive_glass_strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="settings_liquid_glass_title">Liquid Glass</string>
+ <string name="settings_liquid_glass_detail">Le barre si piegano e riflettono la pagina dietro di loro, come il vetro</string>
+ <string name="settings_liquid_glass_unsupported">Richiede Android 12 o successivo</string>
+ <string name="settings_liquid_glass_reduced">Effetto smerigliato finché il telefono riduce la sfocatura o le animazioni</string>
+ <string name="immersive_expand_tab_bar">Mostra tutte le schede</string>
+</resources>
diff --git a/base/app/src/main/res/values-it/immersive_lyrics_strings.xml b/base/app/src/main/res/values-it/immersive_lyrics_strings.xml
new file mode 100644
index 00000000..160914fb
--- /dev/null
+++ b/base/app/src/main/res/values-it/immersive_lyrics_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_lyrics_instrumental">Strumentale</string>
+ <string name="immersive_lyrics_none">Nessun testo per questo brano</string>
+ <string name="immersive_queue_title">Coda</string>
+ <string name="immersive_queue_now_playing">In riproduzione</string>
+ <string name="immersive_queue_empty">Niente in coda</string>
+ <string name="immersive_queue_remove">Rimuovi dalla coda</string>
+ <string name="immersive_queue_reorder">Sposta nella coda</string>
+ <string name="immersive_queue_shuffle">Casuale</string>
+ <string name="immersive_queue_repeat">Ripeti</string>
+</resources>
diff --git a/base/app/src/main/res/values-it/immersive_pages_strings.xml b/base/app/src/main/res/values-it/immersive_pages_strings.xml
new file mode 100644
index 00000000..e3d517cc
--- /dev/null
+++ b/base/app/src/main/res/values-it/immersive_pages_strings.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_pages_songs">Brani</string>
+ <string name="immersive_pages_artists">Artisti</string>
+ <string name="immersive_pages_albums">Album</string>
+ <string name="immersive_pages_unknown_artist">Artista sconosciuto</string>
+ <string name="immersive_pages_unknown_album">Album sconosciuto</string>
+ <string name="immersive_pages_name_hint">Nome</string>
+ <string name="immersive_pages_play_group">Riproduci %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-it/immersive_player_strings.xml b/base/app/src/main/res/values-it/immersive_player_strings.xml
new file mode 100644
index 00000000..e1c81b10
--- /dev/null
+++ b/base/app/src/main/res/values-it/immersive_player_strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_player_close">Chiudi il player</string>
+ <string name="immersive_player_play">Riproduci</string>
+ <string name="immersive_player_pause">Pausa</string>
+ <string name="immersive_player_previous">Precedente</string>
+ <string name="immersive_player_next">Successivo</string>
+ <string name="immersive_player_like">Aggiungi ai Brani che ti piacciono</string>
+ <string name="immersive_player_unlike">Rimuovi dai Brani che ti piacciono</string>
+ <string name="immersive_player_more">Altro</string>
+ <string name="immersive_player_lyrics">Testo</string>
+ <string name="immersive_player_lyrics_close">Chiudi il testo</string>
+ <string name="immersive_player_queue">A seguire</string>
+ <string name="immersive_player_queue_close">Chiudi la coda</string>
+ <string name="immersive_player_devices">Dispositivi</string>
+ <string name="immersive_player_shuffle_on">Casuale: attivo</string>
+ <string name="immersive_player_shuffle_off">Casuale: disattivo</string>
+ <string name="immersive_player_repeat_off">Ripeti: disattivo</string>
+ <string name="immersive_player_repeat_all">Ripeti: tutto</string>
+ <string name="immersive_player_repeat_one">Ripeti: un brano</string>
+ <string name="immersive_player_volume_down">Abbassa il volume</string>
+ <string name="immersive_player_volume_up">Alza il volume</string>
+ <string name="immersive_player_ad">Pubblicità</string>
+ <string name="immersive_player_explicit">Esplicito</string>
+ <string name="immersive_player_added_to_liked">Aggiunto ai Brani che ti piacciono</string>
+ <string name="immersive_player_mini_player">Apri il player</string>
+</resources>
diff --git a/base/app/src/main/res/values-it/immersive_screens_strings.xml b/base/app/src/main/res/values-it/immersive_screens_strings.xml
new file mode 100644
index 00000000..9a7a1e97
--- /dev/null
+++ b/base/app/src/main/res/values-it/immersive_screens_strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_screens_account">Account</string>
+ <string name="immersive_screens_account_page">Pagina dell\'account</string>
+ <string name="immersive_screens_account_page_detail">Piano, privacy e dispositivi</string>
+ <string name="immersive_screens_top_result">Risultato migliore</string>
+ <string name="immersive_screens_reset_order">Torna all\'ordine predefinito</string>
+</resources>
diff --git a/base/app/src/main/res/values-it/immersive_shell_strings.xml b/base/app/src/main/res/values-it/immersive_shell_strings.xml
new file mode 100644
index 00000000..4884366d
--- /dev/null
+++ b/base/app/src/main/res/values-it/immersive_shell_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_shell_back">Indietro</string>
+ <string name="immersive_shell_more">Altre opzioni</string>
+ <string name="immersive_shell_search_hint">Cerca</string>
+ <string name="immersive_shell_search_clear">Cancella la ricerca</string>
+ <string name="immersive_shell_play">Riproduci</string>
+ <string name="immersive_shell_shuffle">Casuale</string>
+ <string name="immersive_shell_see_all">Mostra tutto</string>
+ <string name="immersive_shell_now_playing">In riproduzione</string>
+ <string name="immersive_shell_explicit">Esplicito</string>
+</resources>
diff --git a/base/app/src/main/res/values-it/myspoti_strings.xml b/base/app/src/main/res/values-it/myspoti_strings.xml
index 7d77338d..3c29890d 100644
--- a/base/app/src/main/res/values-it/myspoti_strings.xml
+++ b/base/app/src/main/res/values-it/myspoti_strings.xml
@@ -440,4 +440,85 @@
<string name="playlist_member_owner">Creatore</string>
<string name="playlist_member_collab">Collaboratore</string>
<string name="playlist_members_more">%1$s e altri %2$d</string>
+ <string name="downloads_lists">Album e playlist</string>
+ <string name="downloads_singles">Brani</string>
+ <string name="downloads_kind_album">Album</string>
+ <string name="downloads_kind_playlist">Playlist</string>
+ <string name="downloads_kind_liked">Brani che ti piacciono</string>
+ <string name="settings_tab_appearance">Aspetto</string>
+ <string name="settings_tab_about">Informazioni</string>
+ <string name="settings_about_version">Versione %1$s</string>
+ <string name="settings_update_available">Versione %1$s disponibile</string>
+ <string name="settings_update_available_detail">Tocca per scaricarla e installarla</string>
+ <string name="setup_look_title">Scegli il tuo stile</string>
+ <string name="setup_look_subtitle">Guarda l\'anteprima, poi scegli quello che preferisci.</string>
+ <string name="look_classic">Classico</string>
+ <string name="look_classic_detail">Player scuro con i colori della copertina, pulsante di riproduzione rotondo</string>
+ <string name="look_immersive">Immersivo</string>
+ <string name="look_immersive_detail">Copertina grande, colori dell\'album, testi animati</string>
+ <string name="setup_look_preview">Anteprima dello stile %1$s</string>
+ <string name="setup_look_tap_hint">Tocca l\'anteprima per metterla in pausa, scorri per cambiare</string>
+ <string name="setup_look_still_hint">Le animazioni sono disattivate su questo telefono: tre immagini fisse</string>
+ <string name="setup_look_still_player">Player</string>
+ <string name="setup_look_still_paused">In pausa</string>
+ <string name="setup_look_still_lyrics">Testo</string>
+ <string name="look_demo_all">Tutto</string>
+ <string name="look_demo_music">Musica</string>
+ <string name="look_demo_podcasts">Podcast</string>
+ <string name="look_demo_section">Creato per te</string>
+ <string name="settings_update_refresh">Cerca aggiornamenti</string>
+ <string name="settings_update_uptodate_now">Aggiornato (controllato proprio ora)</string>
+ <string name="settings_update_last_checked">Ultimo controllo: %1$s</string>
+ <string name="settings_update_never">Mai controllato</string>
+ <string name="settings_update_rate_limited">GitHub sta limitando le richieste in questo momento. Riprova tra qualche minuto.</string>
+ <string name="settings_update_failed">Impossibile cercare aggiornamenti. Controlla la connessione.</string>
+ <string name="drm_missing">La riproduzione qui non è possibile: l\'Android System WebView di questo telefono non ha un DRM Widevine funzionante, che Spotify richiede. Aggiorna Android System WebView e Chrome sul Play Store e selezionalo in Impostazioni &gt; Opzioni sviluppatore &gt; Implementazione WebView.</string>
+ <string name="song_unavailable_skipped">%1$s non è disponibile ed è stato saltato.</string>
+ <string name="song_unavailable">%1$s non è disponibile.</string>
+ <string name="songs_skipped_by_spotify">Spotify continuava a saltare brani che non riusciva a riprodurre, quindi la riproduzione è stata messa in pausa. Tocca riproduci per riprovare oppure controlla il tuo account e la connessione.</string>
+ <string name="playlist_leave">Esci dalla playlist</string>
+ <string name="playlist_leave_confirm">Uscire da %1$s? Non sarai più un collaboratore e non potrai aggiungere o rimuovere brani. Per rientrare ti servirà un nuovo link di invito.</string>
+ <string name="playlist_leave_button">Esci</string>
+ <string name="playlist_member_listener">Ascoltatore</string>
+ <string name="playlist_member_remove_collab">Rimuovi come collaboratore</string>
+ <string name="playlist_member_make_collab">Rendi collaboratore</string>
+ <string name="playlist_member_remove">Rimuovi dalla playlist</string>
+ <string name="playlist_stop_collab_private">Smettere di collaborare a %1$s? I collaboratori diventano ascoltatori: potranno ancora ascoltarla, ma non aggiungere o rimuovere più brani. I link di invito già condivisi restano validi fino alla scadenza (fino a 7 giorni) e non possono essere annullati.</string>
+ <string name="playlist_stop_collab_public">Smettere di collaborare a %1$s? I collaboratori vengono rimossi dalla playlist. I link di invito già condivisi restano validi fino alla scadenza (fino a 7 giorni) e non possono essere annullati.</string>
+ <string name="library_chip_playlists">Playlist</string>
+ <string name="library_chip_artists">Artisti</string>
+ <string name="library_chip_albums">Album</string>
+ <string name="library_chip_songs">Brani</string>
+ <string name="add_playlist_to_playlist">Aggiungi la playlist a un\'altra playlist</string>
+ <string name="add_collection_reading">Lettura dei brani…</string>
+ <string name="add_collection_nothing">Niente da aggiungere</string>
+ <string name="add_collection_done">%1$d brani aggiunti a %2$s</string>
+ <string name="duplicate_title_some">Alcuni sono già aggiunti</string>
+ <string name="duplicate_title_all">Già aggiunti</string>
+ <string name="duplicate_text_some">Alcuni di questi brani sono già in %1$s.</string>
+ <string name="duplicate_text_all">Questi brani sono già in %1$s.</string>
+ <string name="duplicate_add_all">Aggiungi tutti</string>
+ <string name="duplicate_add_new">Aggiungi i nuovi</string>
+ <string name="duplicate_add_anyway">Aggiungi comunque</string>
+ <string name="duplicate_dont_add">Non aggiungere</string>
+ <string name="settings_music_video_title">Video musicali</string>
+ <string name="settings_music_video_detail">Il pulsante video nel player e le clip che partono da sole. Disattivato: solo audio e Canvas.</string>
+ <string name="downloads_need_source">I download richiedono un\'estensione sorgente. Installane una in Impostazioni, Estensioni.</string>
+ <string name="downloads_source_row_title">Sorgente dei download</string>
+ <string name="downloads_source_row_on">Un\'estensione fornisce i file. Tocca per gestire le estensioni.</string>
+ <string name="downloads_source_row_off">Nessuna per ora: installa un\'estensione sorgente di download.</string>
+ <string name="profile_block">Blocca</string>
+ <string name="profile_unblock">Sblocca</string>
+ <string name="profile_block_title">Bloccare %1$s?</string>
+ <string name="profile_block_confirm">%1$s non potrà seguirti né vedere il tuo profilo e le tue playlist pubbliche. Puoi sbloccarlo dal suo profilo in qualsiasi momento.</string>
+ <string name="profile_blocked">Hai bloccato questo utente</string>
+ <string name="profile_block_failed">Impossibile modificare il blocco, riprova</string>
+ <string name="profile_more_options">Altre opzioni</string>
+ <string name="settings_look_title">Stile</string>
+ <string name="look_offer_title">Nuovo stile disponibile</string>
+ <string name="look_offer_try">Prova Immersivo</string>
+ <string name="look_offer_keep">Mantieni Classico</string>
+ <string name="look_offer_note">Puoi cambiarlo più tardi in Impostazioni &gt; Schermo e lingua.</string>
+ <string name="settings_headset_skip_title">Tasti delle cuffie: 15 s nei podcast</string>
+ <string name="settings_headset_skip_detail">Disattivato: passano all\'episodio successivo o precedente</string>
</resources>
diff --git a/base/app/src/main/res/values-it/security_strings.xml b/base/app/src/main/res/values-it/security_strings.xml
new file mode 100644
index 00000000..48bd3f6a
--- /dev/null
+++ b/base/app/src/main/res/values-it/security_strings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="action_playback_mirror">Mantiene Spotify in riproduzione silenziosa qui; conta gli ascolti sul tuo account</string>
+ <string name="mirror_indicator">Spotify rispecchiato da %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-it/sources_strings.xml b/base/app/src/main/res/values-it/sources_strings.xml
new file mode 100644
index 00000000..3da350a6
--- /dev/null
+++ b/base/app/src/main/res/values-it/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Sorgenti audio</string>
+ <string name="sources_download_title">Sorgenti di download</string>
+ <string name="sources_audio_footer">Vengono interrogate dall\'alto verso il basso per ogni brano: la prima che lo ha lo riproduce. Usa le frecce per cambiare l\'ordine.</string>
+ <string name="sources_download_footer">Vengono interrogate dall\'alto verso il basso: la prima sorgente che ha il brano fornisce il file. Usa le frecce per cambiare l\'ordine.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Riproduce quando nessuna sorgente sopra ha il brano</string>
+ <string name="sources_ready">Pronto</string>
+ <string name="sources_details_show">Mostra dettagli</string>
+ <string name="sources_details_hide">Nascondi dettagli</string>
+ <string name="sources_detail_version">Versione %1$s · di %2$s</string>
+ <string name="sources_last_used">Ultima: %1$s, %2$s</string>
+ <string name="sources_open">Apri l\'estensione</string>
+ <string name="sources_order_hint">Le sorgenti vengono interrogate nell\'ordine impostato nelle Impostazioni (Riproduzione, Download).</string>
+ <string name="sources_below_spotify">Non interpellato: Spotify è sopra</string>
+</resources>
diff --git a/base/app/src/main/res/values-it/stats_strings.xml b/base/app/src/main/res/values-it/stats_strings.xml
new file mode 100644
index 00000000..fb783ddc
--- /dev/null
+++ b/base/app/src/main/res/values-it/stats_strings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="stats_tab_spotify">Su Spotify</string>
+ <string name="stats_tab_phone">Su questo telefono</string>
+ <string name="stats_range_short">Ultime 4 settimane</string>
+ <string name="stats_range_medium">Ultimi 6 mesi</string>
+ <string name="stats_range_long">Ultimo anno</string>
+ <string name="stats_artists_ranked">%1$d artisti nei tuoi ascolti</string>
+ <string name="stats_empty">Spotify non ha ancora artisti o brani più ascoltati per questo periodo. Continua ad ascoltare e ricontrolla più tardi.</string>
+ <string name="stats_failed">Spotify non ha inviato le tue statistiche.</string>
+ <string name="stats_spotify_note">Classifica di Spotify basata su tutto ciò che questo account ha riprodotto, su ogni dispositivo. Spotify non condivide le riproduzioni né i minuti ascoltati: i minuti di «Su questo telefono» sono il conteggio di Myspoti.</string>
+ <string name="stats_weekly_minutes">Minuti a settimana</string>
+ <string name="stats_this_week">Questa settimana: %1$d min</string>
+ <string name="stats_listening_stats">Statistiche di ascolto</string>
+ <string name="friends_title">Attività degli amici</string>
+ <string name="friends_detail">Cosa ascoltano le persone che segui</string>
+ <string name="friends_now">Ora</string>
+ <string name="friends_empty">Nessuna attività degli amici per ora. Gli amici che segui e che condividono la propria attività di ascolto su Spotify compariranno qui.</string>
+ <string name="friends_failed">Spotify non ha inviato l\'attività degli amici.</string>
+ <string name="friends_refresh">Aggiorna</string>
+ <string name="artist_top_short">Il tuo artista n. %1$d delle ultime 4 settimane</string>
+ <string name="artist_top_medium">Il tuo artista n. %1$d degli ultimi 6 mesi</string>
+ <string name="artist_top_long">Il tuo artista n. %1$d dell\'ultimo anno</string>
+</resources>
diff --git a/base/app/src/main/res/values-it/strings.xml b/base/app/src/main/res/values-it/strings.xml
index 70c7e6d3..e017c192 100644
--- a/base/app/src/main/res/values-it/strings.xml
+++ b/base/app/src/main/res/values-it/strings.xml
@@ -20,4 +20,5 @@
<string name="video_fullscreen_enter">Schermo intero</string>
<string name="video_fullscreen_exit">Esci dallo schermo intero</string>
<string name="player_source_downloaded">Scaricato</string>
+ <string name="extension_change_write">Ora può anche inviare a Spotify: %1$s</string>
</resources>
diff --git a/base/app/src/main/res/values-it/update_consent_strings.xml b/base/app/src/main/res/values-it/update_consent_strings.xml
new file mode 100644
index 00000000..88ddc633
--- /dev/null
+++ b/base/app/src/main/res/values-it/update_consent_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="update_code_title">Il codice di %1$s è cambiato (%2$d righe, +%3$d/−%4$d)</string>
+ <string name="update_code_body">Questa estensione ha permessi potenti (azioni critiche o accesso di rete esteso): il nuovo codice non viene mai eseguito senza il tuo consenso.</string>
+ <string name="update_code_files">File modificati: %1$s</string>
+ <string name="update_code_update">Aggiorna</string>
+ <string name="update_code_later">Non ora</string>
+ <string name="update_check_waiting">Aggiornamento trovato: verrà applicato da solo tra 24 ore</string>
+ <string name="update_check_repo_changed">Aggiornamento rifiutato: il repository ha cambiato proprietario</string>
+ <string name="update_repo_changed_title">Il repository ha cambiato proprietario</string>
+ <string name="update_repo_changed_body">Questo repository è stato registrato di nuovo o trasferito con lo stesso nome, quindi i suoi aggiornamenti sono bloccati. Disinstallalo, o reinstallalo solo se ti fidi del nuovo proprietario.</string>
+ <string name="update_author_owner">di %1$s · repository di %2$s</string>
+ <string name="update_author_unverified">di %1$s · non verificato</string>
+</resources>
diff --git a/base/app/src/main/res/values-iw/sources_strings.xml b/base/app/src/main/res/values-iw/sources_strings.xml
new file mode 100644
index 00000000..a4539281
--- /dev/null
+++ b/base/app/src/main/res/values-iw/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">מקורות שמע</string>
+ <string name="sources_download_title">מקורות הורדה</string>
+ <string name="sources_audio_footer">נשאלים מלמעלה למטה לכל שיר: הראשון שיש לו אותו מנגן אותו. השתמשו בחצים כדי לשנות את הסדר.</string>
+ <string name="sources_download_footer">נשאלים מלמעלה למטה: המקור הראשון שיש לו את השיר מספק את הקובץ. השתמשו בחצים כדי לשנות את הסדר.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">מנגן כשאף מקור שמעליו אינו מכיל את השיר</string>
+ <string name="sources_ready">מוכן</string>
+ <string name="sources_details_show">הצג פרטים</string>
+ <string name="sources_details_hide">הסתר פרטים</string>
+ <string name="sources_detail_version">גרסה %1$s · מאת %2$s</string>
+ <string name="sources_last_used">אחרון: %1$s, %2$s</string>
+ <string name="sources_open">פתח את התוסף</string>
+ <string name="sources_order_hint">המקורות נשאלים לפי הסדר שנקבע בהגדרות (ניגון, הורדות).</string>
+ <string name="sources_below_spotify">לא נשאל: Spotify למעלה</string>
+</resources>
diff --git a/base/app/src/main/res/values-ja/sources_strings.xml b/base/app/src/main/res/values-ja/sources_strings.xml
new file mode 100644
index 00000000..c43d2e19
--- /dev/null
+++ b/base/app/src/main/res/values-ja/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">オーディオソース</string>
+ <string name="sources_download_title">ダウンロードソース</string>
+ <string name="sources_audio_footer">各曲について上から順に確認されます。曲を持っている最初のソースで再生されます。矢印で順序を変更できます。</string>
+ <string name="sources_download_footer">上から順に確認されます。曲を持っている最初のソースがファイルを提供します。矢印で順序を変更できます。</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">上にあるどのソースにも曲がない場合に再生されます</string>
+ <string name="sources_ready">準備完了</string>
+ <string name="sources_details_show">詳細を表示</string>
+ <string name="sources_details_hide">詳細を非表示</string>
+ <string name="sources_detail_version">バージョン %1$s · 作者 %2$s</string>
+ <string name="sources_last_used">最後: %1$s、%2$s</string>
+ <string name="sources_open">拡張機能を開く</string>
+ <string name="sources_order_hint">ソースは設定(再生、ダウンロード)で設定された順序で確認されます。</string>
+ <string name="sources_below_spotify">確認されません: Spotify が上にあります</string>
+</resources>
diff --git a/base/app/src/main/res/values-kn/sources_strings.xml b/base/app/src/main/res/values-kn/sources_strings.xml
new file mode 100644
index 00000000..2ea79bd9
--- /dev/null
+++ b/base/app/src/main/res/values-kn/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">ಆಡಿಯೋ ಮೂಲಗಳು</string>
+ <string name="sources_download_title">ಡೌನ್‌ಲೋಡ್ ಮೂಲಗಳು</string>
+ <string name="sources_audio_footer">ಪ್ರತಿ ಹಾಡಿಗೆ ಮೇಲಿನಿಂದ ಕೆಳಗೆ ಕೇಳಲಾಗುತ್ತದೆ: ಅದನ್ನು ಹೊಂದಿರುವ ಮೊದಲನೆಯದು ಅದನ್ನು ಪ್ಲೇ ಮಾಡುತ್ತದೆ. ಕ್ರಮವನ್ನು ಬದಲಿಸಲು ಬಾಣಗಳನ್ನು ಬಳಸಿ.</string>
+ <string name="sources_download_footer">ಮೇಲಿನಿಂದ ಕೆಳಗೆ ಕೇಳಲಾಗುತ್ತದೆ: ಹಾಡು ಇರುವ ಮೊದಲ ಮೂಲ ಫೈಲ್ ನೀಡುತ್ತದೆ. ಕ್ರಮವನ್ನು ಬದಲಿಸಲು ಬಾಣಗಳನ್ನು ಬಳಸಿ.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">ಮೇಲಿನ ಯಾವುದೇ ಮೂಲದಲ್ಲಿ ಹಾಡು ಇಲ್ಲದಿದ್ದಾಗ ಪ್ಲೇ ಆಗುತ್ತದೆ</string>
+ <string name="sources_ready">ಸಿದ್ಧ</string>
+ <string name="sources_details_show">ವಿವರಗಳನ್ನು ತೋರಿಸಿ</string>
+ <string name="sources_details_hide">ವಿವರಗಳನ್ನು ಮರೆಮಾಡಿ</string>
+ <string name="sources_detail_version">ಆವೃತ್ತಿ %1$s · ಲೇಖಕ %2$s</string>
+ <string name="sources_last_used">ಕೊನೆಯದು: %1$s, %2$s</string>
+ <string name="sources_open">ವಿಸ್ತರಣೆಯನ್ನು ತೆರೆ</string>
+ <string name="sources_order_hint">ಮೂಲಗಳನ್ನು ಸೆಟ್ಟಿಂಗ್‌ಗಳಲ್ಲಿ (ಪ್ಲೇಬ್ಯಾಕ್, ಡೌನ್‌ಲೋಡ್‌ಗಳು) ಹೊಂದಿಸಲಾದ ಕ್ರಮದಲ್ಲಿ ಕೇಳಲಾಗುತ್ತದೆ.</string>
+ <string name="sources_below_spotify">ಕೇಳಲಾಗುವುದಿಲ್ಲ: Spotify ಮೇಲಿದೆ</string>
+</resources>
diff --git a/base/app/src/main/res/values-ko/sources_strings.xml b/base/app/src/main/res/values-ko/sources_strings.xml
new file mode 100644
index 00000000..85223ec8
--- /dev/null
+++ b/base/app/src/main/res/values-ko/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">오디오 소스</string>
+ <string name="sources_download_title">다운로드 소스</string>
+ <string name="sources_audio_footer">각 곡마다 위에서 아래로 확인합니다. 곡을 가진 첫 번째 소스에서 재생됩니다. 화살표로 순서를 바꿀 수 있습니다.</string>
+ <string name="sources_download_footer">위에서 아래로 확인합니다. 곡을 가진 첫 번째 소스가 파일을 제공합니다. 화살표로 순서를 바꿀 수 있습니다.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">위에 있는 소스에 곡이 없을 때 재생됩니다</string>
+ <string name="sources_ready">준비됨</string>
+ <string name="sources_details_show">세부정보 표시</string>
+ <string name="sources_details_hide">세부정보 숨기기</string>
+ <string name="sources_detail_version">버전 %1$s · 제작 %2$s</string>
+ <string name="sources_last_used">최근: %1$s, %2$s</string>
+ <string name="sources_open">확장 기능 열기</string>
+ <string name="sources_order_hint">소스는 설정(재생, 다운로드)에서 정한 순서대로 확인됩니다.</string>
+ <string name="sources_below_spotify">묻지 않음: Spotify가 위에 있습니다</string>
+</resources>
diff --git a/base/app/src/main/res/values-lt/sources_strings.xml b/base/app/src/main/res/values-lt/sources_strings.xml
new file mode 100644
index 00000000..3a8da67d
--- /dev/null
+++ b/base/app/src/main/res/values-lt/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Garso šaltiniai</string>
+ <string name="sources_download_title">Atsisiuntimo šaltiniai</string>
+ <string name="sources_audio_footer">Kiekvienai dainai klausiama iš viršaus į apačią: pirmasis, turintis ją, ją paleidžia. Eiliškumą keiskite rodyklėmis.</string>
+ <string name="sources_download_footer">Klausiama iš viršaus į apačią: pirmasis šaltinis, turintis dainą, pateikia failą. Eiliškumą keiskite rodyklėmis.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Grojama, kai nė vienas aukščiau esantis šaltinis neturi dainos</string>
+ <string name="sources_ready">Paruošta</string>
+ <string name="sources_details_show">Rodyti išsamiau</string>
+ <string name="sources_details_hide">Slėpti išsamiau</string>
+ <string name="sources_detail_version">Versija %1$s · autorius %2$s</string>
+ <string name="sources_last_used">Paskutinis: %1$s, %2$s</string>
+ <string name="sources_open">Atidaryti plėtinį</string>
+ <string name="sources_order_hint">Šaltiniai tikrinami Nustatymuose (Atkūrimas, Atsisiuntimai) nustatyta tvarka.</string>
+ <string name="sources_below_spotify">Neklausiama: Spotify yra aukščiau</string>
+</resources>
diff --git a/base/app/src/main/res/values-lv/sources_strings.xml b/base/app/src/main/res/values-lv/sources_strings.xml
new file mode 100644
index 00000000..da67cb99
--- /dev/null
+++ b/base/app/src/main/res/values-lv/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Audio avoti</string>
+ <string name="sources_download_title">Lejupielādes avoti</string>
+ <string name="sources_audio_footer">Katrai dziesmai jautā no augšas uz leju: pirmais, kuram tā ir, to atskaņo. Kārtību maina ar bultiņām.</string>
+ <string name="sources_download_footer">Jautā no augšas uz leju: pirmais avots, kuram ir dziesma, nodrošina failu. Kārtību maina ar bultiņām.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Atskaņo, kad nevienam augstāk esošajam avotam nav dziesmas</string>
+ <string name="sources_ready">Gatavs</string>
+ <string name="sources_details_show">Rādīt detaļas</string>
+ <string name="sources_details_hide">Slēpt detaļas</string>
+ <string name="sources_detail_version">Versija %1$s · autors %2$s</string>
+ <string name="sources_last_used">Pēdējais: %1$s, %2$s</string>
+ <string name="sources_open">Atvērt paplašinājumu</string>
+ <string name="sources_order_hint">Avotiem jautā iestatījumos (Atskaņošana, Lejupielādes) noteiktajā secībā.</string>
+ <string name="sources_below_spotify">Netiek jautāts: Spotify ir augstāk</string>
+</resources>
diff --git a/base/app/src/main/res/values-mk/sources_strings.xml b/base/app/src/main/res/values-mk/sources_strings.xml
new file mode 100644
index 00000000..1d28db51
--- /dev/null
+++ b/base/app/src/main/res/values-mk/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Аудио извори</string>
+ <string name="sources_download_title">Извори за преземање</string>
+ <string name="sources_audio_footer">За секоја песна се прашуваат одозгора надолу: првиот што ја има ја пушта. Со стрелките го менувате редоследот.</string>
+ <string name="sources_download_footer">Се прашуваат одозгора надолу: првиот извор што ја има песната ја дава датотеката. Со стрелките го менувате редоследот.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Пушта кога ниту еден извор над него нема песна</string>
+ <string name="sources_ready">Подготвено</string>
+ <string name="sources_details_show">Прикажи детали</string>
+ <string name="sources_details_hide">Скриј детали</string>
+ <string name="sources_detail_version">Верзија %1$s · од %2$s</string>
+ <string name="sources_last_used">Последно: %1$s, %2$s</string>
+ <string name="sources_open">Отвори го проширувањето</string>
+ <string name="sources_order_hint">Изворите се прашуваат по редоследот поставен во Поставки (Репродукција, Преземања).</string>
+ <string name="sources_below_spotify">Не се прашува: Spotify е погоре</string>
+</resources>
diff --git a/base/app/src/main/res/values-ml/sources_strings.xml b/base/app/src/main/res/values-ml/sources_strings.xml
new file mode 100644
index 00000000..a50b5a2d
--- /dev/null
+++ b/base/app/src/main/res/values-ml/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">ഓഡിയോ ഉറവിടങ്ങൾ</string>
+ <string name="sources_download_title">ഡൗൺലോഡ് ഉറവിടങ്ങൾ</string>
+ <string name="sources_audio_footer">ഓരോ പാട്ടിനും മുകളിൽ നിന്ന് താഴേക്ക് ചോദിക്കുന്നു: അത് ഉള്ള ആദ്യത്തേത് പ്ലേ ചെയ്യുന്നു. ക്രമം മാറ്റാൻ അമ്പടയാളങ്ങൾ ഉപയോഗിക്കുക.</string>
+ <string name="sources_download_footer">മുകളിൽ നിന്ന് താഴേക്ക് ചോദിക്കുന്നു: പാട്ടുള്ള ആദ്യ ഉറവിടം ഫയൽ നൽകുന്നു. ക്രമം മാറ്റാൻ അമ്പടയാളങ്ങൾ ഉപയോഗിക്കുക.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">മുകളിലുള്ള ഒരു ഉറവിടത്തിലും പാട്ടില്ലെങ്കിൽ പ്ലേ ചെയ്യുന്നു</string>
+ <string name="sources_ready">തയ്യാർ</string>
+ <string name="sources_details_show">വിശദാംശങ്ങൾ കാണിക്കുക</string>
+ <string name="sources_details_hide">വിശദാംശങ്ങൾ മറയ്ക്കുക</string>
+ <string name="sources_detail_version">പതിപ്പ് %1$s · %2$s വഴി</string>
+ <string name="sources_last_used">അവസാനം: %1$s, %2$s</string>
+ <string name="sources_open">എക്സ്റ്റൻഷൻ തുറക്കുക</string>
+ <string name="sources_order_hint">ക്രമീകരണങ്ങളിൽ (പ്ലേബാക്ക്, ഡൗൺലോഡുകൾ) സജ്ജമാക്കിയ ക്രമത്തിലാണ് ഉറവിടങ്ങൾ ചോദിക്കുന്നത്.</string>
+ <string name="sources_below_spotify">ചോദിക്കില്ല: Spotify മുകളിലാണ്</string>
+</resources>
diff --git a/base/app/src/main/res/values-mr/sources_strings.xml b/base/app/src/main/res/values-mr/sources_strings.xml
new file mode 100644
index 00000000..12f50102
--- /dev/null
+++ b/base/app/src/main/res/values-mr/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">ऑडिओ स्रोत</string>
+ <string name="sources_download_title">डाउनलोड स्रोत</string>
+ <string name="sources_audio_footer">प्रत्येक गाण्यासाठी वरपासून खालपर्यंत विचारले जाते: ज्याच्याकडे ते आहे तो पहिला स्रोत ते वाजवतो. क्रम बदलण्यासाठी बाण वापरा.</string>
+ <string name="sources_download_footer">वरपासून खालपर्यंत विचारले जाते: गाणे असलेला पहिला स्रोत फाइल देतो. क्रम बदलण्यासाठी बाण वापरा.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">वरील कोणत्याही स्रोतात गाणे नसल्यास वाजते</string>
+ <string name="sources_ready">तयार</string>
+ <string name="sources_details_show">तपशील दाखवा</string>
+ <string name="sources_details_hide">तपशील लपवा</string>
+ <string name="sources_detail_version">आवृत्ती %1$s · %2$s द्वारे</string>
+ <string name="sources_last_used">शेवटचे: %1$s, %2$s</string>
+ <string name="sources_open">विस्तार उघडा</string>
+ <string name="sources_order_hint">सेटिंग्जमध्ये (प्लेबॅक, डाउनलोड) ठरवलेल्या क्रमाने स्रोत विचारले जातात.</string>
+ <string name="sources_below_spotify">विचारले जात नाही: Spotify वर आहे</string>
+</resources>
diff --git a/base/app/src/main/res/values-ms/sources_strings.xml b/base/app/src/main/res/values-ms/sources_strings.xml
new file mode 100644
index 00000000..8335161f
--- /dev/null
+++ b/base/app/src/main/res/values-ms/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Sumber audio</string>
+ <string name="sources_download_title">Sumber muat turun</string>
+ <string name="sources_audio_footer">Ditanya dari atas ke bawah untuk setiap lagu: yang pertama memilikinya akan memainkannya. Gunakan anak panah untuk menukar susunan.</string>
+ <string name="sources_download_footer">Ditanya dari atas ke bawah: sumber pertama yang mempunyai lagu itu memberikan fail. Gunakan anak panah untuk menukar susunan.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Dimainkan apabila tiada sumber di atasnya mempunyai lagu itu</string>
+ <string name="sources_ready">Sedia</string>
+ <string name="sources_details_show">Tunjuk butiran</string>
+ <string name="sources_details_hide">Sembunyikan butiran</string>
+ <string name="sources_detail_version">Versi %1$s · oleh %2$s</string>
+ <string name="sources_last_used">Terakhir: %1$s, %2$s</string>
+ <string name="sources_open">Buka sambungan</string>
+ <string name="sources_order_hint">Sumber ditanya mengikut susunan yang ditetapkan dalam Tetapan (Main Balik, Muat Turun).</string>
+ <string name="sources_below_spotify">Tidak ditanya: Spotify berada di atas</string>
+</resources>
diff --git a/base/app/src/main/res/values-nb/sources_strings.xml b/base/app/src/main/res/values-nb/sources_strings.xml
new file mode 100644
index 00000000..3261ed76
--- /dev/null
+++ b/base/app/src/main/res/values-nb/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Lydkilder</string>
+ <string name="sources_download_title">Nedlastingskilder</string>
+ <string name="sources_audio_footer">Spørres fra topp til bunn for hver sang: den første som har den, spiller den av. Bruk pilene for å endre rekkefølgen.</string>
+ <string name="sources_download_footer">Spørres fra topp til bunn: den første kilden som har sangen, leverer filen. Bruk pilene for å endre rekkefølgen.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Spilles når ingen kilde over den har sangen</string>
+ <string name="sources_ready">Klar</string>
+ <string name="sources_details_show">Vis detaljer</string>
+ <string name="sources_details_hide">Skjul detaljer</string>
+ <string name="sources_detail_version">Versjon %1$s · av %2$s</string>
+ <string name="sources_last_used">Sist: %1$s, %2$s</string>
+ <string name="sources_open">Åpne utvidelsen</string>
+ <string name="sources_order_hint">Kildene spørres i rekkefølgen som er satt under Innstillinger (Avspilling, Nedlastinger).</string>
+ <string name="sources_below_spotify">Spørres ikke: Spotify er over</string>
+</resources>
diff --git a/base/app/src/main/res/values-ne/sources_strings.xml b/base/app/src/main/res/values-ne/sources_strings.xml
new file mode 100644
index 00000000..38b392bd
--- /dev/null
+++ b/base/app/src/main/res/values-ne/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">अडियो स्रोतहरू</string>
+ <string name="sources_download_title">डाउनलोड स्रोतहरू</string>
+ <string name="sources_audio_footer">हरेक गीतका लागि माथिदेखि तलसम्म सोधिन्छ: जसको सँग छ त्यो पहिलो स्रोतले बजाउँछ। क्रम बदल्न तीरहरू प्रयोग गर्नुहोस्।</string>
+ <string name="sources_download_footer">माथिदेखि तलसम्म सोधिन्छ: गीत भएको पहिलो स्रोतले फाइल दिन्छ। क्रम बदल्न तीरहरू प्रयोग गर्नुहोस्।</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">माथिको कुनै पनि स्रोतमा गीत नभएमा बज्छ</string>
+ <string name="sources_ready">तयार</string>
+ <string name="sources_details_show">विवरणहरू देखाउनुहोस्</string>
+ <string name="sources_details_hide">विवरणहरू लुकाउनुहोस्</string>
+ <string name="sources_detail_version">संस्करण %1$s · द्वारा %2$s</string>
+ <string name="sources_last_used">अन्तिम: %1$s, %2$s</string>
+ <string name="sources_open">एक्सटेन्सन खोल्नुहोस्</string>
+ <string name="sources_order_hint">स्रोतहरू सेटिङ (प्लेब्याक, डाउनलोडहरू) मा तोकिएको क्रममा सोधिन्छ।</string>
+ <string name="sources_below_spotify">सोधिँदैन: Spotify माथि छ</string>
+</resources>
diff --git a/base/app/src/main/res/values-nl/sources_strings.xml b/base/app/src/main/res/values-nl/sources_strings.xml
new file mode 100644
index 00000000..2524f3df
--- /dev/null
+++ b/base/app/src/main/res/values-nl/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Audiobronnen</string>
+ <string name="sources_download_title">Downloadbronnen</string>
+ <string name="sources_audio_footer">Wordt van boven naar beneden gevraagd voor elk nummer: de eerste die het heeft, speelt het af. Gebruik de pijltjes om de volgorde te wijzigen.</string>
+ <string name="sources_download_footer">Wordt van boven naar beneden gevraagd: de eerste bron die het nummer heeft, levert het bestand. Gebruik de pijltjes om de volgorde te wijzigen.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Speelt af wanneer geen bron erboven het nummer heeft</string>
+ <string name="sources_ready">Klaar</string>
+ <string name="sources_details_show">Details tonen</string>
+ <string name="sources_details_hide">Details verbergen</string>
+ <string name="sources_detail_version">Versie %1$s · door %2$s</string>
+ <string name="sources_last_used">Laatst: %1$s, %2$s</string>
+ <string name="sources_open">Extensie openen</string>
+ <string name="sources_order_hint">Bronnen worden gevraagd in de volgorde die is ingesteld in Instellingen (Afspelen, Downloads).</string>
+ <string name="sources_below_spotify">Niet gevraagd: Spotify staat erboven</string>
+</resources>
diff --git a/base/app/src/main/res/values-or/sources_strings.xml b/base/app/src/main/res/values-or/sources_strings.xml
new file mode 100644
index 00000000..feabeb3d
--- /dev/null
+++ b/base/app/src/main/res/values-or/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">ଅଡିଓ ଉତ୍ସ</string>
+ <string name="sources_download_title">ଡାଉନଲୋଡ୍ ଉତ୍ସ</string>
+ <string name="sources_audio_footer">ପ୍ରତ୍ୟେକ ଗୀତ ପାଇଁ ଉପରରୁ ତଳକୁ ପଚରାଯାଏ: ଯାହା ପାଖରେ ଥାଏ ପ୍ରଥମଟି ତାହା ଚଲାଏ। କ୍ରମ ବଦଳାଇବାକୁ ତୀର ବ୍ୟବହାର କରନ୍ତୁ।</string>
+ <string name="sources_download_footer">ଉପରରୁ ତଳକୁ ପଚରାଯାଏ: ଗୀତ ଥିବା ପ୍ରଥମ ଉତ୍ସ ଫାଇଲ୍ ଦିଏ। କ୍ରମ ବଦଳାଇବାକୁ ତୀର ବ୍ୟବହାର କରନ୍ତୁ।</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">ଉପରେ ଥିବା କୌଣସି ଉତ୍ସରେ ଗୀତ ନ ଥିଲେ ଚାଲେ</string>
+ <string name="sources_ready">ପ୍ରସ୍ତୁତ</string>
+ <string name="sources_details_show">ବିବରଣୀ ଦେଖାନ୍ତୁ</string>
+ <string name="sources_details_hide">ବିବରଣୀ ଲୁଚାନ୍ତୁ</string>
+ <string name="sources_detail_version">ସଂସ୍କରଣ %1$s · ଦ୍ୱାରା %2$s</string>
+ <string name="sources_last_used">ଶେଷ: %1$s, %2$s</string>
+ <string name="sources_open">ଏକ୍ସଟେନସନ୍ ଖୋଲନ୍ତୁ</string>
+ <string name="sources_order_hint">ସେଟିଂସ୍ (ପ୍ଲେବ୍ୟାକ୍, ଡାଉନଲୋଡ୍) ରେ ସେଟ୍ ହୋଇଥିବା କ୍ରମରେ ଉତ୍ସ ପଚରାଯାଏ।</string>
+ <string name="sources_below_spotify">ପଚରାଯାଏ ନାହିଁ: Spotify ଉପରେ ଅଛି</string>
+</resources>
diff --git a/base/app/src/main/res/values-pa-rIN/sources_strings.xml b/base/app/src/main/res/values-pa-rIN/sources_strings.xml
new file mode 100644
index 00000000..3932c42d
--- /dev/null
+++ b/base/app/src/main/res/values-pa-rIN/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">ਆਡੀਓ ਸਰੋਤ</string>
+ <string name="sources_download_title">ਡਾਊਨਲੋਡ ਸਰੋਤ</string>
+ <string name="sources_audio_footer">ਹਰ ਗੀਤ ਲਈ ਉੱਪਰੋਂ ਹੇਠਾਂ ਪੁੱਛਿਆ ਜਾਂਦਾ ਹੈ: ਜਿਸ ਕੋਲ ਇਹ ਹੋਵੇ ਉਹ ਪਹਿਲਾ ਚਲਾਉਂਦਾ ਹੈ। ਕ੍ਰਮ ਬਦਲਣ ਲਈ ਤੀਰਾਂ ਦੀ ਵਰਤੋਂ ਕਰੋ।</string>
+ <string name="sources_download_footer">ਉੱਪਰੋਂ ਹੇਠਾਂ ਪੁੱਛਿਆ ਜਾਂਦਾ ਹੈ: ਗੀਤ ਵਾਲਾ ਪਹਿਲਾ ਸਰੋਤ ਫਾਈਲ ਦਿੰਦਾ ਹੈ। ਕ੍ਰਮ ਬਦਲਣ ਲਈ ਤੀਰਾਂ ਦੀ ਵਰਤੋਂ ਕਰੋ।</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">ਉੱਪਰ ਦੇ ਕਿਸੇ ਵੀ ਸਰੋਤ ਕੋਲ ਗੀਤ ਨਾ ਹੋਵੇ ਤਾਂ ਚੱਲਦਾ ਹੈ</string>
+ <string name="sources_ready">ਤਿਆਰ</string>
+ <string name="sources_details_show">ਵੇਰਵੇ ਦਿਖਾਓ</string>
+ <string name="sources_details_hide">ਵੇਰਵੇ ਲੁਕਾਓ</string>
+ <string name="sources_detail_version">ਵਰਜਨ %1$s · ਵੱਲੋਂ %2$s</string>
+ <string name="sources_last_used">ਆਖ਼ਰੀ: %1$s, %2$s</string>
+ <string name="sources_open">ਐਕਸਟੈਨਸ਼ਨ ਖੋਲ੍ਹੋ</string>
+ <string name="sources_order_hint">ਸਰੋਤ ਸੈਟਿੰਗਾਂ (ਪਲੇਬੈਕ, ਡਾਊਨਲੋਡ) ਵਿੱਚ ਤੈਅ ਕੀਤੇ ਕ੍ਰਮ ਅਨੁਸਾਰ ਪੁੱਛੇ ਜਾਂਦੇ ਹਨ।</string>
+ <string name="sources_below_spotify">ਨਹੀਂ ਪੁੱਛਿਆ ਜਾਂਦਾ: Spotify ਉੱਪਰ ਹੈ</string>
+</resources>
diff --git a/base/app/src/main/res/values-pa-rPK/sources_strings.xml b/base/app/src/main/res/values-pa-rPK/sources_strings.xml
new file mode 100644
index 00000000..4b3cd989
--- /dev/null
+++ b/base/app/src/main/res/values-pa-rPK/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">آڈیو ذرائع</string>
+ <string name="sources_download_title">ڈاؤن لوڈ ذرائع</string>
+ <string name="sources_audio_footer">ہر گانے کے لیے اوپر سے نیچے پوچھا جاتا ہے: جس کے پاس ہو وہ پہلا اسے چلاتا ہے۔ ترتیب بدلنے کے لیے تیروں کا استعمال کریں۔</string>
+ <string name="sources_download_footer">اوپر سے نیچے پوچھا جاتا ہے: گانا رکھنے والا پہلا ذریعہ فائل دیتا ہے۔ ترتیب بدلنے کے لیے تیروں کا استعمال کریں۔</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">اوپر کسی ذریعے کے پاس گانا نہ ہو تو چلتا ہے</string>
+ <string name="sources_ready">تیار</string>
+ <string name="sources_details_show">تفصیلات دکھائیں</string>
+ <string name="sources_details_hide">تفصیلات چھپائیں</string>
+ <string name="sources_detail_version">ورژن %1$s · بذریعہ %2$s</string>
+ <string name="sources_last_used">آخری: %1$s، %2$s</string>
+ <string name="sources_open">ایکسٹینشن کھولیں</string>
+ <string name="sources_order_hint">ذرائع سیٹنگز (پلے بیک، ڈاؤن لوڈز) میں طے شدہ ترتیب سے پوچھے جاتے ہیں۔</string>
+ <string name="sources_below_spotify">نہیں پوچھا جاتا: Spotify اوپر ہے</string>
+</resources>
diff --git a/base/app/src/main/res/values-pa/sources_strings.xml b/base/app/src/main/res/values-pa/sources_strings.xml
new file mode 100644
index 00000000..3932c42d
--- /dev/null
+++ b/base/app/src/main/res/values-pa/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">ਆਡੀਓ ਸਰੋਤ</string>
+ <string name="sources_download_title">ਡਾਊਨਲੋਡ ਸਰੋਤ</string>
+ <string name="sources_audio_footer">ਹਰ ਗੀਤ ਲਈ ਉੱਪਰੋਂ ਹੇਠਾਂ ਪੁੱਛਿਆ ਜਾਂਦਾ ਹੈ: ਜਿਸ ਕੋਲ ਇਹ ਹੋਵੇ ਉਹ ਪਹਿਲਾ ਚਲਾਉਂਦਾ ਹੈ। ਕ੍ਰਮ ਬਦਲਣ ਲਈ ਤੀਰਾਂ ਦੀ ਵਰਤੋਂ ਕਰੋ।</string>
+ <string name="sources_download_footer">ਉੱਪਰੋਂ ਹੇਠਾਂ ਪੁੱਛਿਆ ਜਾਂਦਾ ਹੈ: ਗੀਤ ਵਾਲਾ ਪਹਿਲਾ ਸਰੋਤ ਫਾਈਲ ਦਿੰਦਾ ਹੈ। ਕ੍ਰਮ ਬਦਲਣ ਲਈ ਤੀਰਾਂ ਦੀ ਵਰਤੋਂ ਕਰੋ।</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">ਉੱਪਰ ਦੇ ਕਿਸੇ ਵੀ ਸਰੋਤ ਕੋਲ ਗੀਤ ਨਾ ਹੋਵੇ ਤਾਂ ਚੱਲਦਾ ਹੈ</string>
+ <string name="sources_ready">ਤਿਆਰ</string>
+ <string name="sources_details_show">ਵੇਰਵੇ ਦਿਖਾਓ</string>
+ <string name="sources_details_hide">ਵੇਰਵੇ ਲੁਕਾਓ</string>
+ <string name="sources_detail_version">ਵਰਜਨ %1$s · ਵੱਲੋਂ %2$s</string>
+ <string name="sources_last_used">ਆਖ਼ਰੀ: %1$s, %2$s</string>
+ <string name="sources_open">ਐਕਸਟੈਨਸ਼ਨ ਖੋਲ੍ਹੋ</string>
+ <string name="sources_order_hint">ਸਰੋਤ ਸੈਟਿੰਗਾਂ (ਪਲੇਬੈਕ, ਡਾਊਨਲੋਡ) ਵਿੱਚ ਤੈਅ ਕੀਤੇ ਕ੍ਰਮ ਅਨੁਸਾਰ ਪੁੱਛੇ ਜਾਂਦੇ ਹਨ।</string>
+ <string name="sources_below_spotify">ਨਹੀਂ ਪੁੱਛਿਆ ਜਾਂਦਾ: Spotify ਉੱਪਰ ਹੈ</string>
+</resources>
diff --git a/base/app/src/main/res/values-pl/extensions_strings.xml b/base/app/src/main/res/values-pl/extensions_strings.xml
index 71dc8466..1014ecf3 100644
--- a/base/app/src/main/res/values-pl/extensions_strings.xml
+++ b/base/app/src/main/res/values-pl/extensions_strings.xml
@@ -208,4 +208,9 @@
<string name="ext_grants_title">Zawsze dozwolone</string>
<string name="ext_grants_note">Zmiany w Spotify, które to rozszerzenie wykonuje bez pytania. Cofnij jedną, by znów być pytanym.</string>
<string name="ext_grant_revoke">Cofnij</string>
+ <string name="extensions_unreadable_file">Nie udało się odczytać pliku</string>
+ <string name="ext_welcome_title">Zainstalowano: %1$s</string>
+ <string name="ext_welcome_steps">Na koniec</string>
+ <string name="ext_welcome_from">Napisane przez rozszerzenie.</string>
+ <string name="ext_welcome_ok">Rozumiem</string>
</resources>
diff --git a/base/app/src/main/res/values-pl/immersive_detail_strings.xml b/base/app/src/main/res/values-pl/immersive_detail_strings.xml
new file mode 100644
index 00000000..c2fa7eab
--- /dev/null
+++ b/base/app/src/main/res/values-pl/immersive_detail_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_detail_pause">Wstrzymaj</string>
+ <string name="immersive_detail_save">Zapisz w bibliotece</string>
+ <string name="immersive_detail_unsave">Usuń z biblioteki</string>
+ <string name="immersive_detail_find">Znajdź na liście</string>
+ <string name="immersive_detail_smart_shuffle_on">Inteligentne losowanie włączone: rekomendacje dołączają do wylosowanej listy.</string>
+ <string name="immersive_detail_more">Więcej</string>
+ <string name="immersive_detail_less">Mniej</string>
+ <string name="immersive_detail_featured_on">Występuje na</string>
+ <string name="immersive_detail_remove_local">Usuń z tej playlisty</string>
+ <string name="immersive_detail_follow">Obserwuj</string>
+ <string name="immersive_detail_unfollow">Przestań obserwować</string>
+</resources>
diff --git a/base/app/src/main/res/values-pl/immersive_genius_strings.xml b/base/app/src/main/res/values-pl/immersive_genius_strings.xml
new file mode 100644
index 00000000..7a83de36
--- /dev/null
+++ b/base/app/src/main/res/values-pl/immersive_genius_strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_genius_none">Genius nie ma nic o tym utworze.</string>
+ <string name="immersive_genius_error">Genius jest teraz niedostępny.</string>
+ <string name="immersive_genius_view">Zobacz w Genius</string>
+</resources>
diff --git a/base/app/src/main/res/values-pl/immersive_lyrics_strings.xml b/base/app/src/main/res/values-pl/immersive_lyrics_strings.xml
new file mode 100644
index 00000000..2ca5064c
--- /dev/null
+++ b/base/app/src/main/res/values-pl/immersive_lyrics_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_lyrics_instrumental">Instrumentalny</string>
+ <string name="immersive_lyrics_none">Brak tekstu dla tego utworu</string>
+ <string name="immersive_queue_title">Kolejka</string>
+ <string name="immersive_queue_now_playing">Teraz odtwarzane</string>
+ <string name="immersive_queue_empty">Kolejka jest pusta</string>
+ <string name="immersive_queue_remove">Usuń z kolejki</string>
+ <string name="immersive_queue_reorder">Przesuń w kolejce</string>
+ <string name="immersive_queue_shuffle">Losowo</string>
+ <string name="immersive_queue_repeat">Powtarzaj</string>
+</resources>
diff --git a/base/app/src/main/res/values-pl/immersive_pages_strings.xml b/base/app/src/main/res/values-pl/immersive_pages_strings.xml
new file mode 100644
index 00000000..bfbb1b52
--- /dev/null
+++ b/base/app/src/main/res/values-pl/immersive_pages_strings.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_pages_songs">Utwory</string>
+ <string name="immersive_pages_artists">Wykonawcy</string>
+ <string name="immersive_pages_albums">Albumy</string>
+ <string name="immersive_pages_unknown_artist">Nieznany wykonawca</string>
+ <string name="immersive_pages_unknown_album">Nieznany album</string>
+ <string name="immersive_pages_name_hint">Nazwa</string>
+ <string name="immersive_pages_play_group">Odtwórz: %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-pl/immersive_player_strings.xml b/base/app/src/main/res/values-pl/immersive_player_strings.xml
new file mode 100644
index 00000000..2b689a7b
--- /dev/null
+++ b/base/app/src/main/res/values-pl/immersive_player_strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_player_close">Zamknij odtwarzacz</string>
+ <string name="immersive_player_play">Odtwarzaj</string>
+ <string name="immersive_player_pause">Wstrzymaj</string>
+ <string name="immersive_player_previous">Poprzedni</string>
+ <string name="immersive_player_next">Następny</string>
+ <string name="immersive_player_like">Dodaj do polubionych utworów</string>
+ <string name="immersive_player_unlike">Usuń z polubionych utworów</string>
+ <string name="immersive_player_more">Więcej</string>
+ <string name="immersive_player_lyrics">Tekst</string>
+ <string name="immersive_player_lyrics_close">Zamknij tekst</string>
+ <string name="immersive_player_queue">Następne</string>
+ <string name="immersive_player_queue_close">Zamknij kolejkę</string>
+ <string name="immersive_player_devices">Urządzenia</string>
+ <string name="immersive_player_shuffle_on">Losowo: włączone</string>
+ <string name="immersive_player_shuffle_off">Losowo: wyłączone</string>
+ <string name="immersive_player_repeat_off">Powtarzanie: wyłączone</string>
+ <string name="immersive_player_repeat_all">Powtarzanie: wszystko</string>
+ <string name="immersive_player_repeat_one">Powtarzanie: jeden utwór</string>
+ <string name="immersive_player_volume_down">Ciszej</string>
+ <string name="immersive_player_volume_up">Głośniej</string>
+ <string name="immersive_player_ad">Reklama</string>
+ <string name="immersive_player_explicit">Treści nieodpowiednie dla dzieci</string>
+ <string name="immersive_player_added_to_liked">Dodano do polubionych utworów</string>
+ <string name="immersive_player_mini_player">Otwórz odtwarzacz</string>
+</resources>
diff --git a/base/app/src/main/res/values-pl/immersive_screens_strings.xml b/base/app/src/main/res/values-pl/immersive_screens_strings.xml
new file mode 100644
index 00000000..40af31d0
--- /dev/null
+++ b/base/app/src/main/res/values-pl/immersive_screens_strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_screens_account">Konto</string>
+ <string name="immersive_screens_account_page">Strona konta</string>
+ <string name="immersive_screens_account_page_detail">Plan, prywatność i urządzenia</string>
+ <string name="immersive_screens_top_result">Najlepszy wynik</string>
+ <string name="immersive_screens_reset_order">Przywróć domyślną kolejność</string>
+</resources>
diff --git a/base/app/src/main/res/values-pl/immersive_shell_strings.xml b/base/app/src/main/res/values-pl/immersive_shell_strings.xml
new file mode 100644
index 00000000..d27d2fa6
--- /dev/null
+++ b/base/app/src/main/res/values-pl/immersive_shell_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_shell_back">Wstecz</string>
+ <string name="immersive_shell_more">Więcej opcji</string>
+ <string name="immersive_shell_search_hint">Szukaj</string>
+ <string name="immersive_shell_search_clear">Wyczyść wyszukiwanie</string>
+ <string name="immersive_shell_play">Odtwarzaj</string>
+ <string name="immersive_shell_shuffle">Losowo</string>
+ <string name="immersive_shell_see_all">Zobacz wszystko</string>
+ <string name="immersive_shell_now_playing">Teraz odtwarzane</string>
+ <string name="immersive_shell_explicit">Treści nieodpowiednie dla dzieci</string>
+</resources>
diff --git a/base/app/src/main/res/values-pl/myspoti_strings.xml b/base/app/src/main/res/values-pl/myspoti_strings.xml
index 7345a936..4436f2be 100644
--- a/base/app/src/main/res/values-pl/myspoti_strings.xml
+++ b/base/app/src/main/res/values-pl/myspoti_strings.xml
@@ -466,4 +466,70 @@
<string name="look_offer_try">Wypróbuj Immersyjny</string>
<string name="look_offer_keep">Zostaw Klasyczny</string>
<string name="look_offer_note">Możesz to zmienić później w Ustawienia > Wyświetlanie i język.</string>
+ <string name="downloads_lists">Albumy i playlisty</string>
+ <string name="downloads_singles">Utwory</string>
+ <string name="downloads_kind_album">Album</string>
+ <string name="downloads_kind_playlist">Playlista</string>
+ <string name="downloads_kind_liked">Polubione utwory</string>
+ <string name="settings_tab_appearance">Wygląd</string>
+ <string name="settings_tab_about">Informacje</string>
+ <string name="settings_about_version">Wersja %1$s</string>
+ <string name="settings_update_available">Dostępna wersja %1$s</string>
+ <string name="settings_update_available_detail">Dotknij, aby pobrać i zainstalować</string>
+ <string name="setup_look_title">Wybierz swój wygląd</string>
+ <string name="setup_look_subtitle">Obejrzyj podgląd, a potem wybierz ten, który Ci się podoba.</string>
+ <string name="look_classic">Klasyczny</string>
+ <string name="look_classic_detail">Ciemny odtwarzacz w kolorach okładki, okrągły przycisk odtwarzania</string>
+ <string name="look_immersive">Immersyjny</string>
+ <string name="look_immersive_detail">Duża okładka, kolory albumu, animowane teksty</string>
+ <string name="setup_look_preview">Podgląd wyglądu „%1$s”</string>
+ <string name="setup_look_tap_hint">Dotknij podglądu, aby go wstrzymać, przesuń palcem, aby zmienić</string>
+ <string name="setup_look_still_hint">Animacje są wyłączone na tym telefonie: trzy nieruchome klatki</string>
+ <string name="setup_look_still_player">Odtwarzacz</string>
+ <string name="setup_look_still_paused">Wstrzymano</string>
+ <string name="setup_look_still_lyrics">Tekst</string>
+ <string name="look_demo_all">Wszystko</string>
+ <string name="look_demo_music">Muzyka</string>
+ <string name="look_demo_podcasts">Podcasty</string>
+ <string name="look_demo_section">Stworzone dla Ciebie</string>
+ <string name="settings_update_refresh">Sprawdź aktualizacje</string>
+ <string name="settings_update_uptodate_now">Aktualne (sprawdzono przed chwilą)</string>
+ <string name="settings_update_last_checked">Ostatnie sprawdzenie: %1$s</string>
+ <string name="settings_update_never">Nigdy nie sprawdzano</string>
+ <string name="settings_update_rate_limited">GitHub ogranicza teraz liczbę żądań. Spróbuj ponownie za kilka minut.</string>
+ <string name="settings_update_failed">Nie udało się sprawdzić aktualizacji. Sprawdź połączenie.</string>
+ <string name="song_unavailable_skipped">Utwór %1$s jest niedostępny i został pominięty.</string>
+ <string name="song_unavailable">Utwór %1$s jest niedostępny.</string>
+ <string name="songs_skipped_by_spotify">Spotify wciąż pomijał utwory, których nie mógł odtworzyć, więc odtwarzanie wstrzymano. Dotknij odtwarzania, aby spróbować ponownie, lub sprawdź konto i połączenie.</string>
+ <string name="playlist_member_listener">Słuchacz</string>
+ <string name="playlist_member_remove_collab">Usuń z grona współtwórców</string>
+ <string name="playlist_member_make_collab">Zrób współtwórcą</string>
+ <string name="playlist_member_remove">Usuń z playlisty</string>
+ <string name="playlist_stop_collab_private">Zakończyć współpracę nad %1$s? Współtwórcy zostaną słuchaczami: nadal będą mogli jej słuchać, ale nie dodadzą ani nie usuną utworów. Już udostępnione linki z zaproszeniem pozostają ważne do wygaśnięcia (do 7 dni) i nie można ich anulować.</string>
+ <string name="playlist_stop_collab_public">Zakończyć współpracę nad %1$s? Współtwórcy zostaną usunięci z playlisty. Już udostępnione linki z zaproszeniem pozostają ważne do wygaśnięcia (do 7 dni) i nie można ich anulować.</string>
+ <string name="library_chip_playlists">Playlisty</string>
+ <string name="library_chip_artists">Wykonawcy</string>
+ <string name="library_chip_albums">Albumy</string>
+ <string name="library_chip_songs">Utwory</string>
+ <string name="add_playlist_to_playlist">Dodaj playlistę do innej playlisty</string>
+ <string name="add_collection_reading">Wczytywanie utworów…</string>
+ <string name="add_collection_nothing">Nie ma nic do dodania</string>
+ <string name="add_collection_done">Dodano utwory (%1$d) do: %2$s</string>
+ <string name="duplicate_title_some">Niektóre już dodano</string>
+ <string name="duplicate_title_all">Już dodano</string>
+ <string name="duplicate_text_some">Niektóre z tych utworów są już na playliście %1$s.</string>
+ <string name="duplicate_text_all">Te utwory są już na playliście %1$s.</string>
+ <string name="duplicate_add_all">Dodaj wszystkie</string>
+ <string name="duplicate_add_new">Dodaj nowe</string>
+ <string name="duplicate_add_anyway">Dodaj mimo to</string>
+ <string name="duplicate_dont_add">Nie dodawaj</string>
+ <string name="settings_music_video_title">Teledyski</string>
+ <string name="settings_music_video_detail">Przycisk wideo w odtwarzaczu i klipy, które włączają się same. Wyłączone: tylko dźwięk i Canvas.</string>
+ <string name="downloads_need_source">Pobieranie wymaga rozszerzenia źródłowego. Zainstaluj je w Ustawieniach, Rozszerzenia.</string>
+ <string name="downloads_source_row_title">Źródło pobierania</string>
+ <string name="downloads_source_row_on">Pliki dostarcza rozszerzenie. Dotknij, aby zarządzać rozszerzeniami.</string>
+ <string name="downloads_source_row_off">Jeszcze brak: zainstaluj rozszerzenie źródła pobierania.</string>
+ <string name="settings_look_title">Wygląd</string>
+ <string name="settings_headset_skip_title">Przyciski słuchawek: 15 s w podcastach</string>
+ <string name="settings_headset_skip_detail">Gdy wyłączone, przechodzą do następnego lub poprzedniego odcinka</string>
</resources>
diff --git a/base/app/src/main/res/values-pl/security_strings.xml b/base/app/src/main/res/values-pl/security_strings.xml
new file mode 100644
index 00000000..1d2e68fc
--- /dev/null
+++ b/base/app/src/main/res/values-pl/security_strings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="action_playback_mirror">Utrzymuje ciche odtwarzanie Spotify tutaj; liczy odtworzenia na Twoim koncie</string>
+ <string name="mirror_indicator">Spotify odzwierciedlane przez %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-pl/sources_strings.xml b/base/app/src/main/res/values-pl/sources_strings.xml
new file mode 100644
index 00000000..bcb49e03
--- /dev/null
+++ b/base/app/src/main/res/values-pl/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Źródła audio</string>
+ <string name="sources_download_title">Źródła pobierania</string>
+ <string name="sources_audio_footer">Pytane od góry do dołu dla każdego utworu: pierwsze, które go ma, odtwarza go. Strzałkami zmienisz kolejność.</string>
+ <string name="sources_download_footer">Pytane od góry do dołu: pierwsze źródło, które ma utwór, dostarcza plik. Strzałkami zmienisz kolejność.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Odtwarzane, gdy żadne źródło powyżej nie ma utworu</string>
+ <string name="sources_ready">Gotowe</string>
+ <string name="sources_details_show">Pokaż szczegóły</string>
+ <string name="sources_details_hide">Ukryj szczegóły</string>
+ <string name="sources_detail_version">Wersja %1$s · autor: %2$s</string>
+ <string name="sources_last_used">Ostatnio: %1$s, %2$s</string>
+ <string name="sources_open">Otwórz rozszerzenie</string>
+ <string name="sources_order_hint">Źródła są pytane w kolejności ustawionej w Ustawieniach (Odtwarzanie, Pobieranie).</string>
+ <string name="sources_below_spotify">Nie pytamy: Spotify jest wyżej</string>
+</resources>
diff --git a/base/app/src/main/res/values-pl/stats_strings.xml b/base/app/src/main/res/values-pl/stats_strings.xml
new file mode 100644
index 00000000..fb6d84bb
--- /dev/null
+++ b/base/app/src/main/res/values-pl/stats_strings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="stats_tab_spotify">W Spotify</string>
+ <string name="stats_tab_phone">Na tym telefonie</string>
+ <string name="stats_range_short">Ostatnie 4 tygodnie</string>
+ <string name="stats_range_medium">Ostatnie 6 miesięcy</string>
+ <string name="stats_range_long">Ostatni rok</string>
+ <string name="stats_artists_ranked">Wykonawcy w Twoich odsłuchach: %1$d</string>
+ <string name="stats_empty">Spotify nie ma jeszcze najczęściej słuchanych wykonawców ani utworów za ten okres. Słuchaj dalej i zajrzyj później.</string>
+ <string name="stats_failed">Spotify nie wysłał Twoich statystyk.</string>
+ <string name="stats_spotify_note">Ranking Spotify na podstawie wszystkiego, co to konto odtworzyło na każdym urządzeniu. Spotify nie udostępnia liczby odtworzeń ani przesłuchanych minut: minuty w sekcji „Na tym telefonie” to własne zliczanie Myspoti.</string>
+ <string name="stats_weekly_minutes">Minuty tygodniowo</string>
+ <string name="stats_this_week">W tym tygodniu: %1$d min</string>
+ <string name="stats_listening_stats">Statystyki słuchania</string>
+ <string name="friends_title">Aktywność znajomych</string>
+ <string name="friends_detail">Czego słuchają osoby, które obserwujesz</string>
+ <string name="friends_now">Teraz</string>
+ <string name="friends_empty">Brak aktywności znajomych. Obserwowani znajomi, którzy udostępniają w Spotify swoją aktywność słuchania, pojawią się tutaj.</string>
+ <string name="friends_failed">Spotify nie wysłał aktywności znajomych.</string>
+ <string name="friends_refresh">Odśwież</string>
+ <string name="artist_top_short">Twój wykonawca nr %1$d z ostatnich 4 tygodni</string>
+ <string name="artist_top_medium">Twój wykonawca nr %1$d z ostatnich 6 miesięcy</string>
+ <string name="artist_top_long">Twój wykonawca nr %1$d z ostatniego roku</string>
+</resources>
diff --git a/base/app/src/main/res/values-pl/strings.xml b/base/app/src/main/res/values-pl/strings.xml
index e70a3fe5..b7e9ec71 100644
--- a/base/app/src/main/res/values-pl/strings.xml
+++ b/base/app/src/main/res/values-pl/strings.xml
@@ -22,4 +22,5 @@
<string name="account_page_title">Konto Spotify</string>
<string name="account_page_detail">Abonament, prywatność i urządzenia, na spotify.com</string>
<string name="player_source_downloaded">Pobrane</string>
+ <string name="extension_change_write">Może teraz także wysyłać do Spotify: %1$s</string>
</resources>
diff --git a/base/app/src/main/res/values-pl/update_consent_strings.xml b/base/app/src/main/res/values-pl/update_consent_strings.xml
new file mode 100644
index 00000000..bc57a098
--- /dev/null
+++ b/base/app/src/main/res/values-pl/update_consent_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="update_code_title">Kod %1$s się zmienił (%2$d linii, +%3$d/−%4$d)</string>
+ <string name="update_code_body">To rozszerzenie ma potężne uprawnienia (krytyczne akcje lub szeroki dostęp do sieci), więc nowy kod nigdy nie jest uruchamiany bez Twojej zgody.</string>
+ <string name="update_code_files">Zmienione pliki: %1$s</string>
+ <string name="update_code_update">Aktualizuj</string>
+ <string name="update_code_later">Nie teraz</string>
+ <string name="update_check_waiting">Znaleziono aktualizację: zastosuje się sama za 24 godziny</string>
+ <string name="update_check_repo_changed">Aktualizacja odrzucona: repozytorium zmieniło właściciela</string>
+ <string name="update_repo_changed_title">Repozytorium zmieniło właściciela</string>
+ <string name="update_repo_changed_body">To repozytorium zarejestrowano ponownie lub przeniesiono pod tą samą nazwą, więc jego aktualizacje są zablokowane. Odinstaluj je lub zainstaluj ponownie tylko wtedy, gdy ufasz nowemu właścicielowi.</string>
+ <string name="update_author_owner">od %1$s · repozytorium: %2$s</string>
+ <string name="update_author_unverified">od %1$s · niezweryfikowane</string>
+</resources>
diff --git a/base/app/src/main/res/values-pt-rPT/sources_strings.xml b/base/app/src/main/res/values-pt-rPT/sources_strings.xml
new file mode 100644
index 00000000..841a9852
--- /dev/null
+++ b/base/app/src/main/res/values-pt-rPT/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Fontes de áudio</string>
+ <string name="sources_download_title">Fontes de transferência</string>
+ <string name="sources_audio_footer">São consultadas de cima para baixo em cada música: a primeira que a tiver reproduz-na. Use as setas para mudar a ordem.</string>
+ <string name="sources_download_footer">São consultadas de cima para baixo: a primeira fonte que tiver a música fornece o ficheiro. Use as setas para mudar a ordem.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Reproduz quando nenhuma fonte acima tem a música</string>
+ <string name="sources_ready">Pronto</string>
+ <string name="sources_details_show">Mostrar detalhes</string>
+ <string name="sources_details_hide">Ocultar detalhes</string>
+ <string name="sources_detail_version">Versão %1$s · por %2$s</string>
+ <string name="sources_last_used">Última: %1$s, %2$s</string>
+ <string name="sources_open">Abrir a extensão</string>
+ <string name="sources_order_hint">As fontes são consultadas pela ordem definida nas Definições (Reprodução, Transferências).</string>
+ <string name="sources_below_spotify">Não é consultado: Spotify está acima</string>
+</resources>
diff --git a/base/app/src/main/res/values-pt/extensions_strings.xml b/base/app/src/main/res/values-pt/extensions_strings.xml
index 127fd2e3..bced16fe 100644
--- a/base/app/src/main/res/values-pt/extensions_strings.xml
+++ b/base/app/src/main/res/values-pt/extensions_strings.xml
@@ -208,4 +208,9 @@
<string name="ext_grants_title">Sempre permitido</string>
<string name="ext_grants_note">Alterações ao Spotify que esta extensão faz sem perguntar. Revogue uma para voltar a ser questionado.</string>
<string name="ext_grant_revoke">Revogar</string>
+ <string name="extensions_unreadable_file">Não foi possível ler o arquivo</string>
+ <string name="ext_welcome_title">%1$s está instalada</string>
+ <string name="ext_welcome_steps">Para terminar</string>
+ <string name="ext_welcome_from">Escrito pela extensão.</string>
+ <string name="ext_welcome_ok">Entendi</string>
</resources>
diff --git a/base/app/src/main/res/values-pt/immersive_detail_strings.xml b/base/app/src/main/res/values-pt/immersive_detail_strings.xml
new file mode 100644
index 00000000..c56ea111
--- /dev/null
+++ b/base/app/src/main/res/values-pt/immersive_detail_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_detail_pause">Pausar</string>
+ <string name="immersive_detail_save">Salvar na biblioteca</string>
+ <string name="immersive_detail_unsave">Remover da biblioteca</string>
+ <string name="immersive_detail_find">Buscar na lista</string>
+ <string name="immersive_detail_smart_shuffle_on">Reprodução aleatória inteligente ativada: recomendações entram na lista embaralhada.</string>
+ <string name="immersive_detail_more">Mais</string>
+ <string name="immersive_detail_less">Menos</string>
+ <string name="immersive_detail_featured_on">Aparece em</string>
+ <string name="immersive_detail_remove_local">Remover desta playlist</string>
+ <string name="immersive_detail_follow">Seguir</string>
+ <string name="immersive_detail_unfollow">Deixar de seguir</string>
+</resources>
diff --git a/base/app/src/main/res/values-pt/immersive_genius_strings.xml b/base/app/src/main/res/values-pt/immersive_genius_strings.xml
new file mode 100644
index 00000000..8cef1480
--- /dev/null
+++ b/base/app/src/main/res/values-pt/immersive_genius_strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_genius_none">O Genius não tem nada sobre esta música.</string>
+ <string name="immersive_genius_error">Não foi possível acessar o Genius agora.</string>
+ <string name="immersive_genius_view">Ver no Genius</string>
+</resources>
diff --git a/base/app/src/main/res/values-pt/immersive_glass_strings.xml b/base/app/src/main/res/values-pt/immersive_glass_strings.xml
new file mode 100644
index 00000000..8e373054
--- /dev/null
+++ b/base/app/src/main/res/values-pt/immersive_glass_strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="settings_liquid_glass_title">Liquid Glass</string>
+ <string name="settings_liquid_glass_detail">As barras se curvam e refletem a página atrás delas, como vidro</string>
+ <string name="settings_liquid_glass_unsupported">Requer Android 12 ou superior</string>
+ <string name="settings_liquid_glass_reduced">Efeito fosco enquanto o telefone reduz o desfoque ou as animações</string>
+ <string name="immersive_expand_tab_bar">Mostrar todas as abas</string>
+</resources>
diff --git a/base/app/src/main/res/values-pt/immersive_lyrics_strings.xml b/base/app/src/main/res/values-pt/immersive_lyrics_strings.xml
new file mode 100644
index 00000000..1e0680fb
--- /dev/null
+++ b/base/app/src/main/res/values-pt/immersive_lyrics_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_lyrics_instrumental">Instrumental</string>
+ <string name="immersive_lyrics_none">Sem letra para esta música</string>
+ <string name="immersive_queue_title">Fila</string>
+ <string name="immersive_queue_now_playing">Tocando agora</string>
+ <string name="immersive_queue_empty">Nada na fila</string>
+ <string name="immersive_queue_remove">Remover da fila</string>
+ <string name="immersive_queue_reorder">Mover na fila</string>
+ <string name="immersive_queue_shuffle">Aleatório</string>
+ <string name="immersive_queue_repeat">Repetir</string>
+</resources>
diff --git a/base/app/src/main/res/values-pt/immersive_pages_strings.xml b/base/app/src/main/res/values-pt/immersive_pages_strings.xml
new file mode 100644
index 00000000..6094bf5f
--- /dev/null
+++ b/base/app/src/main/res/values-pt/immersive_pages_strings.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_pages_songs">Músicas</string>
+ <string name="immersive_pages_artists">Artistas</string>
+ <string name="immersive_pages_albums">Álbuns</string>
+ <string name="immersive_pages_unknown_artist">Artista desconhecido</string>
+ <string name="immersive_pages_unknown_album">Álbum desconhecido</string>
+ <string name="immersive_pages_name_hint">Nome</string>
+ <string name="immersive_pages_play_group">Reproduzir %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-pt/immersive_player_strings.xml b/base/app/src/main/res/values-pt/immersive_player_strings.xml
new file mode 100644
index 00000000..8cdc68e0
--- /dev/null
+++ b/base/app/src/main/res/values-pt/immersive_player_strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_player_close">Fechar o player</string>
+ <string name="immersive_player_play">Reproduzir</string>
+ <string name="immersive_player_pause">Pausar</string>
+ <string name="immersive_player_previous">Anterior</string>
+ <string name="immersive_player_next">Próxima</string>
+ <string name="immersive_player_like">Adicionar às Músicas Curtidas</string>
+ <string name="immersive_player_unlike">Remover das Músicas Curtidas</string>
+ <string name="immersive_player_more">Mais</string>
+ <string name="immersive_player_lyrics">Letra</string>
+ <string name="immersive_player_lyrics_close">Fechar a letra</string>
+ <string name="immersive_player_queue">A seguir</string>
+ <string name="immersive_player_queue_close">Fechar a fila</string>
+ <string name="immersive_player_devices">Dispositivos</string>
+ <string name="immersive_player_shuffle_on">Aleatório: ativado</string>
+ <string name="immersive_player_shuffle_off">Aleatório: desativado</string>
+ <string name="immersive_player_repeat_off">Repetir: desativado</string>
+ <string name="immersive_player_repeat_all">Repetir: tudo</string>
+ <string name="immersive_player_repeat_one">Repetir: uma música</string>
+ <string name="immersive_player_volume_down">Diminuir volume</string>
+ <string name="immersive_player_volume_up">Aumentar volume</string>
+ <string name="immersive_player_ad">Anúncio</string>
+ <string name="immersive_player_explicit">Explícito</string>
+ <string name="immersive_player_added_to_liked">Adicionada às Músicas Curtidas</string>
+ <string name="immersive_player_mini_player">Abrir o player</string>
+</resources>
diff --git a/base/app/src/main/res/values-pt/immersive_screens_strings.xml b/base/app/src/main/res/values-pt/immersive_screens_strings.xml
new file mode 100644
index 00000000..80199156
--- /dev/null
+++ b/base/app/src/main/res/values-pt/immersive_screens_strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_screens_account">Conta</string>
+ <string name="immersive_screens_account_page">Página da conta</string>
+ <string name="immersive_screens_account_page_detail">Plano, privacidade e dispositivos</string>
+ <string name="immersive_screens_top_result">Melhor resultado</string>
+ <string name="immersive_screens_reset_order">Voltar à ordem padrão</string>
+</resources>
diff --git a/base/app/src/main/res/values-pt/immersive_shell_strings.xml b/base/app/src/main/res/values-pt/immersive_shell_strings.xml
new file mode 100644
index 00000000..437b96f1
--- /dev/null
+++ b/base/app/src/main/res/values-pt/immersive_shell_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_shell_back">Voltar</string>
+ <string name="immersive_shell_more">Mais opções</string>
+ <string name="immersive_shell_search_hint">Pesquisar</string>
+ <string name="immersive_shell_search_clear">Limpar pesquisa</string>
+ <string name="immersive_shell_play">Reproduzir</string>
+ <string name="immersive_shell_shuffle">Aleatório</string>
+ <string name="immersive_shell_see_all">Ver tudo</string>
+ <string name="immersive_shell_now_playing">Tocando agora</string>
+ <string name="immersive_shell_explicit">Explícito</string>
+</resources>
diff --git a/base/app/src/main/res/values-pt/myspoti_strings.xml b/base/app/src/main/res/values-pt/myspoti_strings.xml
index 647e4aec..79344ca1 100644
--- a/base/app/src/main/res/values-pt/myspoti_strings.xml
+++ b/base/app/src/main/res/values-pt/myspoti_strings.xml
@@ -440,4 +440,85 @@
<string name="playlist_member_owner">Criador</string>
<string name="playlist_member_collab">Colaborador</string>
<string name="playlist_members_more">%1$s e mais %2$d</string>
+ <string name="downloads_lists">Álbuns e playlists</string>
+ <string name="downloads_singles">Músicas</string>
+ <string name="downloads_kind_album">Álbum</string>
+ <string name="downloads_kind_playlist">Playlist</string>
+ <string name="downloads_kind_liked">Músicas Curtidas</string>
+ <string name="settings_tab_appearance">Aparência</string>
+ <string name="settings_tab_about">Sobre</string>
+ <string name="settings_about_version">Versão %1$s</string>
+ <string name="settings_update_available">Versão %1$s disponível</string>
+ <string name="settings_update_available_detail">Toque para baixar e instalar</string>
+ <string name="setup_look_title">Escolha seu visual</string>
+ <string name="setup_look_subtitle">Veja a prévia e escolha o que você preferir.</string>
+ <string name="look_classic">Clássico</string>
+ <string name="look_classic_detail">Player escuro com as cores da capa, botão de reprodução redondo</string>
+ <string name="look_immersive">Imersivo</string>
+ <string name="look_immersive_detail">Capa grande, cores do álbum, letras animadas</string>
+ <string name="setup_look_preview">Prévia do visual %1$s</string>
+ <string name="setup_look_tap_hint">Toque na prévia para pausar, deslize para trocar</string>
+ <string name="setup_look_still_hint">As animações estão desativadas neste telefone: três imagens estáticas</string>
+ <string name="setup_look_still_player">Player</string>
+ <string name="setup_look_still_paused">Em pausa</string>
+ <string name="setup_look_still_lyrics">Letra</string>
+ <string name="look_demo_all">Tudo</string>
+ <string name="look_demo_music">Música</string>
+ <string name="look_demo_podcasts">Podcasts</string>
+ <string name="look_demo_section">Feito para você</string>
+ <string name="settings_update_refresh">Verificar atualizações</string>
+ <string name="settings_update_uptodate_now">Atualizado (verificado agora mesmo)</string>
+ <string name="settings_update_last_checked">Última verificação: %1$s</string>
+ <string name="settings_update_never">Nunca verificado</string>
+ <string name="settings_update_rate_limited">O GitHub está limitando as solicitações agora. Tente novamente em alguns minutos.</string>
+ <string name="settings_update_failed">Não foi possível verificar atualizações. Verifique sua conexão.</string>
+ <string name="drm_missing">A reprodução é impossível aqui: o Android System WebView deste telefone não tem um DRM Widevine funcional, que o Spotify exige. Atualize o Android System WebView e o Chrome na Play Store e selecione-o em Configurações &gt; Opções do desenvolvedor &gt; Implementação do WebView.</string>
+ <string name="song_unavailable_skipped">%1$s não está disponível e foi ignorada.</string>
+ <string name="song_unavailable">%1$s não está disponível.</string>
+ <string name="songs_skipped_by_spotify">O Spotify continuou pulando músicas que não conseguia reproduzir, então a reprodução foi pausada. Toque em reproduzir para tentar de novo ou verifique sua conta e sua conexão.</string>
+ <string name="playlist_leave">Sair da playlist</string>
+ <string name="playlist_leave_confirm">Sair de %1$s? Você deixará de ser colaborador e não poderá adicionar nem remover músicas. Para entrar de novo, você precisará de um novo link de convite.</string>
+ <string name="playlist_leave_button">Sair</string>
+ <string name="playlist_member_listener">Ouvinte</string>
+ <string name="playlist_member_remove_collab">Remover como colaborador</string>
+ <string name="playlist_member_make_collab">Tornar colaborador</string>
+ <string name="playlist_member_remove">Remover da playlist</string>
+ <string name="playlist_stop_collab_private">Parar de colaborar em %1$s? Os colaboradores viram ouvintes: ainda poderão ouvi-la, mas não adicionarão nem removerão músicas. Os links de convite já compartilhados continuam válidos até expirarem (até 7 dias) e não podem ser cancelados.</string>
+ <string name="playlist_stop_collab_public">Parar de colaborar em %1$s? Os colaboradores são removidos da playlist. Os links de convite já compartilhados continuam válidos até expirarem (até 7 dias) e não podem ser cancelados.</string>
+ <string name="library_chip_playlists">Playlists</string>
+ <string name="library_chip_artists">Artistas</string>
+ <string name="library_chip_albums">Álbuns</string>
+ <string name="library_chip_songs">Músicas</string>
+ <string name="add_playlist_to_playlist">Adicionar playlist a outra playlist</string>
+ <string name="add_collection_reading">Lendo as músicas…</string>
+ <string name="add_collection_nothing">Nada a adicionar</string>
+ <string name="add_collection_done">%1$d músicas adicionadas a %2$s</string>
+ <string name="duplicate_title_some">Algumas já foram adicionadas</string>
+ <string name="duplicate_title_all">Já adicionadas</string>
+ <string name="duplicate_text_some">Algumas destas músicas já estão em %1$s.</string>
+ <string name="duplicate_text_all">Estas músicas já estão em %1$s.</string>
+ <string name="duplicate_add_all">Adicionar todas</string>
+ <string name="duplicate_add_new">Adicionar as novas</string>
+ <string name="duplicate_add_anyway">Adicionar mesmo assim</string>
+ <string name="duplicate_dont_add">Não adicionar</string>
+ <string name="settings_music_video_title">Videoclipes</string>
+ <string name="settings_music_video_detail">O botão de vídeo no player e os clipes que começam sozinhos. Desativado: só áudio e Canvas.</string>
+ <string name="downloads_need_source">Os downloads precisam de uma extensão de origem. Instale uma em Configurações, Extensões.</string>
+ <string name="downloads_source_row_title">Origem dos downloads</string>
+ <string name="downloads_source_row_on">Uma extensão fornece os arquivos. Toque para gerenciar as extensões.</string>
+ <string name="downloads_source_row_off">Nenhuma ainda: instale uma extensão de origem de downloads.</string>
+ <string name="profile_block">Bloquear</string>
+ <string name="profile_unblock">Desbloquear</string>
+ <string name="profile_block_title">Bloquear %1$s?</string>
+ <string name="profile_block_confirm">%1$s não poderá seguir você nem ver seu perfil e suas playlists públicas. Você pode desbloquear pelo perfil a qualquer momento.</string>
+ <string name="profile_blocked">Você bloqueou este usuário</string>
+ <string name="profile_block_failed">Não foi possível alterar o bloqueio, tente de novo</string>
+ <string name="profile_more_options">Mais opções</string>
+ <string name="settings_look_title">Visual</string>
+ <string name="look_offer_title">Novo visual disponível</string>
+ <string name="look_offer_try">Experimentar Imersivo</string>
+ <string name="look_offer_keep">Manter Clássico</string>
+ <string name="look_offer_note">Você pode mudar depois em Configurações &gt; Tela e idioma.</string>
+ <string name="settings_headset_skip_title">Botões dos auscultadores: 15 s nos podcasts</string>
+ <string name="settings_headset_skip_detail">Desativado: passam ao episódio seguinte ou anterior</string>
</resources>
diff --git a/base/app/src/main/res/values-pt/security_strings.xml b/base/app/src/main/res/values-pt/security_strings.xml
new file mode 100644
index 00000000..baa37fb2
--- /dev/null
+++ b/base/app/src/main/res/values-pt/security_strings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="action_playback_mirror">Mantém o Spotify a tocar em silêncio aqui; conta reproduções na sua conta</string>
+ <string name="mirror_indicator">Spotify espelhado por %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-pt/sources_strings.xml b/base/app/src/main/res/values-pt/sources_strings.xml
new file mode 100644
index 00000000..6454596f
--- /dev/null
+++ b/base/app/src/main/res/values-pt/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Fontes de áudio</string>
+ <string name="sources_download_title">Fontes de download</string>
+ <string name="sources_audio_footer">São consultadas de cima para baixo em cada música: a primeira que a tiver reproduz. Use as setas para mudar a ordem.</string>
+ <string name="sources_download_footer">São consultadas de cima para baixo: a primeira fonte que tiver a música fornece o arquivo. Use as setas para mudar a ordem.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Reproduz quando nenhuma fonte acima tem a música</string>
+ <string name="sources_ready">Pronto</string>
+ <string name="sources_details_show">Mostrar detalhes</string>
+ <string name="sources_details_hide">Ocultar detalhes</string>
+ <string name="sources_detail_version">Versão %1$s · por %2$s</string>
+ <string name="sources_last_used">Última: %1$s, %2$s</string>
+ <string name="sources_open">Abrir a extensão</string>
+ <string name="sources_order_hint">As fontes são consultadas na ordem definida em Configurações (Reprodução, Downloads).</string>
+ <string name="sources_below_spotify">Não é consultado: Spotify está acima</string>
+</resources>
diff --git a/base/app/src/main/res/values-pt/stats_strings.xml b/base/app/src/main/res/values-pt/stats_strings.xml
new file mode 100644
index 00000000..913467ed
--- /dev/null
+++ b/base/app/src/main/res/values-pt/stats_strings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="stats_tab_spotify">No Spotify</string>
+ <string name="stats_tab_phone">Neste telefone</string>
+ <string name="stats_range_short">Últimas 4 semanas</string>
+ <string name="stats_range_medium">Últimos 6 meses</string>
+ <string name="stats_range_long">Último ano</string>
+ <string name="stats_artists_ranked">%1$d artistas no seu histórico de escuta</string>
+ <string name="stats_empty">O Spotify ainda não tem artistas ou músicas mais ouvidos para este período. Continue ouvindo e volte mais tarde.</string>
+ <string name="stats_failed">O Spotify não enviou suas estatísticas.</string>
+ <string name="stats_spotify_note">Classificação do Spotify com base em tudo que esta conta reproduziu, em todos os dispositivos. O Spotify não compartilha reproduções nem minutos ouvidos: os minutos de “Neste telefone” são a contagem do próprio Myspoti.</string>
+ <string name="stats_weekly_minutes">Minutos por semana</string>
+ <string name="stats_this_week">Esta semana: %1$d min</string>
+ <string name="stats_listening_stats">Estatísticas de escuta</string>
+ <string name="friends_title">Atividade dos amigos</string>
+ <string name="friends_detail">O que as pessoas que você segue estão ouvindo</string>
+ <string name="friends_now">Agora</string>
+ <string name="friends_empty">Nenhuma atividade de amigos ainda. Os amigos que você segue e que compartilham a atividade de escuta no Spotify aparecem aqui.</string>
+ <string name="friends_failed">O Spotify não enviou a atividade dos amigos.</string>
+ <string name="friends_refresh">Atualizar</string>
+ <string name="artist_top_short">Seu artista nº %1$d das últimas 4 semanas</string>
+ <string name="artist_top_medium">Seu artista nº %1$d dos últimos 6 meses</string>
+ <string name="artist_top_long">Seu artista nº %1$d do último ano</string>
+</resources>
diff --git a/base/app/src/main/res/values-pt/strings.xml b/base/app/src/main/res/values-pt/strings.xml
index 41c1911e..4647d2b0 100644
--- a/base/app/src/main/res/values-pt/strings.xml
+++ b/base/app/src/main/res/values-pt/strings.xml
@@ -20,4 +20,5 @@
<string name="account_page_title">Conta Spotify</string>
<string name="account_page_detail">Plano, privacidade e dispositivos, em spotify.com</string>
<string name="player_source_downloaded">Baixada</string>
+ <string name="extension_change_write">Agora também pode enviar ao Spotify: %1$s</string>
</resources>
diff --git a/base/app/src/main/res/values-pt/update_consent_strings.xml b/base/app/src/main/res/values-pt/update_consent_strings.xml
new file mode 100644
index 00000000..40dadeb3
--- /dev/null
+++ b/base/app/src/main/res/values-pt/update_consent_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="update_code_title">O código de %1$s mudou (%2$d linhas, +%3$d/−%4$d)</string>
+ <string name="update_code_body">Esta extensão tem permissões poderosas (ações críticas ou acesso amplo à rede), por isso código novo nunca é executado sem a sua aprovação.</string>
+ <string name="update_code_files">Arquivos alterados: %1$s</string>
+ <string name="update_code_update">Atualizar</string>
+ <string name="update_code_later">Agora não</string>
+ <string name="update_check_waiting">Atualização encontrada: será aplicada sozinha em 24 horas</string>
+ <string name="update_check_repo_changed">Atualização recusada: o repositório mudou de proprietário</string>
+ <string name="update_repo_changed_title">O repositório mudou de proprietário</string>
+ <string name="update_repo_changed_body">Este repositório foi registrado de novo ou transferido com o mesmo nome, por isso as atualizações estão bloqueadas. Desinstale-a, ou instale-a de novo só se confiar no novo proprietário.</string>
+ <string name="update_author_owner">por %1$s · repositório de %2$s</string>
+ <string name="update_author_unverified">por %1$s · não verificado</string>
+</resources>
diff --git a/base/app/src/main/res/values-ro/sources_strings.xml b/base/app/src/main/res/values-ro/sources_strings.xml
new file mode 100644
index 00000000..3bba765d
--- /dev/null
+++ b/base/app/src/main/res/values-ro/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Surse audio</string>
+ <string name="sources_download_title">Surse de descărcare</string>
+ <string name="sources_audio_footer">Sunt întrebate de sus în jos pentru fiecare melodie: prima care o are o redă. Folosiți săgețile pentru a schimba ordinea.</string>
+ <string name="sources_download_footer">Sunt întrebate de sus în jos: prima sursă care are melodia oferă fișierul. Folosiți săgețile pentru a schimba ordinea.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Se redă când nicio sursă de deasupra nu are melodia</string>
+ <string name="sources_ready">Gata</string>
+ <string name="sources_details_show">Afișează detaliile</string>
+ <string name="sources_details_hide">Ascunde detaliile</string>
+ <string name="sources_detail_version">Versiunea %1$s · de %2$s</string>
+ <string name="sources_last_used">Ultima: %1$s, %2$s</string>
+ <string name="sources_open">Deschide extensia</string>
+ <string name="sources_order_hint">Sursele sunt întrebate în ordinea setată în Setări (Redare, Descărcări).</string>
+ <string name="sources_below_spotify">Nu este întrebat: Spotify este deasupra</string>
+</resources>
diff --git a/base/app/src/main/res/values-ru/extensions_strings.xml b/base/app/src/main/res/values-ru/extensions_strings.xml
index 19866ec9..d80a96f0 100644
--- a/base/app/src/main/res/values-ru/extensions_strings.xml
+++ b/base/app/src/main/res/values-ru/extensions_strings.xml
@@ -208,4 +208,9 @@
<string name="ext_grants_title">Всегда разрешено</string>
<string name="ext_grants_note">Изменения в Spotify, которые это расширение вносит без запроса. Отзовите одно, чтобы вас снова спрашивали.</string>
<string name="ext_grant_revoke">Отозвать</string>
+ <string name="extensions_unreadable_file">Не удалось прочитать файл</string>
+ <string name="ext_welcome_title">Расширение «%1$s» установлено</string>
+ <string name="ext_welcome_steps">Чтобы завершить</string>
+ <string name="ext_welcome_from">Текст написан расширением.</string>
+ <string name="ext_welcome_ok">Понятно</string>
</resources>
diff --git a/base/app/src/main/res/values-ru/immersive_detail_strings.xml b/base/app/src/main/res/values-ru/immersive_detail_strings.xml
new file mode 100644
index 00000000..cb81eb4b
--- /dev/null
+++ b/base/app/src/main/res/values-ru/immersive_detail_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_detail_pause">Пауза</string>
+ <string name="immersive_detail_save">Сохранить в медиатеке</string>
+ <string name="immersive_detail_unsave">Удалить из медиатеки</string>
+ <string name="immersive_detail_find">Найти в списке</string>
+ <string name="immersive_detail_smart_shuffle_on">Умное перемешивание включено: рекомендации добавляются в перемешанный список.</string>
+ <string name="immersive_detail_more">Ещё</string>
+ <string name="immersive_detail_less">Меньше</string>
+ <string name="immersive_detail_featured_on">Входит в</string>
+ <string name="immersive_detail_remove_local">Удалить из этого плейлиста</string>
+ <string name="immersive_detail_follow">Подписаться</string>
+ <string name="immersive_detail_unfollow">Отписаться</string>
+</resources>
diff --git a/base/app/src/main/res/values-ru/immersive_genius_strings.xml b/base/app/src/main/res/values-ru/immersive_genius_strings.xml
new file mode 100644
index 00000000..851acfb6
--- /dev/null
+++ b/base/app/src/main/res/values-ru/immersive_genius_strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_genius_none">На Genius нет информации об этом треке.</string>
+ <string name="immersive_genius_error">Genius сейчас недоступен.</string>
+ <string name="immersive_genius_view">Открыть на Genius</string>
+</resources>
diff --git a/base/app/src/main/res/values-ru/immersive_lyrics_strings.xml b/base/app/src/main/res/values-ru/immersive_lyrics_strings.xml
new file mode 100644
index 00000000..dc060dde
--- /dev/null
+++ b/base/app/src/main/res/values-ru/immersive_lyrics_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_lyrics_instrumental">Инструментал</string>
+ <string name="immersive_lyrics_none">Для этого трека нет текста</string>
+ <string name="immersive_queue_title">Очередь</string>
+ <string name="immersive_queue_now_playing">Сейчас играет</string>
+ <string name="immersive_queue_empty">В очереди ничего нет</string>
+ <string name="immersive_queue_remove">Убрать из очереди</string>
+ <string name="immersive_queue_reorder">Переместить в очереди</string>
+ <string name="immersive_queue_shuffle">Перемешать</string>
+ <string name="immersive_queue_repeat">Повтор</string>
+</resources>
diff --git a/base/app/src/main/res/values-ru/immersive_pages_strings.xml b/base/app/src/main/res/values-ru/immersive_pages_strings.xml
new file mode 100644
index 00000000..fe137012
--- /dev/null
+++ b/base/app/src/main/res/values-ru/immersive_pages_strings.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_pages_songs">Треки</string>
+ <string name="immersive_pages_artists">Исполнители</string>
+ <string name="immersive_pages_albums">Альбомы</string>
+ <string name="immersive_pages_unknown_artist">Неизвестный исполнитель</string>
+ <string name="immersive_pages_unknown_album">Неизвестный альбом</string>
+ <string name="immersive_pages_name_hint">Название</string>
+ <string name="immersive_pages_play_group">Воспроизвести: %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-ru/immersive_player_strings.xml b/base/app/src/main/res/values-ru/immersive_player_strings.xml
new file mode 100644
index 00000000..45067a3c
--- /dev/null
+++ b/base/app/src/main/res/values-ru/immersive_player_strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_player_close">Закрыть плеер</string>
+ <string name="immersive_player_play">Воспроизвести</string>
+ <string name="immersive_player_pause">Пауза</string>
+ <string name="immersive_player_previous">Назад</string>
+ <string name="immersive_player_next">Далее</string>
+ <string name="immersive_player_like">Добавить в «Любимые треки»</string>
+ <string name="immersive_player_unlike">Убрать из «Любимых треков»</string>
+ <string name="immersive_player_more">Ещё</string>
+ <string name="immersive_player_lyrics">Текст</string>
+ <string name="immersive_player_lyrics_close">Закрыть текст</string>
+ <string name="immersive_player_queue">Далее</string>
+ <string name="immersive_player_queue_close">Закрыть очередь</string>
+ <string name="immersive_player_devices">Устройства</string>
+ <string name="immersive_player_shuffle_on">Перемешивание: вкл.</string>
+ <string name="immersive_player_shuffle_off">Перемешивание: выкл.</string>
+ <string name="immersive_player_repeat_off">Повтор: выкл.</string>
+ <string name="immersive_player_repeat_all">Повтор: все</string>
+ <string name="immersive_player_repeat_one">Повтор: один трек</string>
+ <string name="immersive_player_volume_down">Тише</string>
+ <string name="immersive_player_volume_up">Громче</string>
+ <string name="immersive_player_ad">Реклама</string>
+ <string name="immersive_player_explicit">Нецензурная лексика</string>
+ <string name="immersive_player_added_to_liked">Добавлено в «Любимые треки»</string>
+ <string name="immersive_player_mini_player">Открыть плеер</string>
+</resources>
diff --git a/base/app/src/main/res/values-ru/immersive_screens_strings.xml b/base/app/src/main/res/values-ru/immersive_screens_strings.xml
new file mode 100644
index 00000000..cf293496
--- /dev/null
+++ b/base/app/src/main/res/values-ru/immersive_screens_strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_screens_account">Аккаунт</string>
+ <string name="immersive_screens_account_page">Страница аккаунта</string>
+ <string name="immersive_screens_account_page_detail">Тариф, конфиденциальность и устройства</string>
+ <string name="immersive_screens_top_result">Лучший результат</string>
+ <string name="immersive_screens_reset_order">Вернуть порядок по умолчанию</string>
+</resources>
diff --git a/base/app/src/main/res/values-ru/immersive_shell_strings.xml b/base/app/src/main/res/values-ru/immersive_shell_strings.xml
new file mode 100644
index 00000000..4e3813c7
--- /dev/null
+++ b/base/app/src/main/res/values-ru/immersive_shell_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_shell_back">Назад</string>
+ <string name="immersive_shell_more">Другие параметры</string>
+ <string name="immersive_shell_search_hint">Поиск</string>
+ <string name="immersive_shell_search_clear">Очистить поиск</string>
+ <string name="immersive_shell_play">Воспроизвести</string>
+ <string name="immersive_shell_shuffle">Перемешать</string>
+ <string name="immersive_shell_see_all">Показать все</string>
+ <string name="immersive_shell_now_playing">Сейчас играет</string>
+ <string name="immersive_shell_explicit">Нецензурная лексика</string>
+</resources>
diff --git a/base/app/src/main/res/values-ru/myspoti_strings.xml b/base/app/src/main/res/values-ru/myspoti_strings.xml
index 1662a483..e9bdf020 100644
--- a/base/app/src/main/res/values-ru/myspoti_strings.xml
+++ b/base/app/src/main/res/values-ru/myspoti_strings.xml
@@ -466,4 +466,70 @@
<string name="look_offer_try">Попробовать «Иммерсивный»</string>
<string name="look_offer_keep">Оставить «Классический»</string>
<string name="look_offer_note">Это можно изменить позже в Настройки > Экран и язык.</string>
+ <string name="downloads_lists">Альбомы и плейлисты</string>
+ <string name="downloads_singles">Треки</string>
+ <string name="downloads_kind_album">Альбом</string>
+ <string name="downloads_kind_playlist">Плейлист</string>
+ <string name="downloads_kind_liked">Любимые треки</string>
+ <string name="settings_tab_appearance">Оформление</string>
+ <string name="settings_tab_about">О приложении</string>
+ <string name="settings_about_version">Версия %1$s</string>
+ <string name="settings_update_available">Доступна версия %1$s</string>
+ <string name="settings_update_available_detail">Нажмите, чтобы скачать и установить</string>
+ <string name="setup_look_title">Выберите оформление</string>
+ <string name="setup_look_subtitle">Посмотрите предпросмотр и выберите понравившееся.</string>
+ <string name="look_classic">Классическое</string>
+ <string name="look_classic_detail">Тёмный плеер в цветах обложки, круглая кнопка воспроизведения</string>
+ <string name="look_immersive">Иммерсивное</string>
+ <string name="look_immersive_detail">Крупная обложка, цвета альбома, анимированный текст</string>
+ <string name="setup_look_preview">Предпросмотр оформления «%1$s»</string>
+ <string name="setup_look_tap_hint">Нажмите на предпросмотр, чтобы поставить на паузу, проведите пальцем для переключения</string>
+ <string name="setup_look_still_hint">На этом телефоне анимации отключены: три статичных кадра</string>
+ <string name="setup_look_still_player">Плеер</string>
+ <string name="setup_look_still_paused">Пауза</string>
+ <string name="setup_look_still_lyrics">Текст</string>
+ <string name="look_demo_all">Все</string>
+ <string name="look_demo_music">Музыка</string>
+ <string name="look_demo_podcasts">Подкасты</string>
+ <string name="look_demo_section">Для вас</string>
+ <string name="settings_update_refresh">Проверить обновления</string>
+ <string name="settings_update_uptodate_now">Установлена последняя версия (проверено только что)</string>
+ <string name="settings_update_last_checked">Последняя проверка: %1$s</string>
+ <string name="settings_update_never">Ещё не проверялось</string>
+ <string name="settings_update_rate_limited">GitHub сейчас ограничивает запросы. Повторите попытку через несколько минут.</string>
+ <string name="settings_update_failed">Не удалось проверить обновления. Проверьте подключение.</string>
+ <string name="song_unavailable_skipped">Трек «%1$s» недоступен и был пропущен.</string>
+ <string name="song_unavailable">Трек «%1$s» недоступен.</string>
+ <string name="songs_skipped_by_spotify">Spotify продолжал пропускать треки, которые не смог воспроизвести, поэтому воспроизведение приостановлено. Нажмите «Воспроизвести», чтобы повторить, или проверьте аккаунт и подключение.</string>
+ <string name="playlist_member_listener">Слушатель</string>
+ <string name="playlist_member_remove_collab">Убрать из соавторов</string>
+ <string name="playlist_member_make_collab">Сделать соавтором</string>
+ <string name="playlist_member_remove">Удалить из плейлиста</string>
+ <string name="playlist_stop_collab_private">Прекратить совместную работу над «%1$s»? Соавторы станут слушателями: они смогут слушать плейлист, но не смогут добавлять или удалять треки. Уже отправленные ссылки-приглашения действуют до истечения срока (до 7 дней) и не могут быть отменены.</string>
+ <string name="playlist_stop_collab_public">Прекратить совместную работу над «%1$s»? Соавторы будут удалены из плейлиста. Уже отправленные ссылки-приглашения действуют до истечения срока (до 7 дней) и не могут быть отменены.</string>
+ <string name="library_chip_playlists">Плейлисты</string>
+ <string name="library_chip_artists">Исполнители</string>
+ <string name="library_chip_albums">Альбомы</string>
+ <string name="library_chip_songs">Треки</string>
+ <string name="add_playlist_to_playlist">Добавить плейлист в другой плейлист</string>
+ <string name="add_collection_reading">Чтение треков…</string>
+ <string name="add_collection_nothing">Нечего добавлять</string>
+ <string name="add_collection_done">Добавлено треков: %1$d (плейлист «%2$s»)</string>
+ <string name="duplicate_title_some">Некоторые уже добавлены</string>
+ <string name="duplicate_title_all">Уже добавлено</string>
+ <string name="duplicate_text_some">Некоторые из этих треков уже есть в «%1$s».</string>
+ <string name="duplicate_text_all">Эти треки уже есть в «%1$s».</string>
+ <string name="duplicate_add_all">Добавить все</string>
+ <string name="duplicate_add_new">Добавить новые</string>
+ <string name="duplicate_add_anyway">Всё равно добавить</string>
+ <string name="duplicate_dont_add">Не добавлять</string>
+ <string name="settings_music_video_title">Музыкальные клипы</string>
+ <string name="settings_music_video_detail">Кнопка видео в плеере и клипы, которые запускаются сами. Выкл.: только аудио и Canvas.</string>
+ <string name="downloads_need_source">Для загрузок нужно расширение-источник. Установите его в разделе «Настройки», «Расширения».</string>
+ <string name="downloads_source_row_title">Источник загрузок</string>
+ <string name="downloads_source_row_on">Файлы предоставляет расширение. Нажмите, чтобы управлять расширениями.</string>
+ <string name="downloads_source_row_off">Пока нет: установите расширение-источник загрузок.</string>
+ <string name="settings_look_title">Оформление</string>
+ <string name="settings_headset_skip_title">Кнопки наушников: 15 с в подкастах</string>
+ <string name="settings_headset_skip_detail">Если выключено, переключают на следующий или предыдущий выпуск</string>
</resources>
diff --git a/base/app/src/main/res/values-ru/security_strings.xml b/base/app/src/main/res/values-ru/security_strings.xml
new file mode 100644
index 00000000..355a5cfc
--- /dev/null
+++ b/base/app/src/main/res/values-ru/security_strings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="action_playback_mirror">Тихо воспроизводит Spotify здесь; засчитывает прослушивания в вашем аккаунте</string>
+ <string name="mirror_indicator">Spotify зеркалируется: %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-ru/sources_strings.xml b/base/app/src/main/res/values-ru/sources_strings.xml
new file mode 100644
index 00000000..02c9aaec
--- /dev/null
+++ b/base/app/src/main/res/values-ru/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Источники аудио</string>
+ <string name="sources_download_title">Источники загрузки</string>
+ <string name="sources_audio_footer">Опрашиваются сверху вниз для каждой песни: первый, у которого она есть, воспроизводит её. Стрелками меняется порядок.</string>
+ <string name="sources_download_footer">Опрашиваются сверху вниз: первый источник, у которого есть песня, отдаёт файл. Стрелками меняется порядок.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Воспроизводится, когда ни один источник выше не содержит песню</string>
+ <string name="sources_ready">Готово</string>
+ <string name="sources_details_show">Показать подробности</string>
+ <string name="sources_details_hide">Скрыть подробности</string>
+ <string name="sources_detail_version">Версия %1$s · автор: %2$s</string>
+ <string name="sources_last_used">Последнее: %1$s, %2$s</string>
+ <string name="sources_open">Открыть расширение</string>
+ <string name="sources_order_hint">Источники опрашиваются в порядке, заданном в Настройках (Воспроизведение, Загрузки).</string>
+ <string name="sources_below_spotify">Не запрашивается: Spotify выше</string>
+</resources>
diff --git a/base/app/src/main/res/values-ru/stats_strings.xml b/base/app/src/main/res/values-ru/stats_strings.xml
new file mode 100644
index 00000000..cfe7d078
--- /dev/null
+++ b/base/app/src/main/res/values-ru/stats_strings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="stats_tab_spotify">В Spotify</string>
+ <string name="stats_tab_phone">На этом телефоне</string>
+ <string name="stats_range_short">Последние 4 недели</string>
+ <string name="stats_range_medium">Последние 6 месяцев</string>
+ <string name="stats_range_long">Последний год</string>
+ <string name="stats_artists_ranked">Исполнителей в вашей истории: %1$d</string>
+ <string name="stats_empty">У Spotify пока нет топа исполнителей и треков за этот период. Продолжайте слушать и загляните позже.</string>
+ <string name="stats_failed">Spotify не прислал вашу статистику.</string>
+ <string name="stats_spotify_note">Рейтинг составлен Spotify по всему, что воспроизводил этот аккаунт на всех устройствах. Spotify не делится числом прослушиваний и минутами: минуты в разделе «На этом телефоне» посчитаны самим Myspoti.</string>
+ <string name="stats_weekly_minutes">Минут в неделю</string>
+ <string name="stats_this_week">На этой неделе: %1$d мин</string>
+ <string name="stats_listening_stats">Статистика прослушивания</string>
+ <string name="friends_title">Активность друзей</string>
+ <string name="friends_detail">Что слушают люди, на которых вы подписаны</string>
+ <string name="friends_now">Сейчас</string>
+ <string name="friends_empty">Пока нет активности друзей. Друзья, на которых вы подписаны и которые делятся активностью в Spotify, появятся здесь.</string>
+ <string name="friends_failed">Spotify не прислал активность друзей.</string>
+ <string name="friends_refresh">Обновить</string>
+ <string name="artist_top_short">Ваш исполнитель № %1$d за последние 4 недели</string>
+ <string name="artist_top_medium">Ваш исполнитель № %1$d за последние 6 месяцев</string>
+ <string name="artist_top_long">Ваш исполнитель № %1$d за последний год</string>
+</resources>
diff --git a/base/app/src/main/res/values-ru/strings.xml b/base/app/src/main/res/values-ru/strings.xml
index 383ca8b7..1c444550 100644
--- a/base/app/src/main/res/values-ru/strings.xml
+++ b/base/app/src/main/res/values-ru/strings.xml
@@ -22,4 +22,5 @@
<string name="account_page_title">Аккаунт Spotify</string>
<string name="account_page_detail">Подписка, конфиденциальность и устройства, на spotify.com</string>
<string name="player_source_downloaded">Скачано</string>
+ <string name="extension_change_write">Теперь также может отправлять данные в Spotify: %1$s</string>
</resources>
diff --git a/base/app/src/main/res/values-ru/update_consent_strings.xml b/base/app/src/main/res/values-ru/update_consent_strings.xml
new file mode 100644
index 00000000..9f620470
--- /dev/null
+++ b/base/app/src/main/res/values-ru/update_consent_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="update_code_title">Код %1$s изменился (%2$d строк, +%3$d/−%4$d)</string>
+ <string name="update_code_body">У этого расширения мощные права (критические действия или широкий доступ к сети), поэтому новый код никогда не запускается без вашего согласия.</string>
+ <string name="update_code_files">Изменённые файлы: %1$s</string>
+ <string name="update_code_update">Обновить</string>
+ <string name="update_code_later">Не сейчас</string>
+ <string name="update_check_waiting">Найдено обновление: оно применится само через 24 часа</string>
+ <string name="update_check_repo_changed">Обновление отклонено: репозиторий сменил владельца</string>
+ <string name="update_repo_changed_title">Репозиторий сменил владельца</string>
+ <string name="update_repo_changed_body">Этот репозиторий был зарегистрирован заново или передан под тем же именем, поэтому его обновления заблокированы. Удалите расширение или установите снова, только если доверяете новому владельцу.</string>
+ <string name="update_author_owner">автор %1$s · репозиторий: %2$s</string>
+ <string name="update_author_unverified">автор %1$s · не проверено</string>
+</resources>
diff --git a/base/app/src/main/res/values-sk/sources_strings.xml b/base/app/src/main/res/values-sk/sources_strings.xml
new file mode 100644
index 00000000..5239d03b
--- /dev/null
+++ b/base/app/src/main/res/values-sk/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Zdroje zvuku</string>
+ <string name="sources_download_title">Zdroje sťahovania</string>
+ <string name="sources_audio_footer">Pýtajú sa zhora nadol pri každej skladbe: prvý, ktorý ju má, ju prehrá. Šípkami zmeníte poradie.</string>
+ <string name="sources_download_footer">Pýtajú sa zhora nadol: prvý zdroj, ktorý skladbu má, poskytne súbor. Šípkami zmeníte poradie.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Prehrá sa, keď žiadny zdroj nad ním skladbu nemá</string>
+ <string name="sources_ready">Pripravené</string>
+ <string name="sources_details_show">Zobraziť podrobnosti</string>
+ <string name="sources_details_hide">Skryť podrobnosti</string>
+ <string name="sources_detail_version">Verzia %1$s · od %2$s</string>
+ <string name="sources_last_used">Naposledy: %1$s, %2$s</string>
+ <string name="sources_open">Otvoriť rozšírenie</string>
+ <string name="sources_order_hint">Zdroje sa pýtajú v poradí nastavenom v Nastaveniach (Prehrávanie, Sťahovanie).</string>
+ <string name="sources_below_spotify">Nepýta sa: Spotify je vyššie</string>
+</resources>
diff --git a/base/app/src/main/res/values-sl/sources_strings.xml b/base/app/src/main/res/values-sl/sources_strings.xml
new file mode 100644
index 00000000..676216f5
--- /dev/null
+++ b/base/app/src/main/res/values-sl/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Viri zvoka</string>
+ <string name="sources_download_title">Viri prenosov</string>
+ <string name="sources_audio_footer">Za vsako skladbo se poizveduje od zgoraj navzdol: prvi, ki jo ima, jo predvaja. Vrstni red spremenite s puščicami.</string>
+ <string name="sources_download_footer">Poizveduje se od zgoraj navzdol: prvi vir, ki ima skladbo, zagotovi datoteko. Vrstni red spremenite s puščicami.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Predvaja se, ko nobeden vir nad njim nima skladbe</string>
+ <string name="sources_ready">Pripravljeno</string>
+ <string name="sources_details_show">Pokaži podrobnosti</string>
+ <string name="sources_details_hide">Skrij podrobnosti</string>
+ <string name="sources_detail_version">Različica %1$s · avtor %2$s</string>
+ <string name="sources_last_used">Zadnje: %1$s, %2$s</string>
+ <string name="sources_open">Odpri razširitev</string>
+ <string name="sources_order_hint">Viri se poizvedujejo v vrstnem redu, nastavljenem v Nastavitvah (Predvajanje, Prenosi).</string>
+ <string name="sources_below_spotify">Ni vprašan: Spotify je višje</string>
+</resources>
diff --git a/base/app/src/main/res/values-sr/sources_strings.xml b/base/app/src/main/res/values-sr/sources_strings.xml
new file mode 100644
index 00000000..5ffa0dbb
--- /dev/null
+++ b/base/app/src/main/res/values-sr/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Аудио извори</string>
+ <string name="sources_download_title">Извори за преузимање</string>
+ <string name="sources_audio_footer">Питају се одозго надоле за сваку песму: први који је има пушта је. Стрелицама мењате редослед.</string>
+ <string name="sources_download_footer">Питају се одозго надоле: први извор који има песму даје фајл. Стрелицама мењате редослед.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Пушта се када ниједан извор изнад нема песму</string>
+ <string name="sources_ready">Спремно</string>
+ <string name="sources_details_show">Прикажи детаље</string>
+ <string name="sources_details_hide">Сакриј детаље</string>
+ <string name="sources_detail_version">Верзија %1$s · аутор %2$s</string>
+ <string name="sources_last_used">Последње: %1$s, %2$s</string>
+ <string name="sources_open">Отвори проширење</string>
+ <string name="sources_order_hint">Извори се питају редом подешеним у Подешавањима (Репродукција, Преузимања).</string>
+ <string name="sources_below_spotify">Не тражи се: Spotify је изнад</string>
+</resources>
diff --git a/base/app/src/main/res/values-sv/sources_strings.xml b/base/app/src/main/res/values-sv/sources_strings.xml
new file mode 100644
index 00000000..e78bf688
--- /dev/null
+++ b/base/app/src/main/res/values-sv/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Ljudkällor</string>
+ <string name="sources_download_title">Nedladdningskällor</string>
+ <string name="sources_audio_footer">Frågas uppifrån och ner för varje låt: den första som har den spelar upp den. Använd pilarna för att ändra ordningen.</string>
+ <string name="sources_download_footer">Frågas uppifrån och ner: den första källan som har låten levererar filen. Använd pilarna för att ändra ordningen.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Spelas när ingen källa ovanför har låten</string>
+ <string name="sources_ready">Klar</string>
+ <string name="sources_details_show">Visa detaljer</string>
+ <string name="sources_details_hide">Dölj detaljer</string>
+ <string name="sources_detail_version">Version %1$s · av %2$s</string>
+ <string name="sources_last_used">Senast: %1$s, %2$s</string>
+ <string name="sources_open">Öppna tillägget</string>
+ <string name="sources_order_hint">Källorna frågas i den ordning som anges i Inställningar (Uppspelning, Nedladdningar).</string>
+ <string name="sources_below_spotify">Frågas inte: Spotify är ovanför</string>
+</resources>
diff --git a/base/app/src/main/res/values-sw/sources_strings.xml b/base/app/src/main/res/values-sw/sources_strings.xml
new file mode 100644
index 00000000..9d8ef1bb
--- /dev/null
+++ b/base/app/src/main/res/values-sw/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Vyanzo vya sauti</string>
+ <string name="sources_download_title">Vyanzo vya upakuaji</string>
+ <string name="sources_audio_footer">Huulizwa kutoka juu hadi chini kwa kila wimbo: cha kwanza kilicho nao hucheza. Tumia mishale kubadilisha mpangilio.</string>
+ <string name="sources_download_footer">Huulizwa kutoka juu hadi chini: chanzo cha kwanza chenye wimbo hutoa faili. Tumia mishale kubadilisha mpangilio.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Hucheza wakati hakuna chanzo kilicho juu yake chenye wimbo</string>
+ <string name="sources_ready">Tayari</string>
+ <string name="sources_details_show">Onyesha maelezo</string>
+ <string name="sources_details_hide">Ficha maelezo</string>
+ <string name="sources_detail_version">Toleo %1$s · na %2$s</string>
+ <string name="sources_last_used">Mwisho: %1$s, %2$s</string>
+ <string name="sources_open">Fungua kiendelezi</string>
+ <string name="sources_order_hint">Vyanzo huulizwa kwa mpangilio uliowekwa katika Mipangilio (Uchezaji, Upakuaji).</string>
+ <string name="sources_below_spotify">Haulizwi: Spotify iko juu</string>
+</resources>
diff --git a/base/app/src/main/res/values-ta/sources_strings.xml b/base/app/src/main/res/values-ta/sources_strings.xml
new file mode 100644
index 00000000..d42c9726
--- /dev/null
+++ b/base/app/src/main/res/values-ta/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">ஆடியோ ஆதாரங்கள்</string>
+ <string name="sources_download_title">பதிவிறக்க ஆதாரங்கள்</string>
+ <string name="sources_audio_footer">ஒவ்வொரு பாடலுக்கும் மேலிருந்து கீழாகக் கேட்கப்படும்: அதைக் கொண்டுள்ள முதல் ஆதாரம் இயக்கும். வரிசையை மாற்ற அம்புக்குறிகளைப் பயன்படுத்தவும்.</string>
+ <string name="sources_download_footer">மேலிருந்து கீழாகக் கேட்கப்படும்: பாடல் உள்ள முதல் ஆதாரம் கோப்பை வழங்கும். வரிசையை மாற்ற அம்புக்குறிகளைப் பயன்படுத்தவும்.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">மேலுள்ள எந்த ஆதாரத்திலும் பாடல் இல்லாதபோது இயங்கும்</string>
+ <string name="sources_ready">தயார்</string>
+ <string name="sources_details_show">விவரங்களைக் காட்டு</string>
+ <string name="sources_details_hide">விவரங்களை மறை</string>
+ <string name="sources_detail_version">பதிப்பு %1$s · %2$s வழங்கியது</string>
+ <string name="sources_last_used">கடைசியாக: %1$s, %2$s</string>
+ <string name="sources_open">நீட்டிப்பைத் திற</string>
+ <string name="sources_order_hint">அமைப்புகளில் (பிளேபேக், பதிவிறக்கங்கள்) அமைக்கப்பட்ட வரிசையில் ஆதாரங்கள் கேட்கப்படும்.</string>
+ <string name="sources_below_spotify">கேட்கப்படுவதில்லை: Spotify மேலே உள்ளது</string>
+</resources>
diff --git a/base/app/src/main/res/values-te/sources_strings.xml b/base/app/src/main/res/values-te/sources_strings.xml
new file mode 100644
index 00000000..3dd017f0
--- /dev/null
+++ b/base/app/src/main/res/values-te/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">ఆడియో మూలాలు</string>
+ <string name="sources_download_title">డౌన్‌లోడ్ మూలాలు</string>
+ <string name="sources_audio_footer">ప్రతి పాటకు పై నుంచి కిందకు అడుగుతారు: అది ఉన్న మొదటిది ప్లే చేస్తుంది. క్రమం మార్చడానికి బాణాలు ఉపయోగించండి.</string>
+ <string name="sources_download_footer">పై నుంచి కిందకు అడుగుతారు: పాట ఉన్న మొదటి మూలం ఫైల్ ఇస్తుంది. క్రమం మార్చడానికి బాణాలు ఉపయోగించండి.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">పైన ఉన్న ఏ మూలంలోనూ పాట లేనప్పుడు ప్లే అవుతుంది</string>
+ <string name="sources_ready">సిద్ధం</string>
+ <string name="sources_details_show">వివరాలు చూపు</string>
+ <string name="sources_details_hide">వివరాలు దాచు</string>
+ <string name="sources_detail_version">వెర్షన్ %1$s · %2$s ద్వారా</string>
+ <string name="sources_last_used">చివరిది: %1$s, %2$s</string>
+ <string name="sources_open">ఎక్స్‌టెన్షన్ తెరువు</string>
+ <string name="sources_order_hint">సెట్టింగ్‌లలో (ప్లేబ్యాక్, డౌన్‌లోడ్‌లు) సెట్ చేసిన క్రమంలో మూలాలు అడగబడతాయి.</string>
+ <string name="sources_below_spotify">అడగబడదు: Spotify పైన ఉంది</string>
+</resources>
diff --git a/base/app/src/main/res/values-th/sources_strings.xml b/base/app/src/main/res/values-th/sources_strings.xml
new file mode 100644
index 00000000..c8d78d8a
--- /dev/null
+++ b/base/app/src/main/res/values-th/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">แหล่งเสียง</string>
+ <string name="sources_download_title">แหล่งดาวน์โหลด</string>
+ <string name="sources_audio_footer">ถามจากบนลงล่างสำหรับแต่ละเพลง: แหล่งแรกที่มีเพลงนั้นจะเล่น ใช้ลูกศรเพื่อเปลี่ยนลำดับ</string>
+ <string name="sources_download_footer">ถามจากบนลงล่าง: แหล่งแรกที่มีเพลงนั้นจะให้ไฟล์ ใช้ลูกศรเพื่อเปลี่ยนลำดับ</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">เล่นเมื่อไม่มีแหล่งที่อยู่เหนือกว่ามีเพลงนั้น</string>
+ <string name="sources_ready">พร้อม</string>
+ <string name="sources_details_show">แสดงรายละเอียด</string>
+ <string name="sources_details_hide">ซ่อนรายละเอียด</string>
+ <string name="sources_detail_version">เวอร์ชัน %1$s · โดย %2$s</string>
+ <string name="sources_last_used">ล่าสุด: %1$s, %2$s</string>
+ <string name="sources_open">เปิดส่วนขยาย</string>
+ <string name="sources_order_hint">แหล่งจะถูกถามตามลำดับที่ตั้งไว้ในการตั้งค่า (การเล่น, การดาวน์โหลด)</string>
+ <string name="sources_below_spotify">ไม่ถูกถาม: Spotify อยู่ด้านบน</string>
+</resources>
diff --git a/base/app/src/main/res/values-tl/sources_strings.xml b/base/app/src/main/res/values-tl/sources_strings.xml
new file mode 100644
index 00000000..bb291fc7
--- /dev/null
+++ b/base/app/src/main/res/values-tl/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Mga pinagmumulan ng audio</string>
+ <string name="sources_download_title">Mga pinagmumulan ng download</string>
+ <string name="sources_audio_footer">Tinatanong mula sa itaas pababa para sa bawat kanta: ang unang may kanta ang magpapatugtog nito. Gamitin ang mga arrow para baguhin ang ayos.</string>
+ <string name="sources_download_footer">Tinatanong mula sa itaas pababa: ang unang pinagmumulan na may kanta ang magbibigay ng file. Gamitin ang mga arrow para baguhin ang ayos.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Tumutugtog kapag walang pinagmumulan sa itaas na may kanta</string>
+ <string name="sources_ready">Handa</string>
+ <string name="sources_details_show">Ipakita ang detalye</string>
+ <string name="sources_details_hide">Itago ang detalye</string>
+ <string name="sources_detail_version">Bersyon %1$s · ni %2$s</string>
+ <string name="sources_last_used">Huling ginamit: %1$s, %2$s</string>
+ <string name="sources_open">Buksan ang extension</string>
+ <string name="sources_order_hint">Tinatanong ang mga pinagmumulan ayon sa ayos na nakatakda sa Mga Setting (Playback, Mga Download).</string>
+ <string name="sources_below_spotify">Hindi tinatanong: nasa itaas ang Spotify</string>
+</resources>
diff --git a/base/app/src/main/res/values-tr/sources_strings.xml b/base/app/src/main/res/values-tr/sources_strings.xml
new file mode 100644
index 00000000..ec8d5cdb
--- /dev/null
+++ b/base/app/src/main/res/values-tr/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Ses kaynakları</string>
+ <string name="sources_download_title">İndirme kaynakları</string>
+ <string name="sources_audio_footer">Her şarkı için yukarıdan aşağıya sorulur: şarkıya sahip ilk kaynak çalar. Sırayı değiştirmek için okları kullanın.</string>
+ <string name="sources_download_footer">Yukarıdan aşağıya sorulur: şarkıya sahip ilk kaynak dosyayı sağlar. Sırayı değiştirmek için okları kullanın.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Üstteki hiçbir kaynakta şarkı yoksa çalar</string>
+ <string name="sources_ready">Hazır</string>
+ <string name="sources_details_show">Ayrıntıları göster</string>
+ <string name="sources_details_hide">Ayrıntıları gizle</string>
+ <string name="sources_detail_version">Sürüm %1$s · geliştirici: %2$s</string>
+ <string name="sources_last_used">Son: %1$s, %2$s</string>
+ <string name="sources_open">Eklentiyi aç</string>
+ <string name="sources_order_hint">Kaynaklar Ayarlar\'da (Oynatma, İndirmeler) belirlenen sırayla sorulur.</string>
+ <string name="sources_below_spotify">Sorulmaz: Spotify yukarıda</string>
+</resources>
diff --git a/base/app/src/main/res/values-uk/sources_strings.xml b/base/app/src/main/res/values-uk/sources_strings.xml
new file mode 100644
index 00000000..3e4a5165
--- /dev/null
+++ b/base/app/src/main/res/values-uk/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Джерела аудіо</string>
+ <string name="sources_download_title">Джерела завантаження</string>
+ <string name="sources_audio_footer">Опитуються згори донизу для кожної пісні: перше, яке її має, відтворює її. Стрілками змінюйте порядок.</string>
+ <string name="sources_download_footer">Опитуються згори донизу: перше джерело, що має пісню, надає файл. Стрілками змінюйте порядок.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Відтворюється, коли жодне джерело вище не має пісні</string>
+ <string name="sources_ready">Готово</string>
+ <string name="sources_details_show">Показати деталі</string>
+ <string name="sources_details_hide">Сховати деталі</string>
+ <string name="sources_detail_version">Версія %1$s · від %2$s</string>
+ <string name="sources_last_used">Останнє: %1$s, %2$s</string>
+ <string name="sources_open">Відкрити розширення</string>
+ <string name="sources_order_hint">Джерела опитуються в порядку, заданому в Налаштуваннях (Відтворення, Завантаження).</string>
+ <string name="sources_below_spotify">Не запитується: Spotify вище</string>
+</resources>
diff --git a/base/app/src/main/res/values-ur/sources_strings.xml b/base/app/src/main/res/values-ur/sources_strings.xml
new file mode 100644
index 00000000..e29d18f1
--- /dev/null
+++ b/base/app/src/main/res/values-ur/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">آڈیو ذرائع</string>
+ <string name="sources_download_title">ڈاؤن لوڈ ذرائع</string>
+ <string name="sources_audio_footer">ہر گانے کے لیے اوپر سے نیچے پوچھا جاتا ہے: جس کے پاس وہ ہو وہ پہلا اسے چلاتا ہے۔ ترتیب بدلنے کے لیے تیروں کا استعمال کریں۔</string>
+ <string name="sources_download_footer">اوپر سے نیچے پوچھا جاتا ہے: گانا رکھنے والا پہلا ذریعہ فائل فراہم کرتا ہے۔ ترتیب بدلنے کے لیے تیروں کا استعمال کریں۔</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">اوپر کسی ذریعے کے پاس گانا نہ ہو تو چلتا ہے</string>
+ <string name="sources_ready">تیار</string>
+ <string name="sources_details_show">تفصیلات دکھائیں</string>
+ <string name="sources_details_hide">تفصیلات چھپائیں</string>
+ <string name="sources_detail_version">ورژن %1$s · از %2$s</string>
+ <string name="sources_last_used">آخری: %1$s، %2$s</string>
+ <string name="sources_open">ایکسٹینشن کھولیں</string>
+ <string name="sources_order_hint">ذرائع ترتیبات (پلے بیک، ڈاؤن لوڈز) میں مقرر کردہ ترتیب سے پوچھے جاتے ہیں۔</string>
+ <string name="sources_below_spotify">نہیں پوچھا جاتا: Spotify اوپر ہے</string>
+</resources>
diff --git a/base/app/src/main/res/values-vi/sources_strings.xml b/base/app/src/main/res/values-vi/sources_strings.xml
new file mode 100644
index 00000000..1c47b739
--- /dev/null
+++ b/base/app/src/main/res/values-vi/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Nguồn âm thanh</string>
+ <string name="sources_download_title">Nguồn tải xuống</string>
+ <string name="sources_audio_footer">Được hỏi từ trên xuống cho mỗi bài: nguồn đầu tiên có bài đó sẽ phát. Dùng mũi tên để đổi thứ tự.</string>
+ <string name="sources_download_footer">Được hỏi từ trên xuống: nguồn đầu tiên có bài hát sẽ cung cấp tệp. Dùng mũi tên để đổi thứ tự.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Phát khi không có nguồn nào ở trên có bài hát</string>
+ <string name="sources_ready">Sẵn sàng</string>
+ <string name="sources_details_show">Hiện chi tiết</string>
+ <string name="sources_details_hide">Ẩn chi tiết</string>
+ <string name="sources_detail_version">Phiên bản %1$s · bởi %2$s</string>
+ <string name="sources_last_used">Gần nhất: %1$s, %2$s</string>
+ <string name="sources_open">Mở tiện ích mở rộng</string>
+ <string name="sources_order_hint">Các nguồn được hỏi theo thứ tự đặt trong Cài đặt (Phát, Tải xuống).</string>
+ <string name="sources_below_spotify">Không được hỏi: Spotify ở phía trên</string>
+</resources>
diff --git a/base/app/src/main/res/values-zh-rHK/sources_strings.xml b/base/app/src/main/res/values-zh-rHK/sources_strings.xml
new file mode 100644
index 00000000..5dd51dc4
--- /dev/null
+++ b/base/app/src/main/res/values-zh-rHK/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">音訊來源</string>
+ <string name="sources_download_title">下載來源</string>
+ <string name="sources_audio_footer">每首歌會由上至下查詢:第一個有該歌曲的來源會播放。使用箭咀更改次序。</string>
+ <string name="sources_download_footer">由上至下查詢:第一個有該歌曲的來源會提供檔案。使用箭咀更改次序。</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">上方所有來源都沒有該歌曲時播放</string>
+ <string name="sources_ready">已就緒</string>
+ <string name="sources_details_show">顯示詳情</string>
+ <string name="sources_details_hide">隱藏詳情</string>
+ <string name="sources_detail_version">版本 %1$s · 作者 %2$s</string>
+ <string name="sources_last_used">最近:%1$s,%2$s</string>
+ <string name="sources_open">開啟擴充功能</string>
+ <string name="sources_order_hint">來源會按「設定」(播放、下載)中的次序查詢。</string>
+ <string name="sources_below_spotify">不查詢:Spotify 在上方</string>
+</resources>
diff --git a/base/app/src/main/res/values-zh-rTW/sources_strings.xml b/base/app/src/main/res/values-zh-rTW/sources_strings.xml
new file mode 100644
index 00000000..513adc73
--- /dev/null
+++ b/base/app/src/main/res/values-zh-rTW/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">音訊來源</string>
+ <string name="sources_download_title">下載來源</string>
+ <string name="sources_audio_footer">每首歌曲會由上至下查詢:第一個擁有該歌曲的來源會播放。使用箭頭調整順序。</string>
+ <string name="sources_download_footer">由上至下查詢:第一個擁有該歌曲的來源會提供檔案。使用箭頭調整順序。</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">上方所有來源都沒有該歌曲時播放</string>
+ <string name="sources_ready">已就緒</string>
+ <string name="sources_details_show">顯示詳細資料</string>
+ <string name="sources_details_hide">隱藏詳細資料</string>
+ <string name="sources_detail_version">版本 %1$s · 作者 %2$s</string>
+ <string name="sources_last_used">最近:%1$s,%2$s</string>
+ <string name="sources_open">開啟擴充功能</string>
+ <string name="sources_order_hint">來源會依「設定」(播放、下載)中設定的順序查詢。</string>
+ <string name="sources_below_spotify">不查詢:Spotify 在上方</string>
+</resources>
diff --git a/base/app/src/main/res/values-zh/extensions_strings.xml b/base/app/src/main/res/values-zh/extensions_strings.xml
index e179c9de..2b4493ef 100644
--- a/base/app/src/main/res/values-zh/extensions_strings.xml
+++ b/base/app/src/main/res/values-zh/extensions_strings.xml
@@ -208,4 +208,9 @@
<string name="ext_grants_title">始终允许</string>
<string name="ext_grants_note">此扩展无需询问即可对 Spotify 进行的更改。撤销某项后将重新询问。</string>
<string name="ext_grant_revoke">撤销</string>
+ <string name="extensions_unreadable_file">无法读取该文件</string>
+ <string name="ext_welcome_title">已安装 %1$s</string>
+ <string name="ext_welcome_steps">最后一步</string>
+ <string name="ext_welcome_from">由扩展编写。</string>
+ <string name="ext_welcome_ok">知道了</string>
</resources>
diff --git a/base/app/src/main/res/values-zh/immersive_detail_strings.xml b/base/app/src/main/res/values-zh/immersive_detail_strings.xml
new file mode 100644
index 00000000..59893e22
--- /dev/null
+++ b/base/app/src/main/res/values-zh/immersive_detail_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_detail_pause">暂停</string>
+ <string name="immersive_detail_save">保存到音乐库</string>
+ <string name="immersive_detail_unsave">从音乐库中移除</string>
+ <string name="immersive_detail_find">在列表中查找</string>
+ <string name="immersive_detail_smart_shuffle_on">智能随机播放已开启:推荐内容会加入随机列表。</string>
+ <string name="immersive_detail_more">更多</string>
+ <string name="immersive_detail_less">收起</string>
+ <string name="immersive_detail_featured_on">收录于</string>
+ <string name="immersive_detail_remove_local">从此播放列表中移除</string>
+ <string name="immersive_detail_follow">关注</string>
+ <string name="immersive_detail_unfollow">取消关注</string>
+</resources>
diff --git a/base/app/src/main/res/values-zh/immersive_genius_strings.xml b/base/app/src/main/res/values-zh/immersive_genius_strings.xml
new file mode 100644
index 00000000..1e31297d
--- /dev/null
+++ b/base/app/src/main/res/values-zh/immersive_genius_strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_genius_none">Genius 上没有关于这首歌的内容。</string>
+ <string name="immersive_genius_error">目前无法连接到 Genius。</string>
+ <string name="immersive_genius_view">在 Genius 上查看</string>
+</resources>
diff --git a/base/app/src/main/res/values-zh/immersive_lyrics_strings.xml b/base/app/src/main/res/values-zh/immersive_lyrics_strings.xml
new file mode 100644
index 00000000..04b9a182
--- /dev/null
+++ b/base/app/src/main/res/values-zh/immersive_lyrics_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_lyrics_instrumental">纯音乐</string>
+ <string name="immersive_lyrics_none">此曲目没有歌词</string>
+ <string name="immersive_queue_title">队列</string>
+ <string name="immersive_queue_now_playing">正在播放</string>
+ <string name="immersive_queue_empty">队列为空</string>
+ <string name="immersive_queue_remove">从队列中移除</string>
+ <string name="immersive_queue_reorder">在队列中移动</string>
+ <string name="immersive_queue_shuffle">随机播放</string>
+ <string name="immersive_queue_repeat">循环播放</string>
+</resources>
diff --git a/base/app/src/main/res/values-zh/immersive_pages_strings.xml b/base/app/src/main/res/values-zh/immersive_pages_strings.xml
new file mode 100644
index 00000000..a4e299b6
--- /dev/null
+++ b/base/app/src/main/res/values-zh/immersive_pages_strings.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_pages_songs">歌曲</string>
+ <string name="immersive_pages_artists">艺人</string>
+ <string name="immersive_pages_albums">专辑</string>
+ <string name="immersive_pages_unknown_artist">未知艺人</string>
+ <string name="immersive_pages_unknown_album">未知专辑</string>
+ <string name="immersive_pages_name_hint">名称</string>
+ <string name="immersive_pages_play_group">播放 %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values-zh/immersive_player_strings.xml b/base/app/src/main/res/values-zh/immersive_player_strings.xml
new file mode 100644
index 00000000..27bc343b
--- /dev/null
+++ b/base/app/src/main/res/values-zh/immersive_player_strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_player_close">关闭播放器</string>
+ <string name="immersive_player_play">播放</string>
+ <string name="immersive_player_pause">暂停</string>
+ <string name="immersive_player_previous">上一首</string>
+ <string name="immersive_player_next">下一首</string>
+ <string name="immersive_player_like">添加到“已点赞的歌曲”</string>
+ <string name="immersive_player_unlike">从“已点赞的歌曲”中移除</string>
+ <string name="immersive_player_more">更多</string>
+ <string name="immersive_player_lyrics">歌词</string>
+ <string name="immersive_player_lyrics_close">关闭歌词</string>
+ <string name="immersive_player_queue">接下来</string>
+ <string name="immersive_player_queue_close">关闭队列</string>
+ <string name="immersive_player_devices">设备</string>
+ <string name="immersive_player_shuffle_on">随机播放:开</string>
+ <string name="immersive_player_shuffle_off">随机播放:关</string>
+ <string name="immersive_player_repeat_off">循环播放:关</string>
+ <string name="immersive_player_repeat_all">循环播放:全部</string>
+ <string name="immersive_player_repeat_one">循环播放:单曲</string>
+ <string name="immersive_player_volume_down">调低音量</string>
+ <string name="immersive_player_volume_up">调高音量</string>
+ <string name="immersive_player_ad">广告</string>
+ <string name="immersive_player_explicit">含不良内容</string>
+ <string name="immersive_player_added_to_liked">已添加到“已点赞的歌曲”</string>
+ <string name="immersive_player_mini_player">打开播放器</string>
+</resources>
diff --git a/base/app/src/main/res/values-zh/immersive_screens_strings.xml b/base/app/src/main/res/values-zh/immersive_screens_strings.xml
new file mode 100644
index 00000000..6a79822c
--- /dev/null
+++ b/base/app/src/main/res/values-zh/immersive_screens_strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_screens_account">账号</string>
+ <string name="immersive_screens_account_page">账号页面</string>
+ <string name="immersive_screens_account_page_detail">套餐、隐私和设备</string>
+ <string name="immersive_screens_top_result">最佳结果</string>
+ <string name="immersive_screens_reset_order">恢复默认顺序</string>
+</resources>
diff --git a/base/app/src/main/res/values-zh/immersive_shell_strings.xml b/base/app/src/main/res/values-zh/immersive_shell_strings.xml
new file mode 100644
index 00000000..fd7c1cf0
--- /dev/null
+++ b/base/app/src/main/res/values-zh/immersive_shell_strings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_shell_back">返回</string>
+ <string name="immersive_shell_more">更多选项</string>
+ <string name="immersive_shell_search_hint">搜索</string>
+ <string name="immersive_shell_search_clear">清除搜索</string>
+ <string name="immersive_shell_play">播放</string>
+ <string name="immersive_shell_shuffle">随机播放</string>
+ <string name="immersive_shell_see_all">查看全部</string>
+ <string name="immersive_shell_now_playing">正在播放</string>
+ <string name="immersive_shell_explicit">含不良内容</string>
+</resources>
diff --git a/base/app/src/main/res/values-zh/myspoti_strings.xml b/base/app/src/main/res/values-zh/myspoti_strings.xml
index 21712237..f28ae8f4 100644
--- a/base/app/src/main/res/values-zh/myspoti_strings.xml
+++ b/base/app/src/main/res/values-zh/myspoti_strings.xml
@@ -457,4 +457,70 @@
<string name="look_offer_try">试用沉浸式</string>
<string name="look_offer_keep">保持经典</string>
<string name="look_offer_note">之后可在“设置 > 显示和语言”中更改。</string>
+ <string name="downloads_lists">专辑和播放列表</string>
+ <string name="downloads_singles">歌曲</string>
+ <string name="downloads_kind_album">专辑</string>
+ <string name="downloads_kind_playlist">播放列表</string>
+ <string name="downloads_kind_liked">已点赞的歌曲</string>
+ <string name="settings_tab_appearance">外观</string>
+ <string name="settings_tab_about">关于</string>
+ <string name="settings_about_version">版本 %1$s</string>
+ <string name="settings_update_available">有可用版本 %1$s</string>
+ <string name="settings_update_available_detail">点按即可下载并安装</string>
+ <string name="setup_look_title">选择你的外观</string>
+ <string name="setup_look_subtitle">先看预览,再选择你喜欢的。</string>
+ <string name="look_classic">经典</string>
+ <string name="look_classic_detail">随封面变色的深色播放器,圆形播放按钮</string>
+ <string name="look_immersive">沉浸式</string>
+ <string name="look_immersive_detail">大幅封面、专辑配色、动态歌词</string>
+ <string name="setup_look_preview">“%1$s”外观预览</string>
+ <string name="setup_look_tap_hint">点按预览可暂停,滑动可切换</string>
+ <string name="setup_look_still_hint">此手机已关闭动画:显示三张静态画面</string>
+ <string name="setup_look_still_player">播放器</string>
+ <string name="setup_look_still_paused">已暂停</string>
+ <string name="setup_look_still_lyrics">歌词</string>
+ <string name="look_demo_all">全部</string>
+ <string name="look_demo_music">音乐</string>
+ <string name="look_demo_podcasts">播客</string>
+ <string name="look_demo_section">为你打造</string>
+ <string name="settings_update_refresh">检查更新</string>
+ <string name="settings_update_uptodate_now">已是最新版本(刚刚检查)</string>
+ <string name="settings_update_last_checked">上次检查:%1$s</string>
+ <string name="settings_update_never">从未检查</string>
+ <string name="settings_update_rate_limited">GitHub 目前正在限制请求。请几分钟后重试。</string>
+ <string name="settings_update_failed">无法检查更新。请检查网络连接。</string>
+ <string name="song_unavailable_skipped">%1$s 不可用,已跳过。</string>
+ <string name="song_unavailable">%1$s 不可用。</string>
+ <string name="songs_skipped_by_spotify">Spotify 不断跳过无法播放的歌曲,因此播放已暂停。点按播放重试,或检查你的账号和网络连接。</string>
+ <string name="playlist_member_listener">听众</string>
+ <string name="playlist_member_remove_collab">取消协作者身份</string>
+ <string name="playlist_member_make_collab">设为协作者</string>
+ <string name="playlist_member_remove">从播放列表中移除</string>
+ <string name="playlist_stop_collab_private">停止协作 %1$s?协作者将变为听众:仍可收听,但无法再添加或移除歌曲。已分享的邀请链接在到期前(最长 7 天)仍然有效,且无法取消。</string>
+ <string name="playlist_stop_collab_public">停止协作 %1$s?协作者将从播放列表中移除。已分享的邀请链接在到期前(最长 7 天)仍然有效,且无法取消。</string>
+ <string name="library_chip_playlists">播放列表</string>
+ <string name="library_chip_artists">艺人</string>
+ <string name="library_chip_albums">专辑</string>
+ <string name="library_chip_songs">歌曲</string>
+ <string name="add_playlist_to_playlist">将播放列表添加到另一个播放列表</string>
+ <string name="add_collection_reading">正在读取歌曲…</string>
+ <string name="add_collection_nothing">没有可添加的内容</string>
+ <string name="add_collection_done">已将 %1$d 首歌曲添加到 %2$s</string>
+ <string name="duplicate_title_some">部分已添加</string>
+ <string name="duplicate_title_all">已添加</string>
+ <string name="duplicate_text_some">其中一些歌曲已在 %1$s 中。</string>
+ <string name="duplicate_text_all">这些歌曲已在 %1$s 中。</string>
+ <string name="duplicate_add_all">全部添加</string>
+ <string name="duplicate_add_new">添加新的</string>
+ <string name="duplicate_add_anyway">仍然添加</string>
+ <string name="duplicate_dont_add">不添加</string>
+ <string name="settings_music_video_title">音乐视频</string>
+ <string name="settings_music_video_detail">播放器中的视频按钮,以及自动开始的片段。关闭后:仅音频和 Canvas。</string>
+ <string name="downloads_need_source">下载需要一个来源扩展。请在“设置”&gt;“扩展”中安装一个。</string>
+ <string name="downloads_source_row_title">下载来源</string>
+ <string name="downloads_source_row_on">由扩展提供文件。点按以管理扩展。</string>
+ <string name="downloads_source_row_off">暂无:请安装下载来源扩展。</string>
+ <string name="settings_look_title">外观</string>
+ <string name="settings_headset_skip_title">耳机按键在播客中快进/快退 15 秒</string>
+ <string name="settings_headset_skip_detail">关闭后,切换到下一集或上一集</string>
</resources>
diff --git a/base/app/src/main/res/values-zh/security_strings.xml b/base/app/src/main/res/values-zh/security_strings.xml
new file mode 100644
index 00000000..667a4f1c
--- /dev/null
+++ b/base/app/src/main/res/values-zh/security_strings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="action_playback_mirror">在此静音播放 Spotify;会在你的账户上计入收听次数</string>
+ <string name="mirror_indicator">Spotify 由 %1$s 镜像</string>
+</resources>
diff --git a/base/app/src/main/res/values-zh/sources_strings.xml b/base/app/src/main/res/values-zh/sources_strings.xml
new file mode 100644
index 00000000..3413b299
--- /dev/null
+++ b/base/app/src/main/res/values-zh/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">音频来源</string>
+ <string name="sources_download_title">下载来源</string>
+ <string name="sources_audio_footer">每首歌曲从上到下依次查询:第一个拥有该歌曲的来源会播放它。使用箭头调整顺序。</string>
+ <string name="sources_download_footer">从上到下依次查询:第一个拥有该歌曲的来源提供文件。使用箭头调整顺序。</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">上方所有来源都没有该歌曲时播放</string>
+ <string name="sources_ready">就绪</string>
+ <string name="sources_details_show">显示详情</string>
+ <string name="sources_details_hide">隐藏详情</string>
+ <string name="sources_detail_version">版本 %1$s · 作者 %2$s</string>
+ <string name="sources_last_used">最近:%1$s,%2$s</string>
+ <string name="sources_open">打开扩展</string>
+ <string name="sources_order_hint">来源会按“设置”(播放、下载)中设定的顺序查询。</string>
+ <string name="sources_below_spotify">不询问:Spotify 在上方</string>
+</resources>
diff --git a/base/app/src/main/res/values-zh/spotify_strings.xml b/base/app/src/main/res/values-zh/spotify_strings.xml
index 9a8957be..c1cb38da 100644
--- a/base/app/src/main/res/values-zh/spotify_strings.xml
+++ b/base/app/src/main/res/values-zh/spotify_strings.xml
@@ -146,4 +146,5 @@
<string name="find_in_context_edit_text_liked_songs_hint" formatted="false">在已点赞的歌曲中查找</string>
<string name="find_in_context_edit_text_playlist_hint" formatted="false">在歌单中查找</string>
<string name="assisted_curation_search_empty_view_no_result_title" formatted="false">找不到“%1$s”</string>
+ <string name="mr_user_route_category_name" formatted="false">设备</string>
</resources>
diff --git a/base/app/src/main/res/values-zh/stats_strings.xml b/base/app/src/main/res/values-zh/stats_strings.xml
new file mode 100644
index 00000000..cb31ba39
--- /dev/null
+++ b/base/app/src/main/res/values-zh/stats_strings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="stats_tab_spotify">Spotify 上</string>
+ <string name="stats_tab_phone">此手机上</string>
+ <string name="stats_range_short">过去 4 周</string>
+ <string name="stats_range_medium">过去 6 个月</string>
+ <string name="stats_range_long">过去一年</string>
+ <string name="stats_artists_ranked">你的收听中有 %1$d 位艺人</string>
+ <string name="stats_empty">Spotify 暂时没有此时段的热门艺人或曲目。请继续收听,稍后再来查看。</string>
+ <string name="stats_failed">Spotify 没有返回你的统计数据。</string>
+ <string name="stats_spotify_note">由 Spotify 根据此账号在所有设备上播放的全部内容排名。Spotify 不提供播放次数或收听分钟数:“此手机上”的分钟数是 Myspoti 自己的统计。</string>
+ <string name="stats_weekly_minutes">每周分钟数</string>
+ <string name="stats_this_week">本周:%1$d 分钟</string>
+ <string name="stats_listening_stats">收听统计</string>
+ <string name="friends_title">好友动态</string>
+ <string name="friends_detail">你关注的人正在听什么</string>
+ <string name="friends_now">现在</string>
+ <string name="friends_empty">暂无好友动态。你关注且在 Spotify 上分享收听动态的好友会显示在这里。</string>
+ <string name="friends_failed">Spotify 没有返回好友动态。</string>
+ <string name="friends_refresh">刷新</string>
+ <string name="artist_top_short">你过去 4 周的第 %1$d 位艺人</string>
+ <string name="artist_top_medium">你过去 6 个月的第 %1$d 位艺人</string>
+ <string name="artist_top_long">你过去一年的第 %1$d 位艺人</string>
+</resources>
diff --git a/base/app/src/main/res/values-zh/strings.xml b/base/app/src/main/res/values-zh/strings.xml
index 274750f6..758b9242 100644
--- a/base/app/src/main/res/values-zh/strings.xml
+++ b/base/app/src/main/res/values-zh/strings.xml
@@ -22,4 +22,5 @@
<string name="account_page_title">Spotify 账号</string>
<string name="account_page_detail">订阅、隐私和设备,在 spotify.com 上管理</string>
<string name="player_source_downloaded">已下载</string>
+ <string name="extension_change_write">现在也可以向 Spotify 发送:%1$s</string>
</resources>
diff --git a/base/app/src/main/res/values-zh/update_consent_strings.xml b/base/app/src/main/res/values-zh/update_consent_strings.xml
new file mode 100644
index 00000000..4ce0ffc0
--- /dev/null
+++ b/base/app/src/main/res/values-zh/update_consent_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="update_code_title">%1$s 的代码已更改(%2$d 行,+%3$d/−%4$d)</string>
+ <string name="update_code_body">此扩展拥有强大权限(关键操作或广泛的网络访问),因此未经你同意绝不会运行新代码。</string>
+ <string name="update_code_files">已更改的文件:%1$s</string>
+ <string name="update_code_update">更新</string>
+ <string name="update_code_later">暂不</string>
+ <string name="update_check_waiting">发现更新:将在 24 小时后自动应用</string>
+ <string name="update_check_repo_changed">更新被拒绝:该仓库已更换所有者</string>
+ <string name="update_repo_changed_title">仓库已更换所有者</string>
+ <string name="update_repo_changed_body">该仓库以相同名称被重新注册或转移,因此其更新已被阻止。请卸载它,只有在信任新所有者时才重新安装。</string>
+ <string name="update_author_owner">作者 %1$s · 仓库所有者 %2$s</string>
+ <string name="update_author_unverified">作者 %1$s · 未验证</string>
+</resources>
diff --git a/base/app/src/main/res/values-zu/sources_strings.xml b/base/app/src/main/res/values-zu/sources_strings.xml
new file mode 100644
index 00000000..55a6ebb3
--- /dev/null
+++ b/base/app/src/main/res/values-zu/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Imithombo yomsindo</string>
+ <string name="sources_download_title">Imithombo yokulanda</string>
+ <string name="sources_audio_footer">Ibuzwa kusuka phezulu kuya phansi ngomculo ngamunye: owokuqala onawo uyawudlala. Sebenzisa imitikuva ukushintsha ukuhleleka.</string>
+ <string name="sources_download_footer">Ibuzwa kusuka phezulu kuya phansi: umthombo wokuqala onalo umculo unikeza ifayela. Sebenzisa imitikuva ukushintsha ukuhleleka.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Idlala lapho kungekho mthombo ongaphezulu onomculo</string>
+ <string name="sources_ready">Ilungile</string>
+ <string name="sources_details_show">Bonisa imininingwane</string>
+ <string name="sources_details_hide">Fihla imininingwane</string>
+ <string name="sources_detail_version">Inguqulo %1$s · ngu-%2$s</string>
+ <string name="sources_last_used">Okokugcina: %1$s, %2$s</string>
+ <string name="sources_open">Vula isandiso</string>
+ <string name="sources_order_hint">Imithombo ibuzwa ngokuhleleka okusethwe kuZilungiselelo (Ukudlala, Okulandiwe).</string>
+ <string name="sources_below_spotify">Akubuzwa: i-Spotify iphezulu</string>
+</resources>
diff --git a/base/app/src/main/res/values/extensions_strings.xml b/base/app/src/main/res/values/extensions_strings.xml
index 05df4bcf..abce68c2 100644
--- a/base/app/src/main/res/values/extensions_strings.xml
+++ b/base/app/src/main/res/values/extensions_strings.xml
@@ -18,6 +18,7 @@
<string name="extensions_cancel">Cancel</string>
<string name="extensions_loading">Reading…</string>
<string name="extensions_error">Not installed: %1$s</string>
+ <string name="extensions_unreadable_file">The file could not be read</string>
<string name="extensions_prompt_title_install">Install %1$s?</string>
<string name="extensions_prompt_title_update">Update %1$s?</string>
<string name="extensions_prompt_by">%1$s · version %2$s · %3$s</string>
diff --git a/base/app/src/main/res/values/immersive_genius_strings.xml b/base/app/src/main/res/values/immersive_genius_strings.xml
new file mode 100644
index 00000000..bb285d12
--- /dev/null
+++ b/base/app/src/main/res/values/immersive_genius_strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="immersive_genius_none">Genius has nothing on this song.</string>
+ <string name="immersive_genius_error">Genius can\'t be reached right now.</string>
+ <string name="immersive_genius_view">View on Genius</string>
+</resources>
diff --git a/base/app/src/main/res/values/myspoti_strings.xml b/base/app/src/main/res/values/myspoti_strings.xml
index bc5e7db5..498338be 100644
--- a/base/app/src/main/res/values/myspoti_strings.xml
+++ b/base/app/src/main/res/values/myspoti_strings.xml
@@ -277,6 +277,12 @@
<string name="settings_check_update_detail">Looks for a newer version and offers to install it</string>
<string name="settings_update_checking">Checking…</string>
<string name="settings_update_check_latest">Myspoti is up to date</string>
+ <string name="settings_update_refresh">Check for updates</string>
+ <string name="settings_update_uptodate_now">Up to date (checked just now)</string>
+ <string name="settings_update_last_checked">Last checked: %1$s</string>
+ <string name="settings_update_never">Never checked</string>
+ <string name="settings_update_rate_limited">GitHub is limiting requests right now. Try again in a few minutes.</string>
+ <string name="settings_update_failed">Could not check for updates. Check your connection.</string>
<!-- A25: stop the queue, keep the songs already downloaded. -->
<string name="downloads_stop_all_title">Stop all downloads</string>
<string name="downloads_stop_all_detail">Cancels what is left; songs already downloaded are kept</string>
@@ -519,4 +525,6 @@
<string name="look_offer_try">Try Immersive</string>
<string name="look_offer_keep">Keep Classic</string>
<string name="look_offer_note">You can change it later in Settings > Display and language.</string>
+ <string name="settings_headset_skip_title">Headphone buttons skip 15 s on podcasts</string>
+ <string name="settings_headset_skip_detail">When off, they go to the next or previous episode</string>
</resources>
diff --git a/base/app/src/main/res/values/security_strings.xml b/base/app/src/main/res/values/security_strings.xml
new file mode 100644
index 00000000..d8e8d45d
--- /dev/null
+++ b/base/app/src/main/res/values/security_strings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="action_playback_mirror">Keeps Spotify playing silently here; counts listens on your account</string>
+ <string name="mirror_indicator">Spotify mirrored by %1$s</string>
+</resources>
diff --git a/base/app/src/main/res/values/sources_strings.xml b/base/app/src/main/res/values/sources_strings.xml
new file mode 100644
index 00000000..cecd4f68
--- /dev/null
+++ b/base/app/src/main/res/values/sources_strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="sources_audio_title">Audio sources</string>
+ <string name="sources_download_title">Download sources</string>
+ <string name="sources_audio_footer">Asked from top to bottom for each song: the first one that has it plays it. Use the arrows to change the order.</string>
+ <string name="sources_download_footer">Asked from top to bottom: the first one that has the song gives the file. Use the arrows to change the order.</string>
+ <string name="sources_spotify">Spotify</string>
+ <string name="sources_spotify_detail">Plays when no source above it has the song</string>
+ <string name="sources_ready">Ready</string>
+ <string name="sources_details_show">Show details</string>
+ <string name="sources_details_hide">Hide details</string>
+ <string name="sources_detail_version">Version %1$s · by %2$s</string>
+ <string name="sources_last_used">Last: %1$s, %2$s</string>
+ <string name="sources_open">Open the extension</string>
+ <string name="sources_order_hint">Sources are asked in the order set in Settings (Playback, Downloads).</string>
+ <string name="sources_below_spotify">Not asked: Spotify is above</string>
+</resources>
diff --git a/base/app/src/main/res/values/update_consent_strings.xml b/base/app/src/main/res/values/update_consent_strings.xml
new file mode 100644
index 00000000..fa918440
--- /dev/null
+++ b/base/app/src/main/res/values/update_consent_strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="update_code_title">The code of %1$s changed (%2$d lines, +%3$d/−%4$d)</string>
+ <string name="update_code_body">This extension holds powerful rights (critical actions or broad network access), so new code is never run without your OK.</string>
+ <string name="update_code_files">Files changed: %1$s</string>
+ <string name="update_code_update">Update</string>
+ <string name="update_code_later">Not now</string>
+ <string name="update_check_waiting">Update found: it will apply by itself in 24 hours</string>
+ <string name="update_check_repo_changed">Update refused: the repository changed owner</string>
+ <string name="update_repo_changed_title">Repository changed owner</string>
+ <string name="update_repo_changed_body">This repository was re-registered or transferred under the same name, so its updates are blocked. Uninstall it, or install it again only if you trust the new owner.</string>
+ <string name="update_author_owner">by %1$s · repository by %2$s</string>
+ <string name="update_author_unverified">by %1$s · not verified</string>
+</resources>
diff --git a/base/app/src/test/java/com/music/spotui/data/api/UpdateCheckerTest.kt b/base/app/src/test/java/com/music/spotui/data/api/UpdateCheckerTest.kt
index 8f9f6208..ca4fa3f8 100644
--- a/base/app/src/test/java/com/music/spotui/data/api/UpdateCheckerTest.kt
+++ b/base/app/src/test/java/com/music/spotui/data/api/UpdateCheckerTest.kt
@@ -21,6 +21,16 @@ class UpdateCheckerTest {
assertFalse(UpdateChecker.isNewer("2.0.0-beta.1", "2.0.0-beta.1"))
assertTrue(UpdateChecker.isNewer("2.0.1-beta.1", "2.0.0"))
}
+ @Test fun ordersBetasAndReleases() {
+ assertTrue(UpdateChecker.isNewer("2.0.2-beta.7", "2.0.2-beta.6"))
+ assertFalse(UpdateChecker.isNewer("2.0.2-beta.6", "2.0.2-beta.7"))
+ assertTrue(UpdateChecker.isNewer("2.0.2-beta.10", "2.0.2-beta.9"))
+ assertTrue(UpdateChecker.isNewer("2.0.2", "2.0.2-beta.7"))
+ assertFalse(UpdateChecker.isNewer("2.0.2-beta.7", "2.0.2"))
+ assertTrue(UpdateChecker.isNewer("2.0.3-beta.1", "2.0.2"))
+ assertTrue(UpdateChecker.isNewer("2.1.0-beta.1", "2.0.9"))
+ assertTrue(UpdateChecker.isNewer("2.0.2-beta.1", "2.0.1-beta.9"))
+ }
@Test fun notesKeepTheChangelogSectionAsPlainLines() {
val body = "- **Local Files**: a folder\n - nested [link](https://x.y)\n\n**Full Changelog**: https://github.com/a/b/compare/v1...v2"
assertEquals("• Local Files: a folder\n • nested link", UpdateChecker.cleanNotes(body))
diff --git a/base/app/src/test/java/com/music/spotui/extensions/ExtensionRegistryTest.kt b/base/app/src/test/java/com/music/spotui/extensions/ExtensionRegistryTest.kt
index 23f8d07b..f7ba8193 100644
--- a/base/app/src/test/java/com/music/spotui/extensions/ExtensionRegistryTest.kt
+++ b/base/app/src/test/java/com/music/spotui/extensions/ExtensionRegistryTest.kt
@@ -243,6 +243,27 @@ class ExtensionRegistryTest {
assertEquals(r, r.move("lyrics", ids, "zz", 1))
}
+ @Test fun eachSourceHasItsOwnOrderStartingFromTheOneActiveBefore() {
+ val ids = listOf("tidal", "qobuz", "deezer")
+ // Sources were exclusive: the one the user had made active is asked first.
+ var r = Registry(active = mapOf("audio.source" to "deezer"))
+ assertEquals(listOf("deezer", "tidal", "qobuz"), r.bySourceOrder("audio.source", "audio", ids) { it })
+ assertEquals(ids, r.bySourceOrder("download.source", "audio", ids) { it })
+ // Moving one in the audio order leaves the download order alone.
+ r = r.move("audio.source", r.bySourceOrder("audio.source", "audio", ids) { it }, "qobuz", -2)
+ assertEquals(listOf("qobuz", "deezer", "tidal"), r.bySourceOrder("audio.source", "audio", ids) { it })
+ assertEquals(ids, r.bySourceOrder("download.source", "audio", ids) { it })
+ // A source installed later is asked last.
+ assertEquals(listOf("qobuz", "deezer", "tidal", "new"), r.bySourceOrder("audio.source", "audio", ids + "new") { it })
+ // Spotify is last until moved; moved first, it stays first and a new source goes after it.
+ val line = ids + SPOTIFY_SOURCE
+ r = Registry()
+ assertEquals(line, r.bySourceOrder("audio.source", "audio", line) { it })
+ r = r.move("audio.source", line, SPOTIFY_SOURCE, -3)
+ assertEquals(listOf(SPOTIFY_SOURCE) + ids, r.bySourceOrder("audio.source", "audio", line) { it })
+ assertEquals(listOf(SPOTIFY_SOURCE) + ids + "new", r.bySourceOrder("audio.source", "audio", ids + "new" + SPOTIFY_SOURCE) { it })
+ }
+
@Test fun priorityIsKeptOnDiskAndForgetsAnUninstalledExtension() {
val m = manifest()
val a = installed(m, base).copy(id = "a.b.a")
diff --git a/base/app/src/test/java/com/music/spotui/ui/immersive/lyrics/QueueDragMathTest.kt b/base/app/src/test/java/com/music/spotui/ui/immersive/lyrics/QueueDragMathTest.kt
index 73c6464f..3bedd515 100644
--- a/base/app/src/test/java/com/music/spotui/ui/immersive/lyrics/QueueDragMathTest.kt
+++ b/base/app/src/test/java/com/music/spotui/ui/immersive/lyrics/QueueDragMathTest.kt
@@ -101,35 +101,91 @@ class QueueDragMathTest {
// ── The Spotify queue's reports while a move is applied: stale, half-way, final ──
- private fun pending(q: List<String>, n: List<String>) = QueueDragMath.Pending(q, n, q, n, "cur")
+ private val Match = QueueDragMath.Verdict.Matched
+ private val Keep = QueueDragMath.Verdict.Keep
+
+ /** "n1" dragged from the list into the queue between q0 and q1. */
+ private val q0 = listOf("q0", "q1")
+ private val n0 = listOf("n0", "n1", "n2")
+ private val place = QueueDragMath.Place(true, 1)
+ private fun move(dragged: String = "n1", q: List<String> = q0, n: List<String> = n0, p: QueueDragMath.Place = place, at: Long = 0L, prev: QueueDragMath.Pending<String>? = null): QueueDragMath.Pending<String> {
+ val (eq, en) = QueueDragMath.apply(q, n, dragged, p)
+ return QueueDragMath.Pending(eq, en, q, n, eq, en, dragged, "cur", at, prev)
+ }
+ private val finalQ = listOf("q0", "n1", "q1")
+ private val finalN = listOf("n0", "n2")
@Test fun noReportBeforeTheFinalOneEndsThePendingOrder() {
- // "n1" dragged from the list into the queue, between q0 and q1.
- val q0 = listOf("q0", "q1"); val n0 = listOf("n0", "n1", "n2")
- val (eq, en) = QueueDragMath.apply(q0, n0, "n1", QueueDragMath.Place(true, 1))
- val p = pending(eq, en)
- assertEquals(listOf("q0", "n1", "q1"), eq)
- assertEquals(listOf("n0", "n2"), en)
- val reports = listOf(
- q0 to n0, // stale: before the edit
- q0 to listOf("n0", "n2"), // removed from the list, not yet queued
- q0 + "n1" to listOf("n0", "n2"), // queued at the end
- )
- for ((rq, rn) in reports) assertFalse("$rq $rn", p.over(rq, rn, "cur"))
- assertTrue(p.over(eq, en, "cur")) // final
- assertEquals(eq, p.queued); assertEquals(en, p.next) // what is drawn all along
+ val p = move()
+ assertEquals(finalQ, p.queued); assertEquals(finalN, p.next)
+ assertEquals(Keep, p.report(q0, n0, "cur", 100)) // stale
+ assertEquals(Keep, p.report(q0, listOf("n0", "n2"), "cur", 200)) // out of the list, not yet queued
+ assertEquals(Keep, p.report(q0, listOf("n0", "n2"), "cur", 300)) // the same again
+ assertEquals(Keep, p.report(q0 + "n1", listOf("n0", "n2"), "cur", 400)) // queued at the end
+ assertEquals(Match, p.report(finalQ, finalN, "cur", 500))
+ }
+
+ @Test fun aSlowFinalReportIsWaitedFor() {
+ val p = move()
+ // Reports of the old order keep coming for 9 s: the pending order is never dropped before the limit.
+ for (t in listOf(1_000L, 3_500L, 6_000L, 9_000L)) assertEquals(Keep, p.report(q0, n0, "cur", t))
+ assertEquals(null, p.expired(9_900))
+ assertEquals(Match, p.report(finalQ, finalN, "cur", 9_500))
+ // ...and a silent engine is let go only at the limit.
+ assertEquals("no final report in 10s", move().expired(10_000))
+ }
+
+ @Test fun aStaleReportAfterTheMatchIsIgnoredForAWhile() {
+ val p = move()
+ assertEquals(Match, p.report(finalQ, finalN, "cur", 500))
+ assertEquals(Keep, p.report(q0, n0, "cur", 700)) // older state, arriving late
+ assertEquals(Keep, p.report(q0, listOf("n0", "n2"), "cur", 900)) // and a step of the move
+ assertEquals(Keep, p.report(finalQ, finalN, "cur", 1_000))
+ assertEquals("settled", p.expired(500 + QueueDragMath.GRACE_MS))
+ assertEquals(QueueDragMath.Verdict.Drop("settled"), p.report(finalQ, finalN, "cur", 500 + QueueDragMath.GRACE_MS))
+ }
+
+ @Test fun anotherOrderOrSongEndsIt() {
+ assertTrue(move().report(listOf("x"), listOf("y"), "cur", 10) is QueueDragMath.Verdict.Drop)
+ assertEquals(QueueDragMath.Verdict.Drop("another song plays"), move().report(q0, n0, "other", 10))
+ val p = move(); p.report(finalQ, finalN, "cur", 10)
+ assertTrue(p.report(listOf("q0"), listOf("n0", "n2"), "cur", 20) is QueueDragMath.Verdict.Drop) // changed after the match
}
@Test fun aSameSectionMoveEndsOnItsFinalReportOnly() {
- val n0 = listOf("n0", "n1", "n2", "n3")
- val (eq, en) = QueueDragMath.apply(emptyList(), n0, "n0", QueueDragMath.Place(false, 3))
- val p = pending(eq, en)
- assertEquals(listOf("n1", "n2", "n3", "n0"), en)
- assertFalse(p.over(emptyList(), n0, "cur"))
- assertTrue(p.over(eq, en, "cur"))
+ val n = listOf("n0", "n1", "n2", "n3")
+ val p = move("n0", emptyList(), n, QueueDragMath.Place(false, 3))
+ assertEquals(listOf("n1", "n2", "n3", "n0"), p.next)
+ assertEquals(Keep, p.report(emptyList(), n, "cur", 10))
+ assertEquals(Match, p.report(emptyList(), listOf("n1", "n2", "n3", "n0"), "cur", 20))
+ }
+
+ @Test fun quickDropsChainTheirReports() {
+ val first = move()
+ // A second drag, made before anything was reported: n2 into the queue, first.
+ val second = move("n2", finalQ, finalN, QueueDragMath.Place(true, 0), at = 300, prev = first.detach())
+ assertEquals(listOf("n2", "q0", "n1", "q1"), second.queued); assertEquals(listOf("n0"), second.next)
+ assertEquals(Keep, second.report(q0, n0, "cur", 400)) // before the first
+ assertEquals(Keep, second.report(q0, listOf("n0", "n2"), "cur", 500)) // half-way through the first
+ assertEquals(Keep, second.report(finalQ, finalN, "cur", 600)) // the first done, the second not yet
+ assertEquals(Keep, second.report(finalQ, listOf("n0"), "cur", 700)) // the second half-way
+ assertEquals(Match, second.report(second.queued.map { it }, second.next, "cur", 800))
}
@Test fun anotherSongPlayingEndsThePendingOrder() {
- assertTrue(pending(listOf("a"), listOf("b")).over(listOf("x"), listOf("y"), "other"))
+ assertTrue(move().report(listOf("x"), listOf("y"), "other", 1) is QueueDragMath.Verdict.Drop)
+ }
+
+ @Test fun steppedAsideRowsAreDrawnWhereTheNewOrderLaysThemOut() {
+ // A row drawn shifted by step() rows from its slot must sit exactly at its slot in the new order:
+ // then dropping needs no row to move.
+ for (size in 2..6) for (from in 0 until size) for (slot in 0 until size) {
+ val order = (0 until size).toList()
+ val after = QueueDragMath.moved(order, from, slot)
+ for (row in order) if (row != from) {
+ assertEquals("size=$size from=$from slot=$slot row=$row", row + QueueDragMath.step(row, from, slot), after.indexOf(row))
+ }
+ assertEquals(slot, after.indexOf(from))
+ }
}
}
diff --git a/base/extensions/build.gradle.kts b/base/extensions/build.gradle.kts
index 103983c3..3ba58eea 100644
--- a/base/extensions/build.gradle.kts
+++ b/base/extensions/build.gradle.kts
@@ -16,5 +16,7 @@ dependencies {
// The same Rhino NewPipeExtractor brings to the app: no second JavaScript engine.
implementation("org.mozilla:rhino:1.8.1")
implementation(libs.serialization.json)
+ // The HTTP client of extensions: a custom Dns refuses private addresses at connect time.
+ api(libs.okhttp)
testImplementation("junit:junit:4.13.2")
}
diff --git a/base/extensions/src/main/kotlin/app/myspoti/extensions/Actions.kt b/base/extensions/src/main/kotlin/app/myspoti/extensions/Actions.kt
index 22c3022b..7fab86a0 100644
--- a/base/extensions/src/main/kotlin/app/myspoti/extensions/Actions.kt
+++ b/base/extensions/src/main/kotlin/app/myspoti/extensions/Actions.kt
@@ -52,6 +52,8 @@ enum class Action(
"myspoti.player.play/pause/next/previous/seek; spotify.player play, pause, resume, seek, next, previous, shuffle, repeat, volume, speed, skipTo; spotify.devices transfer, pullHere"),
PLAYBACK_QUEUE("playback.queue", Level.NORMAL, Area.PLAYBACK, "QueueMusic", "Edit the queue",
"spotify.player addToQueue, playNext, moveInQueue, removeFromQueue, clearQueue (removals confirmed)"),
+ PLAYBACK_MIRROR("playback.mirror", Level.CRITICAL, Area.PLAYBACK, "VolumeOff", "Mirror Spotify silently",
+ "myspoti.spotify.player.setLocalMute(on): keeps Spotify playing unheard on this phone while Myspoti's own player plays, which counts listens on your Spotify account (one extension at a time, cleared on track change, stop or when the extension goes)"),
PLAYBACK_EVENTS("playback.events", Level.NORMAL, Area.PLAYBACK, "GraphicEq", "Know what you play",
"myspoti.player.current(); myspoti.on('track' | 'playback'); spotify.player state, queue, volume"),
LYRICS_PROVIDE("lyrics.provide", Level.NORMAL, Area.LYRICS, "Lyrics", "Provide lyrics",
diff --git a/base/extensions/src/main/kotlin/app/myspoti/extensions/Conflicts.kt b/base/extensions/src/main/kotlin/app/myspoti/extensions/Conflicts.kt
index 6530143e..829f8220 100644
--- a/base/extensions/src/main/kotlin/app/myspoti/extensions/Conflicts.kt
+++ b/base/extensions/src/main/kotlin/app/myspoti/extensions/Conflicts.kt
@@ -6,13 +6,15 @@ package app.myspoti.extensions
* [Mode.ADDITIVE]: every extension's answer is used, merged and de-duplicated in the area's
* priority order (lyrics: the best one; blocks: all, quotas per extension). [Mode.EXCLUSIVE]: one
* active extension per action (the user picks; the others stay installed and idle).
- * [Mode.SHARED]: reach (network, storage…), nothing to share out.
+ * [Mode.ORDERED]: each is asked in the user's order for that action until one answers (audio and
+ * download sources: Tidal first, then Qobuz, then Spotify). [Mode.SHARED]: reach (network,
+ * storage…), nothing to share out.
*/
-enum class Mode { ADDITIVE, EXCLUSIVE, SHARED }
+enum class Mode { ADDITIVE, EXCLUSIVE, ORDERED, SHARED }
val Action.mode: Mode
get() = when (this) {
- Action.AUDIO_SOURCE, Action.DOWNLOAD_SOURCE -> Mode.EXCLUSIVE
+ Action.AUDIO_SOURCE, Action.DOWNLOAD_SOURCE -> Mode.ORDERED
Action.LYRICS_PROVIDE, Action.TRACKINFO_PROVIDE, Action.HOME_SECTIONS, Action.SEARCH_PROVIDE,
Action.MENU_ITEMS, Action.PLAYER_BUTTONS -> Mode.ADDITIVE
else -> Mode.SHARED
diff --git a/base/extensions/src/main/kotlin/app/myspoti/extensions/Discovery.kt b/base/extensions/src/main/kotlin/app/myspoti/extensions/Discovery.kt
index 69dbee3c..d3aa76ef 100644
--- a/base/extensions/src/main/kotlin/app/myspoti/extensions/Discovery.kt
+++ b/base/extensions/src/main/kotlin/app/myspoti/extensions/Discovery.kt
@@ -44,7 +44,7 @@ object Discovery {
fun releaseUrl(repo: String) = "https://api.github.com/repos/$repo/releases/latest"
@Serializable
- data class Owner(val login: String)
+ data class Owner(val login: String = "", val id: Long = 0)
/** A repository as the search answers it (the fields the store uses). */
@Serializable
@@ -60,7 +60,12 @@ object Discovery {
val archived: Boolean = false,
val topics: List<String> = emptyList(),
@kotlinx.serialization.Transient val host: CodeHost = CodeHost.GITHUB,
+ /** The host's numeric id of the repository (0: unknown); [owner]'s is its `id`. */
+ val id: Long = 0,
) {
+ /** The ids to pin, when the host gave both. */
+ val ids: RepoIds? get() = if (id > 0 && owner.id > 0) RepoIds(id.toString(), owner.id.toString()) else null
+
val repo: GitHubRepo? get() = GitHubRepo.of(host, fullName)
/** Where its manifest is read, on the default branch. */
@@ -82,13 +87,15 @@ object Discovery {
@SerialName("star_count") val stars: Int = 0,
val archived: Boolean = false,
val topics: List<String> = emptyList(),
+ val id: Long = 0,
+ val namespace: Owner? = null,
)
/** GitLab's `/api/v4/projects` answer (a JSON array). */
fun parseGitLab(text: String): List<Found> =
ExtJson.decodeFromString(kotlinx.serialization.builtins.ListSerializer(GitLabProject.serializer()), text).map {
- Found(it.path, Owner(it.path.substringBeforeLast('/')), it.description, it.webUrl, it.defaultBranch ?: GitHubRepo.HEAD,
- it.lastActivityAt, it.lastActivityAt, it.stars, it.archived, it.topics, CodeHost.GITLAB)
+ Found(it.path, Owner(it.path.substringBeforeLast('/'), it.namespace?.id ?: 0), it.description, it.webUrl, it.defaultBranch ?: GitHubRepo.HEAD,
+ it.lastActivityAt, it.lastActivityAt, it.stars, it.archived, it.topics, CodeHost.GITLAB, it.id)
}.filter { !it.archived && it.repo != null }
@Serializable
@@ -101,6 +108,8 @@ object Discovery {
@SerialName("stars_count") val stars: Int = 0,
val archived: Boolean = false,
val empty: Boolean = false,
+ val id: Long = 0,
+ val owner: Owner? = null,
)
@Serializable
@@ -109,8 +118,8 @@ object Discovery {
/** Codeberg's (Forgejo/Gitea) `/api/v1/repos/search` answer. */
fun parseCodeberg(text: String): List<Found> =
ExtJson.decodeFromString(ForgejoAnswer.serializer(), text).data.filter { !it.empty }.map {
- Found(it.fullName, Owner(it.fullName.substringBefore('/')), it.description, it.htmlUrl, it.defaultBranch ?: GitHubRepo.HEAD,
- it.updatedAt, it.updatedAt, it.stars, it.archived, emptyList(), CodeHost.CODEBERG)
+ Found(it.fullName, Owner(it.fullName.substringBefore('/'), it.owner?.id ?: 0), it.description, it.htmlUrl, it.defaultBranch ?: GitHubRepo.HEAD,
+ it.updatedAt, it.updatedAt, it.stars, it.archived, emptyList(), CodeHost.CODEBERG, it.id)
}.filter { !it.archived && it.repo != null }
/** [parseSearch], [parseGitLab] or [parseCodeberg] by [host]. */
@@ -125,6 +134,27 @@ object Discovery {
(ExtJson.parseToJsonElement(text) as kotlinx.serialization.json.JsonObject)["default_branch"]?.let { (it as? kotlinx.serialization.json.JsonPrimitive)?.content }
}.getOrNull()?.takeIf { it.isNotBlank() }
+ /** Pinning a repository: the numeric ids the host gives it, read from its API (one call at install, one per update check). */
+ fun identityUrl(repo: GitHubRepo): String = when (repo.host) {
+ CodeHost.GITHUB -> "https://api.github.com/repos/${repo.owner}/${repo.name}"
+ CodeHost.GITLAB -> "https://gitlab.com/api/v4/projects/" + java.net.URLEncoder.encode("${repo.owner}/${repo.name}", "UTF-8")
+ CodeHost.CODEBERG -> "https://codeberg.org/api/v1/repos/${repo.owner}/${repo.name}"
+ }
+
+ /**
+ * The ids out of one repository's API answer: `id` and `owner.id` (GitHub, Codeberg), `id`
+ * and `namespace.id` (GitLab: the user or group, stable when the project moves inside it);
+ * null when either is missing.
+ */
+ fun parseIdentity(host: CodeHost, text: String): RepoIds? = runCatching {
+ val o = ExtJson.parseToJsonElement(text) as kotlinx.serialization.json.JsonObject
+ fun idOf(e: kotlinx.serialization.json.JsonElement?): String? =
+ ((e as? kotlinx.serialization.json.JsonObject)?.get("id") as? kotlinx.serialization.json.JsonPrimitive)?.content?.takeIf { it.toLongOrNull()?.let { n -> n > 0 } == true }
+ val repo = (o["id"] as? kotlinx.serialization.json.JsonPrimitive)?.content?.takeIf { it.toLongOrNull()?.let { n -> n > 0 } == true }
+ val owner = if (host == CodeHost.GITLAB) idOf(o["namespace"]) else idOf(o["owner"])
+ if (repo != null && owner != null) RepoIds(repo, owner) else null
+ }.getOrNull()
+
/**
* The store entry of a discovered repository, from its [manifest]: installed from GitHub
* ([Catalog.Entry.repo]), its package built when the user taps Install. No sha256: GitHub
@@ -189,6 +219,10 @@ object Discovery {
}
}
+/** A repository's and its owner's numeric ids on its host (kept as text). */
+@Serializable
+data class RepoIds(val repo: String, val owner: String)
+
/** 👍 and 👎 on an extension's ratings issue ([issue] in its repository). */
@Serializable
data class Rating(val up: Int = 0, val down: Int = 0, val issue: Int = 0) {
diff --git a/base/extensions/src/main/kotlin/app/myspoti/extensions/ExtensionRuntime.kt b/base/extensions/src/main/kotlin/app/myspoti/extensions/ExtensionRuntime.kt
index de9f1517..41c0c17d 100644
--- a/base/extensions/src/main/kotlin/app/myspoti/extensions/ExtensionRuntime.kt
+++ b/base/extensions/src/main/kotlin/app/myspoti/extensions/ExtensionRuntime.kt
@@ -34,6 +34,12 @@ open class ExtensionException(message: String, cause: Throwable? = null) : Excep
/** The script ran past its time limit (a slow phone, a cold start), as opposed to an error of its own. */
class ExtensionTimeout(message: String, cause: Throwable? = null) : ExtensionException(message, cause)
+/**
+ * The script took the sandbox down (out of memory, a stack overflow, any other Error): the app
+ * turns the extension off with this reason and keeps running. Not a failure to retry.
+ */
+class ExtensionFault(message: String, cause: Throwable? = null) : ExtensionException(message, cause)
+
/** The call never started: the extension was still busy with earlier ones. Not the extension's fault. */
class ExtensionBusy(message: String) : ExtensionException(message)
@@ -89,6 +95,7 @@ class ExtensionRuntime(
@Volatile private var deadline = Long.MAX_VALUE
private val requestTimes = ArrayDeque<Long>()
private val spotifyTimes = ArrayDeque<Long>()
+ private val notifyTimes = ArrayDeque<Long>()
/** Time spent waiting for the user in the run on the thread now: it is not the script's time. */
@Volatile private var activePause: Pause? = null
@@ -122,9 +129,49 @@ class ExtensionRuntime(
* nothing while a protected surface is on screen.
*/
fun call(hook: Hook, inputJson: String, timeoutMs: Long): String? {
+ faulted?.let { throw ExtensionFault("turned off: $it") }
if (!provides(hook)) return null
if (hook.drawn && guard.suspended) return null
- return run(timeoutMs) { cx -> dispatch(cx, "hook", hook.key, inputJson) }
+ val out = run(timeoutMs) { cx -> dispatch(cx, "hook", hook.key, inputJson) }
+ if (out != null) checkMedia(hook, out)
+ return out
+ }
+
+ /** Set when the script crashed the sandbox ([ExtensionFault]): every later call is refused. */
+ @Volatile var faulted: String? = null
+ private set
+
+ /**
+ * The addresses a hook answers with must name hosts the extension declared: its `network`
+ * hosts and its `media` hosts (audio and download addresses of an extension without `media`
+ * keep the older rule: any public host). Images of blocks are always held to the list.
+ */
+ private fun checkMedia(hook: Hook, json: String) {
+ val images = hook.action in Action.BLOCKS
+ val sources = hook == Hook.AUDIO_SOURCE || hook == Hook.DOWNLOAD_SOURCE
+ if (!images && !sources) return
+ if (sources && manifest.media == null) return
+ val tree = runCatching { ExtJson.parseToJsonElement(json) }.getOrNull() ?: return
+ val allowed = manifest.hosts() + manifest.mediaHosts().orEmpty()
+ val any = Action.NETWORK_ANY in granted && "*" in manifest.hosts() && Action.NETWORK in declared
+ fun verify(url: String) {
+ val h = runCatching { URI(url).host?.lowercase() }.getOrNull() ?: return
+ if (any || allowed.any { it != "*" && hostMatches(it, h) }) return
+ fail("${hook.key}: $h is not one of the hosts this extension declared (network hosts, or media.hosts in the manifest)", null)
+ }
+ fun walk(e: kotlinx.serialization.json.JsonElement, key: String?) {
+ when (e) {
+ is JsonObject -> e.forEach { (k, v) -> if (k != "headers") walk(v, k) }
+ is JsonArray -> e.forEach { walk(it, key) }
+ is JsonPrimitive -> if (e.isString) when {
+ key == "url" || key == "image" -> if (e.content.startsWith("http", ignoreCase = true)) verify(e.content)
+ key == "manifest" && sources -> runCatching { String(java.util.Base64.getMimeDecoder().decode(e.content)) }.getOrNull()
+ ?.takeIf { it.contains("<MPD") }
+ ?.let { mpd -> Regex("(?:initialization|media)=\"([^\"]+)\"").findAll(mpd).forEach { verify(it.groupValues[1].replace("&amp;", "&")) } }
+ }
+ }
+ }
+ walk(tree, null)
}
private val listening: MutableSet<String> = java.util.concurrent.ConcurrentHashMap.newKeySet()
@@ -138,6 +185,7 @@ class ExtensionRuntime(
* script's failure, nothing logged and no [lastError].
*/
fun emit(event: String, inputJson: String, timeoutMs: Long = 3_000) {
+ if (faulted != null) return
if (EVENTS[event]?.let(::has) != true) return
runCatching { run(timeoutMs, quietWhileQueued = true) { cx -> dispatch(cx, "event", event, inputJson) } }
}
@@ -169,6 +217,18 @@ class ExtensionRuntime(
deadline = System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(timeoutMs)
try {
FACTORY.call { cx -> block(cx) }
+ } catch (e: TimeLimit) {
+ throw e
+ } catch (e: Error) {
+ // Out of memory, a stack overflow in the engine, anything else: the extension is
+ // put out of service, the app goes on.
+ throw ExtensionFault(
+ when (e) {
+ is OutOfMemoryError -> "ran out of memory"
+ is StackOverflowError -> "overflowed the stack"
+ else -> "crashed the sandbox (${e.javaClass.simpleName})"
+ }, e,
+ )
} finally {
deadline = Long.MAX_VALUE
activePause = null
@@ -200,6 +260,10 @@ class ExtensionRuntime(
val c = e.cause
when (c) {
is TimeLimit -> fail("took longer than $timeoutMs ms", c, timeout = true)
+ is ExtensionFault -> {
+ faulted = c.message
+ fail(c.message ?: "crashed", c, fault = true)
+ }
is RhinoException -> fail("${c.details()} (${c.sourceName()}:${c.lineNumber()})", c)
is ExtensionException -> fail(c.message ?: "failed", c)
else -> fail(c?.toString() ?: "failed", c)
@@ -216,11 +280,11 @@ class ExtensionRuntime(
}
}
- private fun fail(message: String, cause: Throwable?, timeout: Boolean = false): Nothing {
+ private fun fail(message: String, cause: Throwable?, timeout: Boolean = false, fault: Boolean = false): Nothing {
if (closed) throw ExtensionException("stopped", cause)
lastError = message
- host.log(id, "failed: $message")
- throw if (timeout) ExtensionTimeout(message, cause) else ExtensionException(message, cause)
+ host.log(id, if (fault) "turned off: $message" else "failed: $message")
+ throw if (fault) ExtensionFault(message, cause) else if (timeout) ExtensionTimeout(message, cause) else ExtensionException(message, cause)
}
// ── What the script can ask of the app ──
@@ -231,7 +295,7 @@ class ExtensionRuntime(
ScriptableObject.putProperty(o, name, LambdaFunction(s, name, length) { _, _, _, args -> fn(args) ?: Undefined.instance })
fun str(args: Array<Any?>, i: Int): String = args.getOrNull(i)?.takeUnless { it is Undefined }?.let { Context.toString(it) }.orEmpty()
- def("info", 0) { ExtJson.encodeToString(Info.serializer(), Info(manifest.id, manifest.name, manifest.version)) }
+ def("info", 0) { ExtJson.encodeToString(Info.serializer(), Info(manifest.id, manifest.name, manifest.version, has(Action.PLAYBACK_MIRROR))) }
def("mayProvide", 1) { a ->
val key = str(a, 0)
val hook = Hook.of(key) ?: throw error("unknown hook \"$key\" (known: ${Hook.entries.joinToString { it.key }})")
@@ -275,7 +339,12 @@ class ExtensionRuntime(
val arg = (a.getOrNull(1) as? Number)?.toLong()?.takeIf { it >= 0 }
host.control(id, action, arg)
}
- def("notify", 1) { a -> need(Action.NOTIFY); host.notify(id, str(a, 0).take(200)); null }
+ def("notify", 1) { a ->
+ need(Action.NOTIFY)
+ // A few messages an hour: a toast is not a channel to nag the user with.
+ if (!allowRequest(notifyTimes, MAX_NOTIFY_PER_HOUR, 3_600_000L)) throw error("notify: at most $MAX_NOTIFY_PER_HOUR messages an hour")
+ host.notify(id, str(a, 0).take(200)); null
+ }
def("refresh", 1) { a ->
val surface = Surface.entries.firstOrNull { it.key == str(a, 0) || it.key.substringBefore('.') == str(a, 0) }
?: throw error("ui.refresh: unknown place \"${str(a, 0)}\" (${Surface.entries.joinToString { it.key.substringBefore('.') }.split(", ").distinct().joinToString()})")
@@ -381,10 +450,10 @@ class ExtensionRuntime(
}
/** Counts one more call in [times], or false when [max] were made in the last minute. */
- private fun allowRequest(times: ArrayDeque<Long> = requestTimes, max: Int = limits.requestsPerMinute): Boolean {
+ private fun allowRequest(times: ArrayDeque<Long> = requestTimes, max: Int = limits.requestsPerMinute, windowMs: Long = 60_000): Boolean {
val now = System.currentTimeMillis()
synchronized(times) {
- while (times.isNotEmpty() && now - times.first() > 60_000) times.removeFirst()
+ while (times.isNotEmpty() && now - times.first() > windowMs) times.removeFirst()
if (times.size >= max) return false
times.addLast(now)
return true
@@ -438,9 +507,12 @@ class ExtensionRuntime(
if (method.key != RAW_REQUEST) return confirm(text)
val verb = RawRequest.check(args.str(0, "method"), args.str(1, "url"))
val url = args.str(1, "url")
- if (RawRequest.covered(host.rawGrants(id), verb, url)) return true
- val offer = RawRequest.offer(verb, url)
- return paused { host.confirmWrite(id, text, offer) }.let { it == Consent.ONCE || it == Consent.ALWAYS }
+ val body = RawRequest.bodyText(args)
+ if (RawRequest.covered(host.rawGrants(id), verb, url, body)) return true
+ // Real operation shown; "always" only per distinct operation (none determinable: asked each time).
+ val shown = RawRequest.operationOf(body)?.let { "$text\nOperation: $it" } ?: text
+ val offer = RawRequest.offerFor(verb, url, body) ?: return confirm(shown)
+ return paused { host.confirmWrite(id, shown, offer) }.let { it == Consent.ONCE || it == Consent.ALWAYS }
}
/** Asks the user through the host; the wait is not the script's time. */
@@ -490,7 +562,7 @@ class ExtensionRuntime(
}
@kotlinx.serialization.Serializable
- private data class Info(val id: String, val name: String, val version: String)
+ private data class Info(val id: String, val name: String, val version: String, val mirror: Boolean = false)
/** Thrown inside the script's thread when its time is up; not catchable by the script. */
private class TimeLimit : Error("time limit")
@@ -519,6 +591,7 @@ class ExtensionRuntime(
private val METHOD_NAMES = MapSerializer(String.serializer(), ListSerializer(String.serializer()))
private const val MAX_SPOTIFY_ARGS = 256 * 1024
private const val MAX_PAGE_MESSAGE = 64 * 1024
+ const val MAX_NOTIFY_PER_HOUR = 5
/** `http.all`: the most requests sent together. */
const val MAX_PARALLEL = 4
private val CONTROLS = setOf("play", "pause", "next", "previous", "seek")
@@ -555,15 +628,8 @@ class ExtensionRuntime(
else -> host == pattern
}
- internal fun isPrivate(host: String): Boolean {
- if (host == "localhost" || host.endsWith(".localhost") || host.endsWith(".local")) return true
- val v4 = host.split('.').mapNotNull { it.toIntOrNull() }.takeIf { it.size == 4 && host.count { c -> c == '.' } == 3 }
- if (v4 != null) {
- val (a, b) = v4
- return a == 10 || a == 127 || a == 0 || (a == 172 && b in 16..31) || (a == 192 && b == 168) || (a == 169 && b == 254)
- }
- return host.startsWith("[") || host.contains(':')
- }
+ /** Whether [host] is a local address in any spelling (see [SafeNet]); the real check is made again when connecting. */
+ internal fun isPrivate(host: String): Boolean = SafeNet.isPrivateHost(host)
}
init {
diff --git a/base/extensions/src/main/kotlin/app/myspoti/extensions/Hooks.kt b/base/extensions/src/main/kotlin/app/myspoti/extensions/Hooks.kt
index aa74cc22..52417869 100644
--- a/base/extensions/src/main/kotlin/app/myspoti/extensions/Hooks.kt
+++ b/base/extensions/src/main/kotlin/app/myspoti/extensions/Hooks.kt
@@ -164,11 +164,14 @@ internal fun checkUrl(hook: String, url: String) {
if (ExtensionRuntime.isPrivate(host)) throw ExtensionException("$hook: $host is a local address")
}
-/** At most 20 headers, without the ones the app sets itself. */
+/** Headers an extension may not set on a media request (the app or the transport sets them). */
+private val MEDIA_FORBIDDEN_HEADERS = setOf("host", "content-length", "connection", "cookie", "set-cookie", "transfer-encoding", "proxy-authorization", "upgrade", "x-forwarded-for")
+
+/** At most 20 headers, without the ones the app sets itself, values of at most 2000 characters on one line. */
internal fun headersOf(e: kotlinx.serialization.json.JsonElement?): Map<String, String> =
(e as? JsonObject)?.entries?.take(20)?.associate { (k, v) ->
k to ((v as? JsonPrimitive)?.contentOrNull ?: v.toString())
- }?.filterKeys { it.lowercase() !in setOf("host", "content-length", "connection", "cookie") }.orEmpty()
+ }?.filter { (k, v) -> k.lowercase() !in MEDIA_FORBIDDEN_HEADERS && k.length <= 64 && v.length <= 2_000 && k.none { it.isISOControl() || it == ':' } && v.none { it == '\r' || it == '\n' } }.orEmpty()
/**
* What a `download-source` extension is asked: the song, and the quality the user wants
diff --git a/base/extensions/src/main/kotlin/app/myspoti/extensions/Host.kt b/base/extensions/src/main/kotlin/app/myspoti/extensions/Host.kt
index 3f3a60e5..69ed59f3 100644
--- a/base/extensions/src/main/kotlin/app/myspoti/extensions/Host.kt
+++ b/base/extensions/src/main/kotlin/app/myspoti/extensions/Host.kt
@@ -2,8 +2,11 @@ package app.myspoti.extensions
import kotlinx.serialization.Serializable
import java.io.ByteArrayOutputStream
-import java.net.HttpURLConnection
+import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
+import okhttp3.MediaType.Companion.toMediaTypeOrNull
+import okhttp3.RequestBody.Companion.toRequestBody
import java.net.URI
+import java.util.concurrent.TimeUnit
/**
* What the app gives the sandbox. Every call arrives here already checked against the rights the
@@ -152,42 +155,54 @@ data class HttpRequest(
@Serializable
data class HttpResponse(val status: Int, val headers: Map<String, String>, val body: String)
-/** Plain HTTP for extensions: no cookies, no cache, a size cap, redirects only to https. */
+/**
+ * Plain HTTP for extensions (OkHttp): no cookies, no cache, no redirect followed (the script sees
+ * the 3xx), a size cap, and never a connection to a local address: the names are resolved and
+ * checked by [SafeNet.SafeDns] when the connection is made, IP literals by an interceptor.
+ */
object BasicHttp {
const val MAX_BODY = 5 * 1024 * 1024
private val METHODS = setOf("GET", "POST", "PUT", "PATCH", "DELETE", "HEAD")
/** Set by the transport itself: an extension cannot pretend to be another client this way. */
- private val FORBIDDEN_HEADERS = setOf("host", "content-length", "connection", "cookie", "transfer-encoding")
+ private val FORBIDDEN_HEADERS = setOf("host", "content-length", "connection", "cookie", "transfer-encoding", "proxy-authorization", "upgrade")
- fun send(request: HttpRequest, userAgent: String): HttpResponse {
+ fun send(request: HttpRequest, userAgent: String, client: okhttp3.OkHttpClient = SafeNet.client): HttpResponse {
val method = request.method.uppercase()
require(method in METHODS) { "method $method is not allowed" }
- val c = URI(request.url).toURL().openConnection() as HttpURLConnection
- c.instanceFollowRedirects = false
- c.useCaches = false
- c.connectTimeout = request.timeout.coerceIn(1_000, 20_000)
- c.readTimeout = request.timeout.coerceIn(1_000, 20_000)
- c.requestMethod = method
- c.setRequestProperty("User-Agent", userAgent)
- request.headers.forEach { (k, v) -> if (k.lowercase() !in FORBIDDEN_HEADERS) c.setRequestProperty(k, v) }
- if (request.body != null && method != "GET" && method != "HEAD") {
- c.doOutput = true
- c.outputStream.use { it.write(request.body.toByteArray()) }
+ val url = request.url.toHttpUrlOrNull() ?: throw IllegalArgumentException("not a URL: ${request.url}")
+ SafeNet.checkUrlHost(url.host)
+ val timeout = request.timeout.coerceIn(1_000, 20_000).toLong()
+ val headers = okhttp3.Headers.Builder().add("User-Agent", userAgent)
+ var contentType: String? = null
+ request.headers.forEach { (k, v) ->
+ if (k.lowercase() in FORBIDDEN_HEADERS) return@forEach
+ if (k.equals("User-Agent", true)) return@forEach
+ if (k.equals("Content-Type", true)) contentType = v
+ headers.set(k, v)
+ }
+ val body = when {
+ method == "GET" || method == "HEAD" -> null
+ request.body != null -> request.body.toByteArray().toRequestBody((contentType ?: "application/x-www-form-urlencoded").toMediaTypeOrNull())
+ method == "DELETE" -> null
+ else -> ByteArray(0).toRequestBody(null)
}
- val status = c.responseCode
- val stream = if (status >= 400) c.errorStream else runCatching { c.inputStream }.getOrNull()
- val out = ByteArrayOutputStream()
- stream?.use { s ->
- val buf = ByteArray(16 * 1024)
- while (true) {
- val n = s.read(buf)
- if (n < 0) break
- out.write(buf, 0, n)
- if (out.size() > MAX_BODY) throw IllegalStateException("response larger than ${MAX_BODY / 1024 / 1024} MB")
+ val call = client.newBuilder()
+ .connectTimeout(timeout, TimeUnit.MILLISECONDS).readTimeout(timeout, TimeUnit.MILLISECONDS).callTimeout(timeout * 2, TimeUnit.MILLISECONDS)
+ .build()
+ .newCall(okhttp3.Request.Builder().url(url).headers(headers.build()).method(method, body).build())
+ call.execute().use { r ->
+ val out = ByteArrayOutputStream()
+ r.body.source().let { src ->
+ val buf = ByteArray(16 * 1024)
+ while (true) {
+ val n = src.read(buf)
+ if (n < 0) break
+ out.write(buf, 0, n)
+ if (out.size() > MAX_BODY) throw IllegalStateException("response larger than ${MAX_BODY / 1024 / 1024} MB")
+ }
}
+ val responseHeaders = r.headers.names().associate { it.lowercase() to r.headers.values(it).joinToString(", ") }
+ return HttpResponse(r.code, responseHeaders, out.toString(Charsets.UTF_8))
}
- val headers = c.headerFields.filterKeys { it != null }.mapKeys { it.key.lowercase() }.mapValues { it.value.joinToString(", ") }
- c.disconnect()
- return HttpResponse(status, headers, out.toString(Charsets.UTF_8))
}
}
diff --git a/base/extensions/src/main/kotlin/app/myspoti/extensions/Manifest.kt b/base/extensions/src/main/kotlin/app/myspoti/extensions/Manifest.kt
index f400cb24..a4c93b8b 100644
--- a/base/extensions/src/main/kotlin/app/myspoti/extensions/Manifest.kt
+++ b/base/extensions/src/main/kotlin/app/myspoti/extensions/Manifest.kt
@@ -34,6 +34,12 @@ data class Manifest(
* `[{ "name": "lyrics.provide", "why": "Synced lyrics from LRCLIB" }, { "name": "network", "hosts": ["lrclib.net"], "why": "…" }]`.
*/
val actions: List<ActionRequest> = emptyList(),
+ /**
+ * `media`: the hosts its audio and download addresses (and block images) may point at, apart
+ * from its `network` hosts: `{ "hosts": ["*.audio.example.com"] }`. Shown in the install prompt.
+ * Absent (an older extension): audio and download addresses may name any public host, as before.
+ */
+ val media: Media? = null,
/** Old format (before [actions]): the hooks it takes over. Still read, mapped to actions. */
val provides: List<String> = emptyList(),
/** Old format: what it reaches. Still read, mapped to actions. */
@@ -98,6 +104,9 @@ data class Manifest(
.mapNotNull { w -> runCatching { w.trim().split(Regex("\\s+"), 2).let { (m, u) -> RawRequest.offer(RawRequest.check(m, u), u) } }.getOrNull() }
.distinct()
+ /** The hosts `media` lists, or null when the manifest has no `media` (an older one: see [media]). */
+ fun mediaHosts(): List<String>? = media?.hosts
+
/** The hosts `network` lists. */
fun hosts(): List<String> = declared().firstOrNull { it.name == Action.NETWORK.key }?.hosts.orEmpty()
@@ -105,7 +114,7 @@ data class Manifest(
fun asks(): List<Ask> = declared().mapNotNull { r ->
val a = Action.of(r.name) ?: return@mapNotNull null
if (a == Action.NETWORK && r.hosts.any { it == "*" }) Ask(Action.NETWORK_ANY, Level.CRITICAL, r.why, r.hosts, a)
- else Ask(a.key, a.level, r.why, r.hosts + if (a == Action.SPOTIFY_RAW) declaredWrites().map { it.toString() } else emptyList(), a)
+ else Ask(a.key, a.level, r.why, r.hosts + (if (a == Action.AUDIO_SOURCE || a == Action.DOWNLOAD_SOURCE) media?.hosts.orEmpty() else emptyList()) + if (a == Action.SPOTIFY_RAW) declaredWrites().map { it.toString() } else emptyList(), a)
}
/** True when the user is shown the warning and has to tick that they accept the risk. */
@@ -180,6 +189,10 @@ data class Manifest(
}
}
}
+ media?.let { m ->
+ if (m.hosts.size > 20) add("media: 20 hosts at most")
+ m.hosts.filter { it == "*" || !HOST.matches(it) }.forEach { add("media host \"$it\": a host name or *.domain (not *)") }
+ }
if (actions.size != actions.map { it.name }.toSet().size) add("actions: an action listed twice")
if (settings.isNotEmpty() && actions.none { it.name == Action.SETTINGS_PAGE.key }) add("settings: add the settings.page action (with its why) to have a settings page")
}
@@ -236,6 +249,10 @@ data class Manifest(
@Serializable
data class Welcome(val message: String = "", val steps: List<String> = emptyList())
+/** `media`: where audio, downloads and block images may come from, besides the `network` hosts. */
+@Serializable
+data class Media(val hosts: List<String> = emptyList())
+
@Serializable
data class PermissionRequest(
/** A [Permission] key, or a [Hook] key to give the reason for a takeover. */
diff --git a/base/extensions/src/main/kotlin/app/myspoti/extensions/Mirror.kt b/base/extensions/src/main/kotlin/app/myspoti/extensions/Mirror.kt
new file mode 100644
index 00000000..68c85744
--- /dev/null
+++ b/base/extensions/src/main/kotlin/app/myspoti/extensions/Mirror.kt
@@ -0,0 +1,76 @@
+package app.myspoti.extensions
+
+/**
+ * The host's rules for `player.setLocalMute` ([Action.PLAYBACK_MIRROR]), kept apart from the
+ * script: it may keep Spotify playing unheard only while Myspoti's own local / extension player
+ * plays a track, for one extension at a time, and the mute ends by itself (track change, local
+ * stop or pause, extension off, local track's duration). Pure logic: the app feeds it the local
+ * player's state and clears the page's mute when it says so.
+ */
+class MirrorGuard(private val clock: () -> Long = System::currentTimeMillis) {
+ /** Who mutes now, for which local track, until when. */
+ data class Active(val extensionId: String, val trackUri: String, val untilMs: Long)
+
+ @Volatile var active: Active? = null
+ private set
+
+ private val lastEnable = HashMap<String, Long>()
+
+ /**
+ * The extension [id] asks to mute. Null: allowed (now active). Otherwise the reason it is
+ * refused. [localPlaying]: the local player plays now; [trackUri]: its track; [durationMs]: its length.
+ */
+ @Synchronized
+ fun enable(id: String, localPlaying: Boolean, trackUri: String?, durationMs: Long): String? {
+ val now = clock()
+ if (!localPlaying || trackUri.isNullOrBlank()) return "setLocalMute: Myspoti's own player is not playing"
+ active?.let { if (it.extensionId != id && now < it.untilMs) return "setLocalMute: another extension (${it.extensionId}) is mirroring" }
+ val last = lastEnable[id]
+ if (last != null && now - last < MIN_INTERVAL_MS) return "setLocalMute: too often (once per ${MIN_INTERVAL_MS / 1000} s)"
+ lastEnable[id] = now
+ val length = if (durationMs > 0) durationMs + SLACK_MS else MAX_UNKNOWN_MS
+ active = Active(id, trackUri, now + length)
+ return null
+ }
+
+ /** [id] turns its mute off: true when it was the one muting (the page is to be unmuted). */
+ @Synchronized
+ fun disable(id: String): Boolean {
+ if (active?.extensionId != id) return false
+ active = null
+ return true
+ }
+
+ /**
+ * The local player's state changed (or a timer fired). The reason to clear the mute, or null
+ * when it may stay. Clears [active] when it answers a reason.
+ */
+ @Synchronized
+ fun check(localPlaying: Boolean, trackUri: String?): String? {
+ val a = active ?: return null
+ val why = when {
+ !localPlaying -> "the local player stopped or paused"
+ trackUri != a.trackUri -> "the track changed"
+ clock() >= a.untilMs -> "the track's duration ended"
+ else -> return null
+ }
+ active = null
+ return why
+ }
+
+ /** The extension is off, uninstalled, blocked or crashed. Returns whether it was muting. */
+ @Synchronized
+ fun extensionGone(id: String): Boolean {
+ lastEnable.remove(id)
+ return disable(id)
+ }
+
+ /** Milliseconds until the mute expires, or null when none is active. */
+ fun remainingMs(): Long? = active?.let { (it.untilMs - clock()).coerceAtLeast(0) }
+
+ companion object {
+ const val MIN_INTERVAL_MS = 20_000L
+ const val SLACK_MS = 5_000L
+ const val MAX_UNKNOWN_MS = 10 * 60_000L
+ }
+}
diff --git a/base/extensions/src/main/kotlin/app/myspoti/extensions/SafeNet.kt b/base/extensions/src/main/kotlin/app/myspoti/extensions/SafeNet.kt
new file mode 100644
index 00000000..28c15718
--- /dev/null
+++ b/base/extensions/src/main/kotlin/app/myspoti/extensions/SafeNet.kt
@@ -0,0 +1,129 @@
+package app.myspoti.extensions
+
+import okhttp3.Dns
+import okhttp3.OkHttpClient
+import java.net.Inet4Address
+import java.net.Inet6Address
+import java.net.InetAddress
+import java.net.UnknownHostException
+import java.util.concurrent.TimeUnit
+
+/**
+ * Network safety for everything an extension makes the app fetch: a host is refused when it is, or
+ * resolves to, a local address (loopback, link-local, private ranges, CGNAT, unique-local IPv6,
+ * IPv4 written in decimal, hex, octal or short forms, IPv4 inside IPv6). The check on the name is
+ * only a first filter: the real one is [SafeDns], made on the addresses the connection will use.
+ */
+object SafeNet {
+ /** Whether [host] (a name, or an IP literal in any form) is a local address. */
+ fun isPrivateHost(host: String): Boolean {
+ val h = host.trim().trimEnd('.').lowercase()
+ if (h.isEmpty()) return true
+ if (h == "localhost" || h.endsWith(".localhost") || h.endsWith(".local") || h.endsWith(".internal") || h.endsWith(".lan") || h.endsWith(".home.arpa")) return true
+ literal(h)?.let { return isPrivateAddress(it) ?: true }
+ return false
+ }
+
+ /** The address [host] spells out as an IP literal (IPv6 with or without brackets; IPv4 in any form `inet_aton` reads), or null for a name. */
+ fun literal(host: String): ByteArray? {
+ val h = host.removePrefix("[").removeSuffix("]")
+ if (h.contains(':')) return v6(h.substringBefore('%'))
+ return v4(h)
+ }
+
+ private fun v4(h: String): ByteArray? {
+ val parts = h.split('.')
+ if (parts.size !in 1..4 || parts.any { it.isEmpty() }) return null
+ val nums = parts.map { p ->
+ val n = when {
+ p.startsWith("0x") || p.startsWith("0X") -> p.substring(2).takeIf { it.isNotEmpty() && it.all { c -> c.isDigit() || c.lowercaseChar() in 'a'..'f' } }?.toLongOrNull(16)
+ p.length > 1 && p.startsWith("0") -> p.takeIf { it.all { c -> c in '0'..'7' } }?.toLongOrNull(8)
+ else -> p.takeIf { it.all { c -> c.isDigit() } }?.toLongOrNull()
+ } ?: return null
+ if (n < 0) return null
+ n
+ }
+ // inet_aton: the last part fills the remaining bytes.
+ val last = nums.last()
+ val limit = 1L shl (8 * (5 - nums.size))
+ if (last >= limit) return null
+ if (nums.dropLast(1).any { it > 255 }) return null
+ var value = last
+ nums.dropLast(1).forEachIndexed { i, n -> value += n shl (8 * (3 - i)) }
+ return ByteArray(4) { i -> (value shr (8 * (3 - i))).toByte() }
+ }
+
+ private fun v6(h: String): ByteArray? = try {
+ // A literal with a colon is never resolved by name.
+ InetAddress.getByName(h).address.let { b ->
+ // Java folds ::ffff:a.b.c.d into 4 bytes; keep it, the IPv4 rules apply.
+ b
+ }
+ } catch (_: Exception) { null }
+
+ /** Whether the raw [address] (4 or 16 bytes) is local; null when it is not an address. */
+ fun isPrivateAddress(address: ByteArray): Boolean? {
+ fun u(i: Int) = address[i].toInt() and 0xff
+ if (address.size == 4) {
+ val a = u(0); val b = u(1)
+ return a == 0 || a == 10 || a == 127 || a >= 224 ||
+ (a == 100 && b in 64..127) || (a == 169 && b == 254) || (a == 172 && b in 16..31) ||
+ (a == 192 && b == 168) || (a == 192 && b == 0 && u(2) == 0) || (a == 198 && b in 18..19)
+ }
+ if (address.size != 16) return null
+ if ((0..9).all { address[it].toInt() == 0 }) {
+ // ::, ::1, ::a.b.c.d (compatible) and ::ffff:a.b.c.d (mapped)
+ val mapped = u(10) == 0xff && u(11) == 0xff
+ val compat = u(10) == 0 && u(11) == 0
+ if (mapped || compat) return isPrivateAddress(address.copyOfRange(12, 16))
+ }
+ val first = (u(0) shl 8) or u(1)
+ // NAT64 (64:ff9b::/96) and 6to4 (2002::/16) carry an IPv4 address.
+ if (first == 0x0064 && u(2) == 0xff && u(3) == 0x9b) return isPrivateAddress(address.copyOfRange(12, 16))
+ if (first == 0x2002) return isPrivateAddress(address.copyOfRange(2, 6))
+ return (first and 0xfe00) == 0xfc00 || // fc00::/7
+ (first and 0xffc0) == 0xfe80 || // fe80::/10
+ (first and 0xffc0) == 0xfec0 || // fec0::/10 (site-local, deprecated)
+ (first and 0xff00) == 0xff00 || // multicast
+ first == 0x0100 && (0..5).all { address[2 + it].toInt() == 0 } // 100::/64 discard
+ }
+
+ /** Resolves names and refuses the whole answer when any address is local (no mix to pick from). */
+ object SafeDns : Dns {
+ override fun lookup(hostname: String): List<InetAddress> {
+ if (isPrivateHost(hostname)) throw UnknownHostException("$hostname is a local address")
+ val all = Dns.SYSTEM.lookup(hostname)
+ for (a in all) {
+ if (a is Inet4Address || a is Inet6Address) {
+ if (isPrivateAddress(a.address) != false) throw UnknownHostException("$hostname resolves to a local address")
+ }
+ }
+ return all
+ }
+ }
+
+ /**
+ * An OkHttp client that never connects to a local address, follows no redirect (the caller
+ * decides, and checks the next address with [checkUrlHost]), keeps no cookie and no cache.
+ * Literal IP addresses skip the [Dns] in OkHttp: the interceptor checks them.
+ */
+ val client: OkHttpClient by lazy {
+ OkHttpClient.Builder()
+ .dns(SafeDns)
+ .followRedirects(false)
+ .followSslRedirects(false)
+ .retryOnConnectionFailure(false)
+ .addInterceptor { chain ->
+ checkUrlHost(chain.request().url.host)
+ chain.proceed(chain.request())
+ }
+ .connectTimeout(15, TimeUnit.SECONDS)
+ .readTimeout(15, TimeUnit.SECONDS)
+ .build()
+ }
+
+ /** Throws when [host] is a local address (the name, or an IP literal). */
+ fun checkUrlHost(host: String) {
+ if (isPrivateHost(host)) throw java.io.IOException("$host is a local address")
+ }
+}
diff --git a/base/extensions/src/main/kotlin/app/myspoti/extensions/Sources.kt b/base/extensions/src/main/kotlin/app/myspoti/extensions/Sources.kt
index 56803794..bf9cab28 100644
--- a/base/extensions/src/main/kotlin/app/myspoti/extensions/Sources.kt
+++ b/base/extensions/src/main/kotlin/app/myspoti/extensions/Sources.kt
@@ -111,6 +111,9 @@ data class Origin(
val tag: Boolean = false,
val commit: String? = null,
val asset: Boolean = false,
+ /** The host's numeric ids of the repository and its owner, pinned when installed (null: not read yet). */
+ val repoId: String? = null,
+ val ownerId: String? = null,
) {
fun gitHub(): GitHubRepo? = GitHubRepo.parse(repo)
diff --git a/base/extensions/src/main/kotlin/app/myspoti/extensions/SpotifyMethods.kt b/base/extensions/src/main/kotlin/app/myspoti/extensions/SpotifyMethods.kt
index 8a8ea1d0..effe7059 100644
--- a/base/extensions/src/main/kotlin/app/myspoti/extensions/SpotifyMethods.kt
+++ b/base/extensions/src/main/kotlin/app/myspoti/extensions/SpotifyMethods.kt
@@ -83,6 +83,57 @@ object RawRequest {
fun isSpotifyHost(host: String): Boolean =
host == "spotify.com" || host.endsWith(".spotify.com") || host == "spotifycdn.com" || host.endsWith(".spotifycdn.com")
+ /**
+ * The operation a request body names, for endpoints that multiplex many operations on one
+ * path (GraphQL): `operationName`, else the persisted query's hash (`sha256:...`). A JSON
+ * list (a batch) gives all of them joined by ",". Null when none can be determined.
+ */
+ fun operationOf(body: String?): String? {
+ if (body.isNullOrBlank()) return null
+ val root = runCatching { kotlinx.serialization.json.Json.parseToJsonElement(body) }.getOrNull() ?: return null
+ fun one(e: JsonElement): String? {
+ val o = e as? JsonObject ?: return null
+ (o["operationName"] as? JsonPrimitive)?.takeIf { it.isString }?.content?.trim()?.takeIf { it.isNotEmpty() }?.let { return it.take(120) }
+ val hash = (((o["extensions"] as? JsonObject)?.get("persistedQuery") as? JsonObject)?.get("sha256Hash") as? JsonPrimitive)
+ ?.takeIf { it.isString }?.content?.trim()?.takeIf { it.isNotEmpty() }
+ return hash?.let { "sha256:" + it.take(64) }
+ }
+ if (root is JsonArray) {
+ if (root.isEmpty() || root.size > 16) return null
+ val ops = root.map { one(it) ?: return null }
+ return ops.distinct().sorted().joinToString(",")
+ }
+ return one(root)
+ }
+
+ /** Whether the path itself is a multiplexed endpoint (GraphQL / pathfinder / generic query). */
+ fun isMultiplexedPath(path: String): Boolean {
+ val p = path.lowercase()
+ return "pathfinder" in p || "graphql" in p || p.trimEnd('/').endsWith("/query")
+ }
+
+ /** The text of a request's body argument, as [bytes] decodes it; null without one. */
+ fun bodyText(a: SpotifyArgs): String? {
+ val e = if (a.size > 2) a.json(2, "body").takeUnless { it is JsonNull } else null
+ return when (e) {
+ null -> null
+ is JsonPrimitive -> if (e.isString) e.content else e.toString()
+ else -> e.toString()
+ }
+ }
+
+ /**
+ * What "always allow" would grant for this write, or null when it must be asked each time:
+ * on a multiplexed endpoint ([isMultiplexedPath], or any body naming an operation) the grant
+ * names the operation, and without a determinable operation there is no grant to offer.
+ */
+ fun offerFor(method: String, url: String, body: String?): RawGrant? {
+ val op = operationOf(body)
+ val base = offer(method, url, op)
+ if (op == null && isMultiplexedPath(java.net.URI(url).rawPath.orEmpty())) return null
+ return base
+ }
+
/** Up to this many segments in a path a grant covers. */
private const val MAX_SEGMENTS = 16
@@ -91,18 +142,25 @@ object RawRequest {
* segment that names one thing (an id, a number, a uri) as `*`, so the same kind of request on
* another song or playlist is covered and nothing else.
*/
- fun offer(method: String, url: String): RawGrant {
+ fun offer(method: String, url: String, op: String? = null): RawGrant {
val uri = java.net.URI(url)
val segments = uri.rawPath.orEmpty().split('/').filter { it.isNotEmpty() }.take(MAX_SEGMENTS)
- return RawGrant(method.uppercase(), uri.host.lowercase(), "/" + segments.joinToString("/") { if (isNameOfOne(it)) "*" else it })
+ return RawGrant(method.uppercase(), uri.host.lowercase(), "/" + segments.joinToString("/") { if (isNameOfOne(it)) "*" else it }, op.orEmpty())
}
- /** Whether one of [grants] covers [method] on [url] (the query is not looked at). */
- fun covered(grants: List<RawGrant>, method: String, url: String): Boolean {
+ /**
+ * Whether one of [grants] covers [method] on [url] (the query is not looked at). On a
+ * multiplexed request (its path, or an operation in the [body]) only a grant naming that very
+ * operation covers it; one without an operation never does.
+ */
+ fun covered(grants: List<RawGrant>, method: String, url: String, body: String? = null): Boolean {
val uri = runCatching { java.net.URI(url) }.getOrNull() ?: return false
val host = uri.host?.lowercase() ?: return false
val segments = uri.rawPath.orEmpty().split('/').filter { it.isNotEmpty() }
- return grants.any { it.method == method.uppercase() && it.host == host && it.matches(segments) }
+ val op = operationOf(body)
+ val multiplexed = op != null || isMultiplexedPath(uri.rawPath.orEmpty())
+ if (multiplexed && op == null) return false
+ return grants.any { it.method == method.uppercase() && it.host == host && it.matches(segments) && (!multiplexed || it.op == op) }
}
private fun isNameOfOne(segment: String): Boolean =
@@ -115,13 +173,16 @@ object RawRequest {
* extension's page and revocable there; a request it covers runs without asking.
*/
@kotlinx.serialization.Serializable
-data class RawGrant(val method: String, val host: String, val path: String) {
+data class RawGrant(val method: String, val host: String, val path: String, val op: String = "") {
fun matches(segments: List<String>): Boolean {
val mine = path.split('/').filter { it.isNotEmpty() }
return mine.size == segments.size && mine.zip(segments).all { (p, s) -> p == "*" || p == s }
}
- override fun toString() = "$method https://$host$path"
+ override fun toString() = "$method https://$host$path" + if (op.isNotEmpty()) " [operation $op]" else ""
+
+ /** An old grant on a multiplexed endpoint, without an operation: it covered every operation, so it is dropped. */
+ val tooBroad: Boolean get() = op.isEmpty() && RawRequest.isMultiplexedPath(path)
}
/** The user's answer to a write: no, this once, or always for the offered [RawGrant]. */
@@ -297,7 +358,7 @@ object SpotifyMethods {
typed("player", "moveInQueue", QUEUE, "reorder the queue") { a -> player.moveInQueue(a.queueItem(0, "item"), a.queueItem(1, "target"), a.bool(2, "after", false)) }
typed("player", "setVolume", CONTROL, "change the volume") { a -> player.setVolume(a.double(0, "level")) }
typed("player", "setSpeed", CONTROL, "change the playback speed") { a -> player.setSpeed(a.double(0, "speed")) }
- typed("player", "setLocalMute", CONTROL, "keep playing unheard on this phone") { a -> player.setLocalMute(a.bool(0, "on")) }
+ typed("player", "setLocalMute", Action.PLAYBACK_MIRROR, "keep playing unheard on this phone") { a -> player.setLocalMute(a.bool(0, "on")) }
// ── search ──
typed("search", "all", CATALOG) { a -> search.all(a.str(0, "query"), a.int(1, "limit", 10)) }
@@ -454,11 +515,7 @@ object SpotifyMethods {
RawRequest.check(a.str(0, "method"), a.str(1, "url")) !in RawRequest.READS
}) { b, a ->
val method = RawRequest.check(a.str(0, "method"), a.str(1, "url"))
- val body = when (val e = if (a.size > 2) a.json(2, "body").takeUnless { it is JsonNull } else null) {
- null -> null
- is JsonPrimitive -> if (e.isString) e.content else e.toString()
- else -> e.toString()
- }
+ val body = RawRequest.bodyText(a)
val headers = if (a.size > 3) a.obj(3, "headers").mapValues { (_, v) -> (v as? JsonPrimitive)?.content ?: v.toString() } else emptyMap()
raw(b).request(method, a.str(1, "url"), body?.let { RawRequest.bytes(it, a) }, headers)
}
diff --git a/base/extensions/src/main/kotlin/app/myspoti/extensions/Updates.kt b/base/extensions/src/main/kotlin/app/myspoti/extensions/Updates.kt
index 76286e83..69507f2a 100644
--- a/base/extensions/src/main/kotlin/app/myspoti/extensions/Updates.kt
+++ b/base/extensions/src/main/kotlin/app/myspoti/extensions/Updates.kt
@@ -23,7 +23,21 @@ data class Snapshot(
val exclusive: List<String> = emptyList(),
val replaces: List<String> = emptyList(),
val conflictsWith: List<String> = emptyList(),
+ /** sha256 of the main script the user accepted (null: not recorded yet, pinned on the next check). */
+ val scriptSha: String? = null,
+ /** The host's numeric id of the repository and of its owner, pinned at install (null: not pinned yet). */
+ val repoId: String? = null,
+ val ownerId: String? = null,
) {
+ /**
+ * Whether code run under these rights is dangerous enough that new code needs the user's OK:
+ * any critical (or unknown) action, or network access to any host / a wildcard of hosts.
+ */
+ fun sensitive(): Boolean = actions.any { r ->
+ val a = Action.of(r.name)
+ a == null || a.level == Level.CRITICAL || (a == Action.NETWORK && r.hosts.any { it == "*" || it.startsWith("*.") })
+ }
+
fun hosts(): List<String> = actions.firstOrNull { it.name == Action.NETWORK.key }?.hosts.orEmpty()
/** The Spotify writes accepted, as grants ([Manifest.declaredWrites]). */
@@ -33,11 +47,14 @@ data class Snapshot(
fun toManifest() = Manifest(id, id, version, versionCode, author = author, actions = actions, replaces = replaces, conflictsWith = conflictsWith)
companion object {
- fun of(m: Manifest, repo: String?) = Snapshot(
+ fun of(m: Manifest, repo: String?, script: String? = null, origin: Origin? = null) = Snapshot(
id = m.id, version = m.version, versionCode = m.versionCode, author = m.author, repo = repo,
actions = m.declared(), exclusive = m.actionSet().filter { it.mode == Mode.EXCLUSIVE }.map { it.key },
replaces = m.replaces, conflictsWith = m.conflictsWith,
+ scriptSha = script?.let(::scriptHash), repoId = origin?.repoId, ownerId = origin?.ownerId,
)
+
+ fun scriptHash(script: String): String = ExtensionPackage.sha256(script.toByteArray(Charsets.UTF_8))
}
}
@@ -47,8 +64,14 @@ data class Snapshot(
* author's new reason, [before] what the user accepted (the old reason, repo or author).
*/
@Serializable
-data class Change(val kind: Kind, val key: String, val why: String = "", val before: String = "", val critical: Boolean = false) {
+data class Change(
+ val kind: Kind, val key: String, val why: String = "", val before: String = "", val critical: Boolean = false,
+ /** [Kind.CODE]: lines added and removed ([key] lists the files changed). */
+ val added: Int = 0, val removed: Int = 0,
+) {
enum class Kind {
+ /** The code changed, asking nothing new, in a package that holds critical or broad network rights. */
+ CODE,
/** An action not accepted before (a critical one, `webview.page` and exclusive roles included). */
ACTION,
/** A network host not accepted before (`*`: any host, critical). */
@@ -78,16 +101,72 @@ data class Change(val kind: Kind, val key: String, val why: String = "", val bef
}
}
-/** Whether an update found on GitHub is applied by itself, or waits for the user's OK. */
+/** How much of the code changed between two packages: lines added / removed and the files concerned. */
+data class CodeDiff(val added: Int, val removed: Int, val files: List<String>) {
+ val lines: Int get() = added + removed
+
+ companion object {
+ /** [old] and [new]: file name to text. Lines are compared as multisets (cheap, order-blind: a count, not a patch). */
+ fun of(old: Map<String, String>, new: Map<String, String>): CodeDiff {
+ var added = 0
+ var removed = 0
+ val files = (old.keys + new.keys).sorted().filter { old[it] != new[it] }
+ files.forEach { f ->
+ val a = HashMap<String, Int>()
+ old[f]?.lines().orEmpty().forEach { a.merge(it, 1, Int::plus) }
+ new[f]?.lines().orEmpty().forEach { l ->
+ val n = a[l] ?: 0
+ if (n > 0) a[l] = n - 1 else added++
+ }
+ removed += a.values.sum()
+ }
+ return CodeDiff(added, removed, files)
+ }
+ }
+}
+
+/**
+ * Whether an update found on a code host is applied by itself, waits, waits for the user's OK, or
+ * is refused: a repository whose host id changed (re-registered or transferred under the same
+ * name) is never updated from; a code change in a package holding critical or broad network rights
+ * asks; anything else applies after [DELAY_MS] from when it was first seen (the kill switch can
+ * act meanwhile) unless the user asked for it.
+ */
object UpdateGate {
+ const val DELAY_MS = 24 * 3600 * 1000L
+
sealed interface Decision {
/** It asks nothing new: applied, the previous version kept to revert to. */
data object Apply : Decision
/** It asks [changes]: the old version keeps running, the user reads the card. */
data class Ask(val changes: List<Change>) : Decision
+ /** The repository is not the one installed from ([reason] says how): never applied, the user is warned. */
+ data class Block(val reason: String) : Decision
+ /** Harmless, but seen less than a day ago: applied at [until] (epoch ms). */
+ data class Wait(val until: Long) : Decision
}
- fun decide(accepted: Snapshot, next: Snapshot): Decision = diff(accepted, next).let { if (it.isEmpty()) Decision.Apply else Decision.Ask(it) }
+ /**
+ * [code]: how the code differs (null: not known). [firstSeen]: when this very package was first
+ * seen (null: no delay, the user asked for the update); [now] in ms.
+ */
+ fun decide(accepted: Snapshot, next: Snapshot, code: CodeDiff? = null, firstSeen: Long? = null, now: Long = 0): Decision {
+ identityChange(accepted, next)?.let { return Decision.Block(it) }
+ val changes = diff(accepted, next).toMutableList()
+ val codeChanged = accepted.scriptSha != null && next.scriptSha != null && accepted.scriptSha != next.scriptSha
+ if (codeChanged && (accepted.sensitive() || next.sensitive()))
+ changes += Change(Change.Kind.CODE, code?.files.orEmpty().joinToString(", "), critical = true, added = code?.added ?: 0, removed = code?.removed ?: 0)
+ if (changes.isNotEmpty()) return Decision.Ask(changes)
+ if (firstSeen != null && now - firstSeen < DELAY_MS) return Decision.Wait(firstSeen + DELAY_MS)
+ return Decision.Apply
+ }
+
+ /** Why [next] cannot come from the repository [accepted] was installed from (different host ids), or null. */
+ fun identityChange(accepted: Snapshot, next: Snapshot): String? = when {
+ accepted.repoId != null && next.repoId != null && accepted.repoId != next.repoId -> "repository id ${accepted.repoId} → ${next.repoId}"
+ accepted.ownerId != null && next.ownerId != null && accepted.ownerId != next.ownerId -> "owner id ${accepted.ownerId} → ${next.ownerId}"
+ else -> null
+ }
/**
* Everything [next] asks beyond [accepted]: new actions (critical, page and exclusive ones
diff --git a/base/extensions/src/main/resources/app/myspoti/extensions/prelude.js b/base/extensions/src/main/resources/app/myspoti/extensions/prelude.js
index 568caebe..f8530d3b 100644
--- a/base/extensions/src/main/resources/app/myspoti/extensions/prelude.js
+++ b/base/extensions/src/main/resources/app/myspoti/extensions/prelude.js
@@ -122,9 +122,9 @@
/**
* What this app understands beyond the first API, for an extension to adapt to: "audio.manifest",
- * "audio.expires", "audio.quality", "audio.source", "audio.ahead", "http.all", "status", "raw.base64", "player.localMute".
+ * "audio.expires", "audio.quality", "audio.source", "audio.ahead", "http.all", "status", "raw.base64", and "player.localMute" only when the user granted playback.mirror.
*/
- features: Object.freeze(['audio.manifest', 'audio.expires', 'audio.quality', 'audio.source', 'audio.ahead', 'http.all', 'status', 'raw.base64', 'player.localMute']),
+ features: Object.freeze(['audio.manifest', 'audio.expires', 'audio.quality', 'audio.source', 'audio.ahead', 'http.all', 'status', 'raw.base64'].concat(parse(host.info()).mirror ? ['player.localMute'] : [])),
/**
* A sign-in page (webview.auth): open({ url, callback, hidden }) shows url in a web view of its
@@ -189,6 +189,53 @@
Object.defineProperty(global, 'console', Object.assign({ value: console }, fixed));
Object.defineProperty(global, '__dispatch', Object.assign({ value: dispatch }, fixed));
+ // Size guards: native string operations are not interrupted by the time limit, so a script
+ // could ask for gigabytes in one call. The limits are far above what a lyrics, audio or page
+ // extension needs; past them the call throws a RangeError, which the script can catch.
+ var MAX_STRING = 4 * 1024 * 1024; // result of repeat / padStart / padEnd / join
+ var MAX_INPUT = 8 * 1024 * 1024; // JSON.parse and regular expression input
+ function guard(proto, name, check) {
+ var original = proto[name];
+ if (typeof original !== 'function') return;
+ Object.defineProperty(proto, name, {
+ value: function () { check.apply(this, arguments); return original.apply(this, arguments); },
+ writable: true, configurable: true, enumerable: false,
+ });
+ }
+ function tooBig(what) { throw new RangeError(what + ': too large'); }
+ guard(String.prototype, 'repeat', function (count) {
+ if (String(this).length * Math.max(0, Number(count) || 0) > MAX_STRING) tooBig('String.prototype.repeat');
+ });
+ ['padStart', 'padEnd'].forEach(function (name) {
+ guard(String.prototype, name, function (length) {
+ if (Number(length) > MAX_STRING) tooBig('String.prototype.' + name);
+ });
+ });
+ guard(Array.prototype, 'join', function (sep) {
+ var s = sep === undefined ? 1 : String(sep).length;
+ if (this.length * s > MAX_STRING) tooBig('Array.prototype.join');
+ });
+ var jsonParse = JSON.parse;
+ Object.defineProperty(JSON, 'parse', {
+ value: function (text, reviver) {
+ if (typeof text === 'string' && text.length > MAX_INPUT) tooBig('JSON.parse');
+ return jsonParse.call(JSON, text, reviver);
+ },
+ writable: true, configurable: true, enumerable: false,
+ });
+ // A regular expression runs natively and cannot be interrupted: at least the input is capped
+ // (a catastrophic pattern on a short input is still the script's own time to lose, see docs).
+ ['exec', 'test'].forEach(function (name) {
+ guard(RegExp.prototype, name, function (input) {
+ if (String(input).length > MAX_INPUT / 4) tooBig('RegExp.prototype.' + name);
+ });
+ });
+ ['match', 'matchAll', 'replace', 'replaceAll', 'search', 'split'].forEach(function (name) {
+ guard(String.prototype, name, function () {
+ if (String(this).length > MAX_INPUT / 4) tooBig('String.prototype.' + name);
+ });
+ });
+
// No code built from strings: what was reviewed is what runs.
// Function keeps its prototype, so `instanceof Function` and Function.prototype.call still work.
var refused = function Function() { throw new Error('code from strings is not allowed in extensions'); };
diff --git a/base/extensions/src/test/kotlin/app/myspoti/extensions/ActionsTest.kt b/base/extensions/src/test/kotlin/app/myspoti/extensions/ActionsTest.kt
index 17fbf582..76ccd73b 100644
--- a/base/extensions/src/test/kotlin/app/myspoti/extensions/ActionsTest.kt
+++ b/base/extensions/src/test/kotlin/app/myspoti/extensions/ActionsTest.kt
@@ -31,10 +31,10 @@ class ActionsTest {
// ── The catalogue ──
@Test fun theCatalogueIsClosedAndComplete() {
- assertEquals(22, Action.entries.size)
+ assertEquals(23, Action.entries.size)
assertEquals(Action.entries.size, Action.entries.map { it.key }.toSet().size)
assertEquals(
- setOf("audio.source", "download.source", "library.write", "playlists.write", "spotify.raw", "webview.page", "webview.auth"),
+ setOf("audio.source", "download.source", "library.write", "playlists.write", "spotify.raw", "webview.page", "webview.auth", "playback.mirror"),
Action.entries.filter { it.level == Level.CRITICAL }.map { it.key }.toSet(),
)
Action.entries.forEach { act ->
diff --git a/base/extensions/src/test/kotlin/app/myspoti/extensions/ConflictsTest.kt b/base/extensions/src/test/kotlin/app/myspoti/extensions/ConflictsTest.kt
index 8342c63f..c53ed4ca 100644
--- a/base/extensions/src/test/kotlin/app/myspoti/extensions/ConflictsTest.kt
+++ b/base/extensions/src/test/kotlin/app/myspoti/extensions/ConflictsTest.kt
@@ -13,26 +13,24 @@ class ConflictsTest {
conflictsWith = conflictsWith, replaces = replaces)
@Test fun modes() {
- assertEquals(setOf(Action.AUDIO_SOURCE, Action.DOWNLOAD_SOURCE), Action.entries.filter { it.mode == Mode.EXCLUSIVE }.toSet())
+ assertEquals(setOf(Action.AUDIO_SOURCE, Action.DOWNLOAD_SOURCE), Action.entries.filter { it.mode == Mode.ORDERED }.toSet())
+ assertTrue(Action.entries.none { it.mode == Mode.EXCLUSIVE })
assertTrue(listOf(Action.LYRICS_PROVIDE, Action.MENU_ITEMS, Action.HOME_SECTIONS, Action.SEARCH_PROVIDE, Action.TRACKINFO_PROVIDE).all { it.mode == Mode.ADDITIVE })
assertEquals(Mode.SHARED, Action.NETWORK.mode)
}
- @Test fun anExclusiveActionHasOneActiveExtension() {
+ @Test fun sourcesAreAskedInOrderAndNeverClash() {
val a = m("io.x.a", "audio.source")
val b = m("io.x.b", "audio.source", "download.source")
val lyrics = m("io.x.l", "lyrics.provide")
- // Nothing chosen: the first in priority acts; a choice wins while that one is there.
+ // An exclusive action (none today): the user's choice while it is there, else the first.
assertEquals("io.x.a", Conflicts.activeFor(listOf("io.x.a", "io.x.b"), null))
assertEquals("io.x.b", Conflicts.activeFor(listOf("io.x.a", "io.x.b"), "io.x.b"))
assertEquals("io.x.a", Conflicts.activeFor(listOf("io.x.a"), "io.x.gone"))
assertNull(Conflicts.activeFor(emptyList(), "io.x.b"))
- // Installing b next to a: it would replace a for audio; downloads are free. Additive actions never clash.
- assertEquals(listOf(Clash(Clash.Kind.EXCLUSIVE, "io.x.a", Action.AUDIO_SOURCE)), Conflicts.clashes(b, listOf(a, lyrics), emptyMap()))
+ // A second audio source goes after the first in the order: nothing to choose at install.
+ assertEquals(emptyList<Clash>(), Conflicts.clashes(b, listOf(a, lyrics), emptyMap()))
assertEquals(emptyList<Clash>(), Conflicts.clashes(m("io.x.l2", "lyrics.provide"), listOf(lyrics), emptyMap()))
- // With b active for audio, a new audio source would replace b.
- val c = m("io.x.c", "audio.source")
- assertEquals("io.x.b", Conflicts.clashes(c, listOf(a, b), mapOf("audio.source" to "io.x.b")).single().otherId)
}
@Test fun conflictsWithAndReplacesAreAskedEitherWay() {
diff --git a/base/extensions/src/test/kotlin/app/myspoti/extensions/GitHubTest.kt b/base/extensions/src/test/kotlin/app/myspoti/extensions/GitHubTest.kt
index 0c877a30..a36b5f6c 100644
--- a/base/extensions/src/test/kotlin/app/myspoti/extensions/GitHubTest.kt
+++ b/base/extensions/src/test/kotlin/app/myspoti/extensions/GitHubTest.kt
@@ -51,12 +51,11 @@ class GitHubTest {
assertEquals(Change.Kind.REPLACES, changes(lyrics, net, replaces = listOf("io.github.other.lyrics")).single().kind)
}
- @Test fun anExclusiveRoleOnAnAcceptedActionIsAChange() {
+ @Test fun aSourceIsNotAnExclusiveRole() {
+ // Sources are asked in the user's order now: an update keeping audio.source asks nothing new.
val m = manifest(1, req("audio.source", "Plays from my server"))
- val accepted = snap(m).copy(exclusive = emptyList())
- val c = (UpdateGate.decide(accepted, snap(manifest(2, req("audio.source", "Plays from my server")))) as UpdateGate.Decision.Ask).changes.single()
- assertEquals(Change.Kind.EXCLUSIVE, c.kind)
- // A new exclusive action is listed once, as an action.
+ assertTrue(UpdateGate.decide(snap(m), snap(manifest(2, req("audio.source", "Plays from my server")))) is UpdateGate.Decision.Apply)
+ // A new source action is listed once, as an action.
val fresh = (UpdateGate.decide(snap(manifest(1, lyrics)), snap(manifest(2, lyrics, req("audio.source", "x")))) as UpdateGate.Decision.Ask).changes
assertEquals(listOf(Change.Kind.ACTION), fresh.map { it.kind })
}
diff --git a/base/extensions/src/test/kotlin/app/myspoti/extensions/MirrorTest.kt b/base/extensions/src/test/kotlin/app/myspoti/extensions/MirrorTest.kt
new file mode 100644
index 00000000..44596ab7
--- /dev/null
+++ b/base/extensions/src/test/kotlin/app/myspoti/extensions/MirrorTest.kt
@@ -0,0 +1,92 @@
+package app.myspoti.extensions
+
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertNotNull
+import org.junit.Assert.assertNull
+import org.junit.Assert.assertTrue
+import org.junit.Test
+
+class MirrorTest {
+ private var now = 1_000_000L
+ private val g = MirrorGuard { now }
+
+ @Test fun setLocalMuteNeedsTheCriticalMirrorAction() {
+ val m = SpotifyMethods.find("player", "setLocalMute")!!
+ assertEquals(Action.PLAYBACK_MIRROR, m.action)
+ assertEquals(Level.CRITICAL, Action.PLAYBACK_MIRROR.level)
+ // Control alone does not unlock it; legacy keys never grant it.
+ assertFalse(Action.migrateGranted(setOf("spotify.write", "player.control")).contains("playback.mirror"))
+ }
+
+ @Test fun onlyWhileTheLocalPlayerPlays() {
+ assertNotNull(g.enable("a", false, "local:1", 1000))
+ assertNotNull(g.enable("a", true, null, 1000))
+ assertNull(g.enable("a", true, "local:1", 1000))
+ }
+
+ @Test fun oneExtensionAtATimeAndRateLimited() {
+ assertNull(g.enable("a", true, "local:1", 100_000))
+ assertNotNull(g.enable("b", true, "local:1", 100_000))
+ now += 5_000
+ assertNotNull(g.enable("a", true, "local:1", 100_000))
+ now += MirrorGuard.MIN_INTERVAL_MS
+ assertNull(g.enable("a", true, "local:1", 100_000))
+ }
+
+ @Test fun clearsOnTrackChangePauseDurationAndExtensionGone() {
+ g.enable("a", true, "local:1", 10_000)
+ assertNull(g.check(true, "local:1"))
+ assertEquals("the track changed", g.check(true, "local:2"))
+ assertNull(g.active)
+ now += 30_000
+ g.enable("a", true, "local:2", 10_000)
+ assertNotNull(g.check(false, "local:2"))
+ now += 30_000
+ g.enable("a", true, "local:2", 10_000)
+ now += 16_000
+ assertEquals("the track's duration ended", g.check(true, "local:2"))
+ now += 30_000
+ g.enable("a", true, "local:2", 10_000)
+ assertFalse(g.extensionGone("b"))
+ assertTrue(g.extensionGone("a"))
+ assertNull(g.active)
+ }
+
+ // ── raw.request grants per operation ──
+
+ private val gql = "https://api-partner.spotify.com/pathfinder/v1/query"
+ private fun body(op: String) = """{"operationName":"$op","variables":{}}"""
+
+ @Test fun sameOperationIsCoveredOtherIsNot() {
+ val grant = RawRequest.offerFor("POST", gql, body("addToPlaylist"))!!
+ assertEquals("addToPlaylist", grant.op)
+ assertTrue(RawRequest.covered(listOf(grant), "POST", gql, body("addToPlaylist")))
+ assertFalse(RawRequest.covered(listOf(grant), "POST", gql, body("removeFromPlaylist")))
+ assertFalse(RawRequest.covered(listOf(grant), "POST", gql, "{}"))
+ }
+
+ @Test fun persistedQueryHashNamesTheOperation() {
+ val b = """{"extensions":{"persistedQuery":{"version":1,"sha256Hash":"abc123"}}}"""
+ assertEquals("sha256:abc123", RawRequest.operationOf(b))
+ }
+
+ @Test fun noOperationOnAMultiplexedEndpointMeansNoAlways() {
+ assertNull(RawRequest.offerFor("POST", gql, "{}"))
+ assertNull(RawRequest.offerFor("POST", gql, null))
+ assertNull(RawRequest.offerFor("POST", gql, "not json"))
+ // An old grant without an operation covers nothing there, and is flagged for dropping.
+ val old = RawGrant("POST", "api-partner.spotify.com", "/pathfinder/v1/query")
+ assertTrue(old.tooBroad)
+ assertFalse(RawRequest.covered(listOf(old), "POST", gql, body("x")))
+ assertFalse(RawRequest.covered(listOf(old), "POST", gql, null))
+ }
+
+ @Test fun plainEndpointsKeepTheirGrants() {
+ val url = "https://api.spotify.com/v1/me/player/12345"
+ val g = RawRequest.offerFor("POST", url, null)!!
+ assertEquals("", g.op)
+ assertTrue(RawRequest.covered(listOf(g), "POST", url, null))
+ assertFalse(g.tooBroad)
+ }
+}
diff --git a/base/extensions/src/test/kotlin/app/myspoti/extensions/SafetyTest.kt b/base/extensions/src/test/kotlin/app/myspoti/extensions/SafetyTest.kt
new file mode 100644
index 00000000..319b5671
--- /dev/null
+++ b/base/extensions/src/test/kotlin/app/myspoti/extensions/SafetyTest.kt
@@ -0,0 +1,184 @@
+package app.myspoti.extensions
+
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertNotNull
+import org.junit.Assert.assertNull
+import org.junit.Assert.assertTrue
+import org.junit.Assert.fail
+import org.junit.Test
+
+/** The network allowlist, the private-address guard and the crash-proofing of the sandbox. */
+class SafetyTest {
+ private val track = TrackInfo("abc", "spotify:track:abc", "Song", "Artist", listOf("Artist"), "Album", 180_000)
+
+ private class Host2 : Host {
+ val logs = mutableListOf<String>()
+ val notes = mutableListOf<String>()
+ var nowPlaying: () -> String? = { null }
+ override fun log(extensionId: String, message: String) { logs += message }
+ override fun storage(extensionId: String): Storage = MemoryStorage()
+ override fun setting(extensionId: String, key: String): String? = null
+ override fun nowPlaying(): String? = nowPlaying.invoke()
+ override fun notify(extensionId: String, text: String) { notes += text }
+ }
+
+ private fun manifest(actions: List<ActionRequest>, media: Media? = null) =
+ Manifest("io.github.test.safe", "Safe", "1.0", author = "me", actions = actions, media = media)
+
+ private fun req(name: String, vararg hosts: String) = ActionRequest(name, "because it needs to, for the test", hosts.toList())
+
+ private fun run(script: String, m: Manifest, host: Host = Host2(), hook: Hook = Hook.AUDIO_SOURCE): Pair<ExtensionRuntime, String?> {
+ val rt = ExtensionRuntime(m, script, host, m.asks().map { it.key }.toSet()).also { it.start() }
+ return rt to rt.call(hook, track.toJson(), 3_000)
+ }
+
+ private fun audio(url: String) = "myspoti.provide('audio-source', function () { return { url: '$url' }; });"
+
+ // ── Private addresses, in every spelling ──
+
+ @Test fun privateAddressForms() {
+ listOf(
+ "localhost", "foo.localhost", "printer.local", "127.0.0.1", "127.1", "2130706433", "0x7f000001", "0x7f.1", "0177.0.0.1", "017700000001",
+ "10.1.2.3", "172.16.0.1", "172.31.255.255", "192.168.0.1", "169.254.169.254", "100.64.0.1", "100.127.255.255", "0.0.0.0", "0",
+ "[::1]", "::1", "::", "[::ffff:127.0.0.1]", "::ffff:7f00:1", "::ffff:10.0.0.1", "fc00::1", "fd12:3456::1", "fe80::1", "[fe80::1%eth0]",
+ "64:ff9b::7f00:1", "2002:7f00:1::1", "224.0.0.1", "169.254.1.1.", "192.168.1",
+ ).forEach { assertTrue("$it should be private", SafeNet.isPrivateHost(it)) }
+ }
+
+ @Test fun publicAddressesPass() {
+ listOf("example.com", "api.zarz.moe", "8.8.8.8", "100.128.0.1", "100.63.255.255", "172.32.0.1", "172.15.0.1", "2001:4860:4860::8888", "[2606:4700::1111]", "1.1.1.1", "999.1.1.1")
+ .forEach { assertFalse("$it should be public", SafeNet.isPrivateHost(it)) }
+ }
+
+ @Test fun dnsRefusesLocalNamesAndLiterals() {
+ listOf("localhost", "127.0.0.1", "2130706433", "[::1]").forEach {
+ try { SafeNet.SafeDns.lookup(it); fail("$it resolved") } catch (_: java.net.UnknownHostException) { /* refused */ }
+ }
+ }
+
+ @Test fun basicHttpNeverConnectsToLocalAddresses() {
+ listOf("http://127.0.0.1:9/", "http://2130706433:9/", "http://0x7f.1:9/", "http://[::1]:9/", "http://localhost:9/", "http://[::ffff:127.0.0.1]:9/").forEach {
+ try { BasicHttp.send(HttpRequest(it, timeout = 1_000), "t"); fail("$it was sent") } catch (e: java.io.IOException) { assertTrue(e.message, e.message!!.contains("local")) }
+ }
+ }
+
+ @Test fun checkUrlRefusesObscureLoopback() {
+ for (u in listOf("http://2130706433/a.mp3", "https://0x7f000001/a", "http://127.1/a", "https://[::ffff:7f00:1]/a")) {
+ try { checkUrl("audio-source", u); fail(u) } catch (_: ExtensionException) { /* refused */ }
+ }
+ checkUrl("audio-source", "https://cdn.example.org/a.flac")
+ }
+
+ // ── Host allowlist of media and images ──
+
+ private val audioActions = listOf(req("audio.source"), req("network", "api.example.com"))
+
+ @Test fun audioUrlMustBeOnADeclaredHost() {
+ val m = manifest(audioActions, Media(listOf("*.cdn.example.org")))
+ assertNotNull(run(audio("https://api.example.com/a.mp3"), m).second)
+ assertNotNull(run(audio("https://eu.cdn.example.org/a.mp3"), m).second)
+ try { run(audio("https://evil.example.net/a.mp3"), m); fail("undeclared host") } catch (e: ExtensionException) { assertTrue(e.message, e.message!!.contains("evil.example.net")) }
+ }
+
+ @Test fun downloadFilesAreChecked() {
+ val m = manifest(listOf(req("download.source"), req("network", "api.example.com")), Media(listOf("files.example.org")))
+ val ok = "myspoti.provide('download-source', function () { return [{ url: 'https://files.example.org/x.flac', format: 'flac' }]; });"
+ val bad = "myspoti.provide('download-source', function () { return [{ url: 'https://other.example.org/x.flac', format: 'flac' }]; });"
+ assertNotNull(run(ok, m, hook = Hook.DOWNLOAD_SOURCE).second)
+ try { run(bad, m, hook = Hook.DOWNLOAD_SOURCE); fail() } catch (_: ExtensionException) { }
+ }
+
+ @Test fun dashManifestUrlsAreChecked() {
+ val mpd = """<MPD><SegmentTemplate initialization="https://cdn.other.org/i.mp4" media="https://cdn.other.org/m.mp4"/></MPD>"""
+ val b64 = java.util.Base64.getEncoder().encodeToString(mpd.toByteArray())
+ val script = "myspoti.provide('audio-source', function () { return { manifest: '$b64' }; });"
+ try { run(script, manifest(audioActions, Media(listOf("cdn.example.org")))); fail() } catch (_: ExtensionException) { }
+ assertNotNull(run(script, manifest(audioActions, Media(listOf("cdn.other.org")))).second)
+ }
+
+ @Test fun olderManifestWithoutMediaKeepsPublicHosts() {
+ // Migration: an extension published before `media` still gets audio from any public host.
+ val m = manifest(audioActions, media = null)
+ assertNotNull(run(audio("https://some.cdn.example.net/a.mp3"), m).second)
+ }
+
+ @Test fun blockImagesAreHeldToDeclaredHosts() {
+ val m = manifest(listOf(req("home.sections"), req("network", "img.example.com")))
+ fun home(url: String) = "myspoti.provide('home', function () { return [{ type: 'image', url: '$url' }]; });"
+ assertNotNull(run(home("https://img.example.com/a.png"), m, hook = Hook.HOME).second)
+ try { run(home("https://tracker.example.net/a.png"), m, hook = Hook.HOME); fail() } catch (e: ExtensionException) { assertTrue(e.message, e.message!!.contains("tracker.example.net")) }
+ val withMedia = manifest(listOf(req("home.sections")), Media(listOf("*.images.example.org")))
+ assertNotNull(run(home("https://a.images.example.org/a.png"), withMedia, hook = Hook.HOME).second)
+ }
+
+ @Test fun mediaHostsAreShownAndValidated() {
+ val m = manifest(audioActions, Media(listOf("cdn.example.org")))
+ assertTrue(m.asks().first { it.key == "audio.source" }.hosts.contains("cdn.example.org"))
+ assertTrue(manifest(audioActions, Media(listOf("*"))).problems().any { it.contains("media host") })
+ }
+
+ @Test fun mediaHeadersAreLimited() {
+ val h = headersOf(ExtJson.parseToJsonElement("""{"Referer":"https://x.org","Cookie":"a=b","Proxy-Authorization":"x","X-A":"line\nbreak"}"""))
+ assertEquals(setOf("Referer"), h.keys)
+ }
+
+ // ── Crash-proofing ──
+
+ private val playerManifest = manifest(listOf(req("lyrics.provide"), req("playback.events"), req("notify")))
+ private val lyricsScript = "myspoti.provide('lyrics', function () { return { v: myspoti.player.current() }; });"
+
+ @Test fun outOfMemoryTurnsTheExtensionOffNotTheApp() {
+ val host = Host2().apply { nowPlaying = { throw OutOfMemoryError("simulated") } }
+ val rt = ExtensionRuntime(playerManifest, lyricsScript, host, playerManifest.asks().map { it.key }.toSet()).also { it.start() }
+ try { rt.call(Hook.LYRICS, track.toJson(), 3_000); fail() } catch (e: ExtensionFault) { assertTrue(e.message, e.message!!.contains("memory")) }
+ assertNotNull(rt.faulted)
+ assertTrue(host.logs.any { it.startsWith("turned off:") })
+ host.nowPlaying = { "{}" }
+ try { rt.call(Hook.LYRICS, track.toJson(), 3_000); fail("still off") } catch (_: ExtensionFault) { }
+ rt.close()
+ }
+
+ @Test fun stackOverflowTurnsTheExtensionOff() {
+ val host = Host2().apply { nowPlaying = { throw StackOverflowError() } }
+ val rt = ExtensionRuntime(playerManifest, lyricsScript, host, playerManifest.asks().map { it.key }.toSet()).also { it.start() }
+ try { rt.call(Hook.LYRICS, track.toJson(), 3_000); fail() } catch (e: ExtensionFault) { assertTrue(e.message, e.message!!.contains("stack")) }
+ rt.close()
+ }
+
+ @Test fun anInfiniteLoopIsStillAPlainTimeout() {
+ val m = manifest(listOf(req("lyrics.provide")))
+ val rt = ExtensionRuntime(m, "myspoti.provide('lyrics', function () { while (true) {} });", Host2(), m.asks().map { it.key }.toSet()).also { it.start() }
+ try { rt.call(Hook.LYRICS, track.toJson(), 300); fail() } catch (e: ExtensionTimeout) { /* not a fault */ }
+ assertNull(rt.faulted)
+ rt.close()
+ }
+
+ private fun lyrics(expr: String): String? {
+ val m = manifest(listOf(req("lyrics.provide")))
+ return run("myspoti.provide('lyrics', function () { return { v: $expr }; });", m, hook = Hook.LYRICS).second
+ }
+
+ @Test fun hugeStringsAreRefused() {
+ assertEquals("""{"v":"ababab"}""", lyrics("'ab'.repeat(3)"))
+ assertEquals("""{"v":"009"}""", lyrics("'9'.padStart(3, '0')"))
+ for (e in listOf("'x'.repeat(1e9)", "'x'.repeat(5000000)", "'x'.padStart(1e9, 'ab')", "'x'.padEnd(1e9)", "new Array(3e7).join('abc')", "(function () { var s = '1234567'; for (var i = 0; i < 21; i++) s += s; return JSON.parse(s); })()")) {
+ try { lyrics(e); fail(e) } catch (x: ExtensionException) { assertTrue(x.message, x.message!!.contains("too large")) }
+ }
+ }
+
+ @Test fun regexInputIsCapped() {
+ try { lyrics("/a+/.test('a'.repeat(3000000) + 'b'.repeat(0)) ? 1 : 0"); fail() } catch (x: ExtensionException) { assertTrue(x.message, x.message!!.contains("too large")) }
+ assertEquals("""{"v":true}""", lyrics("/a+b/.test('aaab')"))
+ }
+
+ @Test fun notifyIsRateLimited() {
+ val host = Host2()
+ val m = manifest(listOf(req("lyrics.provide"), req("notify")))
+ val rt = ExtensionRuntime(m, "myspoti.provide('lyrics', function () { myspoti.notify('hi'); return {}; });", host, m.asks().map { it.key }.toSet()).also { it.start() }
+ repeat(ExtensionRuntime.MAX_NOTIFY_PER_HOUR) { rt.call(Hook.LYRICS, track.toJson(), 3_000) }
+ try { rt.call(Hook.LYRICS, track.toJson(), 3_000); fail() } catch (e: ExtensionException) { assertTrue(e.message, e.message!!.contains("an hour")) }
+ assertEquals(ExtensionRuntime.MAX_NOTIFY_PER_HOUR, host.notes.size)
+ rt.close()
+ }
+}
diff --git a/base/extensions/src/test/kotlin/app/myspoti/extensions/SandboxTest.kt b/base/extensions/src/test/kotlin/app/myspoti/extensions/SandboxTest.kt
index 5a89d8c0..0566bf35 100644
--- a/base/extensions/src/test/kotlin/app/myspoti/extensions/SandboxTest.kt
+++ b/base/extensions/src/test/kotlin/app/myspoti/extensions/SandboxTest.kt
@@ -202,6 +202,14 @@ class SandboxTest {
assertEquals("""{"v":"audio.manifest,audio.expires,audio.quality,audio.source,audio.ahead,http.all,status,raw.base64"}""", eval("return myspoti.features.join(',');"))
}
+ @Test fun localMuteFeatureIsListedOnlyWhenMirrorIsGranted() {
+ val m = Manifest("io.github.test.ext", "Test", "1.0", author = "me",
+ actions = listOf(ActionRequest("lyrics.provide", "x"), ActionRequest("playback.mirror", "Mirrors a stream silently")))
+ val js = "myspoti.provide('lyrics', function (t) { return { v: myspoti.features.indexOf('player.localMute') >= 0 }; });"
+ assertEquals("""{"v":true}""", runtime(js, m, granted = setOf("lyrics.provide", "playback.mirror")).use { it.call(Hook.LYRICS, track.toJson(), 3_000) })
+ assertEquals("""{"v":false}""", runtime(js, m, granted = setOf("lyrics.provide")).use { it.call(Hook.LYRICS, track.toJson(), 3_000) })
+ }
+
@Test fun statusNeedsNoActionAndSaysWhetherTheSourceAnswers() {
// Provided with only the lyrics action granted: status asks for nothing more.
val m = manifest()
diff --git a/base/extensions/src/test/kotlin/app/myspoti/extensions/SpotifyTest.kt b/base/extensions/src/test/kotlin/app/myspoti/extensions/SpotifyTest.kt
index 5d09863d..d5fcc0b9 100644
--- a/base/extensions/src/test/kotlin/app/myspoti/extensions/SpotifyTest.kt
+++ b/base/extensions/src/test/kotlin/app/myspoti/extensions/SpotifyTest.kt
@@ -293,7 +293,7 @@ class SpotifyTest {
val all = SpotifyMethods.all()
fun count(a: Action) = all.count { it.action == a }
assertEquals(
- setOf(Action.SPOTIFY_CATALOG, Action.LIBRARY_READ, Action.PLAYBACK_EVENTS, Action.PLAYBACK_CONTROL, Action.PLAYBACK_QUEUE,
+ setOf(Action.SPOTIFY_CATALOG, Action.LIBRARY_READ, Action.PLAYBACK_EVENTS, Action.PLAYBACK_CONTROL, Action.PLAYBACK_QUEUE, Action.PLAYBACK_MIRROR,
Action.LIBRARY_WRITE, Action.PLAYLISTS_WRITE, Action.SPOTIFY_RAW),
all.map { it.action }.toSet(),
)
diff --git a/base/extensions/src/test/kotlin/app/myspoti/extensions/UpdateConsentTest.kt b/base/extensions/src/test/kotlin/app/myspoti/extensions/UpdateConsentTest.kt
new file mode 100644
index 00000000..9438410e
--- /dev/null
+++ b/base/extensions/src/test/kotlin/app/myspoti/extensions/UpdateConsentTest.kt
@@ -0,0 +1,82 @@
+package app.myspoti.extensions
+
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertNull
+import org.junit.Assert.assertTrue
+import org.junit.Test
+
+/** The update consent: code changes, the 24 h wait, the repository's pinned ids. */
+class UpdateConsentTest {
+ private fun req(name: String, hosts: List<String> = emptyList()) = ActionRequest(name, "because", hosts)
+ private fun manifest(vararg a: ActionRequest) = Manifest("io.github.me.ext", "Ext", "1.0", 1, author = "me", actions = a.toList())
+ private fun snap(script: String, vararg a: ActionRequest, repoId: String? = "10", ownerId: String? = "20") =
+ Snapshot.of(manifest(*a), "me/ext", script, Origin("me/ext", repoId = repoId, ownerId = ownerId))
+
+ private val harmless = arrayOf(req("lyrics.provide"), req("network", listOf("lrclib.net")))
+ private val code = CodeDiff.of(mapOf("main.js" to "a\nb"), mapOf("main.js" to "a\nc\nd"))
+ private val h = 3600_000L
+
+ @Test fun codeOnlyChangeWithACriticalActionAsks() {
+ val d = UpdateGate.decide(snap("v1", req("library.write")), snap("v2", req("library.write")), code, firstSeen = 0, now = 100 * h)
+ val c = (d as UpdateGate.Decision.Ask).changes.single()
+ assertEquals(Change.Kind.CODE, c.kind)
+ assertEquals("main.js", c.key); assertEquals(2, c.added); assertEquals(1, c.removed)
+ }
+
+ @Test fun codeOnlyChangeWithWildcardNetworkAsks() {
+ val a = req("network", listOf("*"))
+ assertTrue(UpdateGate.decide(snap("v1", a), snap("v2", a), code) is UpdateGate.Decision.Ask)
+ val b = req("network", listOf("*.example.com"))
+ assertTrue(UpdateGate.decide(snap("v1", b), snap("v2", b), code) is UpdateGate.Decision.Ask)
+ }
+
+ @Test fun codeOnlyChangeWithHarmlessRightsAppliesAfterADay() {
+ val a = snap("v1", *harmless)
+ val b = snap("v2", *harmless)
+ assertEquals(UpdateGate.Decision.Wait(UpdateGate.DELAY_MS), UpdateGate.decide(a, b, code, firstSeen = 0, now = 23 * h))
+ assertEquals(UpdateGate.Decision.Apply, UpdateGate.decide(a, b, code, firstSeen = 0, now = 24 * h))
+ // The user asked for it: no wait.
+ assertEquals(UpdateGate.Decision.Apply, UpdateGate.decide(a, b, code, firstSeen = null, now = 0))
+ }
+
+ @Test fun anotherRepositoryOrOwnerIdBlocks() {
+ val a = snap("v1", *harmless)
+ assertTrue(UpdateGate.decide(a, snap("v2", *harmless, repoId = "11")) is UpdateGate.Decision.Block)
+ assertTrue(UpdateGate.decide(a, snap("v2", *harmless, ownerId = "21")) is UpdateGate.Decision.Block)
+ // Not pinned yet (or not readable now): nothing to compare, nothing blocked.
+ assertEquals(UpdateGate.Decision.Apply, UpdateGate.decide(a, snap("v2", *harmless, repoId = null, ownerId = null)))
+ assertNull(UpdateGate.identityChange(snap("v1", *harmless, repoId = null), snap("v2", *harmless)))
+ }
+
+ @Test fun codeDiffCountsLinesAndFiles() {
+ assertEquals(CodeDiff(0, 0, emptyList()), CodeDiff.of(mapOf("a" to "x"), mapOf("a" to "x")))
+ val d = CodeDiff.of(mapOf("a" to "1\n2\n3", "b" to "k"), mapOf("a" to "1\n3\n4", "c" to "z"))
+ assertEquals(listOf("a", "b", "c"), d.files)
+ assertEquals(2, d.added); assertEquals(2, d.removed)
+ }
+
+ // ── Pinned ids, per host ──
+
+ @Test fun identityIsParsedForTheThreeHosts() {
+ assertEquals(RepoIds("1296269", "583231"), Discovery.parseIdentity(CodeHost.GITHUB, """{"id":1296269,"name":"x","owner":{"login":"octocat","id":583231}}"""))
+ assertEquals(RepoIds("278964", "1385"), Discovery.parseIdentity(CodeHost.GITLAB, """{"id":278964,"path":"x","namespace":{"id":1385,"path":"g"},"owner":{"id":7}}"""))
+ assertEquals(RepoIds("42", "7"), Discovery.parseIdentity(CodeHost.CODEBERG, """{"id":42,"full_name":"o/x","owner":{"id":7,"login":"o"}}"""))
+ assertNull(Discovery.parseIdentity(CodeHost.GITHUB, """{"message":"Not Found"}"""))
+ assertNull(Discovery.parseIdentity(CodeHost.GITLAB, "not json"))
+ }
+
+ @Test fun discoveryGivesTheIdsToPin() {
+ val gh = Discovery.parse(CodeHost.GITHUB, """{"items":[{"id":5,"full_name":"me/ext","owner":{"login":"me","id":6}}]}""").single()
+ assertEquals(RepoIds("5", "6"), gh.ids)
+ val gl = Discovery.parse(CodeHost.GITLAB, """[{"id":8,"path_with_namespace":"grp/ext","namespace":{"id":9}}]""").single()
+ assertEquals(RepoIds("8", "9"), gl.ids)
+ val cb = Discovery.parse(CodeHost.CODEBERG, """{"data":[{"id":3,"full_name":"me/ext","owner":{"id":4,"login":"me"}}]}""").single()
+ assertEquals(RepoIds("3", "4"), cb.ids)
+ }
+
+ @Test fun identityUrls() {
+ assertEquals("https://api.github.com/repos/me/ext", Discovery.identityUrl(GitHubRepo("me", "ext")))
+ assertEquals("https://gitlab.com/api/v4/projects/grp%2Fsub%2Fext", Discovery.identityUrl(GitHubRepo("grp/sub", "ext", CodeHost.GITLAB)))
+ assertEquals("https://codeberg.org/api/v1/repos/me/ext", Discovery.identityUrl(GitHubRepo("me", "ext", CodeHost.CODEBERG)))
+ }
+}
diff --git a/base/host-android/src/main/kotlin/app/myspoti/host/android/HeadsetButtons.kt b/base/host-android/src/main/kotlin/app/myspoti/host/android/HeadsetButtons.kt
new file mode 100644
index 00000000..827ce1d5
--- /dev/null
+++ b/base/host-android/src/main/kotlin/app/myspoti/host/android/HeadsetButtons.kt
@@ -0,0 +1,40 @@
+package app.myspoti.host.android
+
+import android.view.KeyEvent
+
+/**
+ * What a transport command from the system (earbuds, car, notification) does, by what plays.
+ * A podcast episode skips 15 s like the official app (right earbud forward, left back) unless the
+ * setting asks for the next and previous episode; music keeps next / previous.
+ */
+object HeadsetButtons {
+ const val SKIP_MS = 15_000L
+
+ enum class Command(val label: String) {
+ NEXT("next"), PREVIOUS("previous"), FAST_FORWARD("fast-forward"), REWIND("rewind"),
+ }
+
+ enum class Action { NEXT, PREVIOUS, SEEK_FORWARD, SEEK_BACK, NONE }
+
+ fun map(episode: Boolean, skipsOnEpisodes: Boolean, command: Command): Action = when (command) {
+ Command.NEXT -> if (episode && skipsOnEpisodes) Action.SEEK_FORWARD else Action.NEXT
+ Command.PREVIOUS -> if (episode && skipsOnEpisodes) Action.SEEK_BACK else Action.PREVIOUS
+ Command.FAST_FORWARD -> if (episode) Action.SEEK_FORWARD else Action.NONE
+ Command.REWIND -> if (episode) Action.SEEK_BACK else Action.NONE
+ }
+
+ /** The keys the platform does not turn into a callback by itself. */
+ fun commandOf(keyCode: Int): Command? = when (keyCode) {
+ KeyEvent.KEYCODE_MEDIA_SKIP_FORWARD, KeyEvent.KEYCODE_MEDIA_FAST_FORWARD -> Command.FAST_FORWARD
+ KeyEvent.KEYCODE_MEDIA_SKIP_BACKWARD, KeyEvent.KEYCODE_MEDIA_REWIND -> Command.REWIND
+ else -> null
+ }
+
+ /** The logbook line of a mapped command. */
+ fun logLine(command: Command, episode: Boolean, action: Action): String = when (action) {
+ Action.SEEK_FORWARD -> "${command.label} on ${if (episode) "episode" else "music"} -> +15 s"
+ Action.SEEK_BACK -> "${command.label} on ${if (episode) "episode" else "music"} -> -15 s"
+ Action.NONE -> "${command.label} ignored on music"
+ else -> command.label
+ }
+}
diff --git a/base/host-android/src/main/kotlin/app/myspoti/host/android/PlaybackService.kt b/base/host-android/src/main/kotlin/app/myspoti/host/android/PlaybackService.kt
index a15d000a..973b741c 100644
--- a/base/host-android/src/main/kotlin/app/myspoti/host/android/PlaybackService.kt
+++ b/base/host-android/src/main/kotlin/app/myspoti/host/android/PlaybackService.kt
@@ -49,11 +49,13 @@ data class NowPlayingInfo(
val buffering: Boolean = false,
val liked: Boolean = false,
val shuffle: Boolean = false,
+ /** A podcast episode: the notification offers 15 s skips, the headset next / previous skip 15 s. */
+ val episode: Boolean = false,
) {
/** Everything but the position: a moving position alone is not a new state. */
fun sameAs(other: NowPlayingInfo) = id == other.id && title == other.title && artist == other.artist &&
album == other.album && coverUrl == other.coverUrl && durationMs == other.durationMs &&
- playing == other.playing && buffering == other.buffering && liked == other.liked && shuffle == other.shuffle
+ playing == other.playing && buffering == other.buffering && liked == other.liked && shuffle == other.shuffle && episode == other.episode
}
/** Commands from the system (notification buttons, headset, car, lock screen). */
@@ -68,6 +70,10 @@ interface PlaybackControls {
fun playFromSearch(query: String)
fun setRemoteVolume(volume: Int)
fun setShuffle(on: Boolean) {}
+ /** What plays is a podcast episode. */
+ val isEpisode: Boolean get() = false
+ /** Skips [deltaMs] within the episode; at its end, goes on to the next item. */
+ fun skipBy(deltaMs: Long) {}
}
/** Android Auto / media browser content. */
@@ -191,12 +197,38 @@ class PlaybackService : MediaBrowserServiceCompat() {
if (c == null) android.util.Log.w("Myspoti", "media session: $name dropped, the player is not attached yet") else c.run()
}
+ /** A transport command from the system: on a podcast episode the earbuds skip 15 s (see [HeadsetButtons]). */
+ private fun headset(cmd: HeadsetButtons.Command) {
+ val episode = controls?.isEpisode == true
+ when (val action = HeadsetButtons.map(episode, skipsOnEpisodes(this), cmd)) {
+ HeadsetButtons.Action.NEXT -> command("next") { next() }
+ HeadsetButtons.Action.PREVIOUS -> command("previous") { previous() }
+ HeadsetButtons.Action.SEEK_FORWARD, HeadsetButtons.Action.SEEK_BACK -> {
+ val delta = if (action == HeadsetButtons.Action.SEEK_FORWARD) HeadsetButtons.SKIP_MS else -HeadsetButtons.SKIP_MS
+ command(HeadsetButtons.logLine(cmd, episode, action)) { skipBy(delta) }
+ }
+ HeadsetButtons.Action.NONE -> Logbook.log("media session: " + HeadsetButtons.logLine(cmd, episode, action))
+ }
+ }
+
private val callback = object : MediaSessionCompat.Callback() {
override fun onPlay() = command("play") { play() }
override fun onPrepare() { Logbook.log("media session: prepare") }
override fun onPause() = command("pause", wake = false) { pause() }
- override fun onSkipToNext() = command("next") { next() }
- override fun onSkipToPrevious() = command("previous") { previous() }
+ override fun onSkipToNext() = headset(HeadsetButtons.Command.NEXT)
+ override fun onSkipToPrevious() = headset(HeadsetButtons.Command.PREVIOUS)
+ override fun onFastForward() = headset(HeadsetButtons.Command.FAST_FORWARD)
+ override fun onRewind() = headset(HeadsetButtons.Command.REWIND)
+ override fun onMediaButtonEvent(mediaButtonEvent: Intent): Boolean {
+ // Skip forward / backward keys (some earbuds, cars) have no callback of their own.
+ val event = androidx.core.content.IntentCompat.getParcelableExtra(mediaButtonEvent, Intent.EXTRA_KEY_EVENT, android.view.KeyEvent::class.java)
+ val mapped = event?.let { HeadsetButtons.commandOf(it.keyCode) }
+ if (event != null && mapped != null) {
+ if (event.action == android.view.KeyEvent.ACTION_DOWN && event.repeatCount == 0) headset(mapped)
+ return true
+ }
+ return super.onMediaButtonEvent(mediaButtonEvent)
+ }
override fun onSeekTo(pos: Long) = command("seek", wake = false) { seekTo(pos) }
override fun onStop() = command("stop", wake = false) { pause() }
override fun onPlayFromMediaId(mediaId: String, extras: Bundle?) = command("play $mediaId") { playFromMediaId(mediaId) }
@@ -248,12 +280,12 @@ class PlaybackService : MediaBrowserServiceCompat() {
else -> PlaybackStateCompat.STATE_PAUSED
}
session.setPlaybackState(PlaybackStateCompat.Builder()
- .setActions(ACTIONS)
+ .setActions(if (info.episode) ACTIONS or SKIP_ACTIONS else ACTIONS)
// Like on the left of previous / play / next, shuffle on the right: five buttons, so
// play / pause sits in the middle (lock screen, Samsung Now Bar, Android 13+ shade).
- .addCustomAction(ACTION_LIKE, if (info.liked) "Unlike" else "Like",
+ .addCustomAction(ACTION_LIKE, getString(if (info.liked) R.string.msp_unlike else R.string.msp_like),
if (info.liked) R.drawable.msp_ic_liked else R.drawable.msp_ic_like)
- .addCustomAction(ACTION_SHUFFLE, if (info.shuffle) "Shuffle off" else "Shuffle on",
+ .addCustomAction(ACTION_SHUFFLE, getString(if (info.shuffle) R.string.msp_shuffle_off else R.string.msp_shuffle_on),
if (info.shuffle) R.drawable.msp_ic_shuffle_on else R.drawable.msp_ic_shuffle)
.setState(state, info.positionMs, if (info.playing && !info.buffering) 1f else 0f)
.build())
@@ -397,6 +429,7 @@ class PlaybackService : MediaBrowserServiceCompat() {
private fun build(info: NowPlayingInfo?): Notification {
val playing = info?.playing == true
+ val episode = info?.episode == true
return NotificationCompat.Builder(this, CHANNEL_ID)
.setSmallIcon(R.drawable.msp_ic_notification)
.setContentTitle(info?.title ?: "")
@@ -408,12 +441,16 @@ class PlaybackService : MediaBrowserServiceCompat() {
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setOnlyAlertOnce(true)
.setOngoing(playing)
- .addAction(R.drawable.msp_ic_previous, "Previous",
- MediaButtonReceiver.buildMediaButtonPendingIntent(this, PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS))
- .addAction(if (playing) R.drawable.msp_ic_pause else R.drawable.msp_ic_play, if (playing) "Pause" else "Play",
+ .addAction(if (episode) R.drawable.msp_ic_replay_15 else R.drawable.msp_ic_previous,
+ getString(if (episode) R.string.msp_back_15 else R.string.msp_previous),
+ MediaButtonReceiver.buildMediaButtonPendingIntent(this,
+ if (episode) PlaybackStateCompat.ACTION_REWIND else PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS))
+ .addAction(if (playing) R.drawable.msp_ic_pause else R.drawable.msp_ic_play, getString(if (playing) R.string.msp_pause else R.string.msp_play),
MediaButtonReceiver.buildMediaButtonPendingIntent(this, PlaybackStateCompat.ACTION_PLAY_PAUSE))
- .addAction(R.drawable.msp_ic_next, "Next",
- MediaButtonReceiver.buildMediaButtonPendingIntent(this, PlaybackStateCompat.ACTION_SKIP_TO_NEXT))
+ .addAction(if (episode) R.drawable.msp_ic_forward_15 else R.drawable.msp_ic_next,
+ getString(if (episode) R.string.msp_forward_15 else R.string.msp_next),
+ MediaButtonReceiver.buildMediaButtonPendingIntent(this,
+ if (episode) PlaybackStateCompat.ACTION_FAST_FORWARD else PlaybackStateCompat.ACTION_SKIP_TO_NEXT))
.setStyle(MediaStyle().setMediaSession(session.sessionToken).setShowActionsInCompactView(0, 1, 2))
.build()
}
@@ -426,7 +463,7 @@ class PlaybackService : MediaBrowserServiceCompat() {
private fun createChannel() {
val manager = getSystemService(NotificationManager::class.java)
if (manager.getNotificationChannel(CHANNEL_ID) == null) {
- manager.createNotificationChannel(NotificationChannel(CHANNEL_ID, "Playback", NotificationManager.IMPORTANCE_LOW).apply {
+ manager.createNotificationChannel(NotificationChannel(CHANNEL_ID, getString(R.string.msp_channel_playback), NotificationManager.IMPORTANCE_LOW).apply {
setShowBadge(false)
})
}
@@ -532,6 +569,15 @@ class PlaybackService : MediaBrowserServiceCompat() {
fun setKeepsPlayingOnClose(context: Context, on: Boolean) =
context.getSharedPreferences(CLOSE_PREFS, Context.MODE_PRIVATE).edit().putBoolean(KEEP_PLAYING_KEY, on).apply()
+ private const val SKIP_KEY = "headset_skips_on_episodes"
+
+ /** Earbud next / previous skip 15 s on a podcast episode (default); off: next / previous episode. */
+ fun skipsOnEpisodes(context: Context): Boolean =
+ context.getSharedPreferences(CLOSE_PREFS, Context.MODE_PRIVATE).getBoolean(SKIP_KEY, true)
+
+ fun setSkipsOnEpisodes(context: Context, on: Boolean) =
+ context.getSharedPreferences(CLOSE_PREFS, Context.MODE_PRIVATE).edit().putBoolean(SKIP_KEY, on).apply()
+
const val ROOT_ID = "root"
/** Root for callers that may control playback but not browse (see onGetRoot). */
private const val EMPTY_ROOT_ID = "empty"
@@ -544,6 +590,8 @@ class PlaybackService : MediaBrowserServiceCompat() {
PlaybackStateCompat.ACTION_SKIP_TO_NEXT or PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS or
PlaybackStateCompat.ACTION_SEEK_TO or PlaybackStateCompat.ACTION_PLAY_FROM_MEDIA_ID or
PlaybackStateCompat.ACTION_PLAY_FROM_SEARCH
+ /** Added while an episode plays: the notification's 15 s buttons and the keys of the same name. */
+ private val SKIP_ACTIONS = PlaybackStateCompat.ACTION_FAST_FORWARD or PlaybackStateCompat.ACTION_REWIND
private val http = OkHttpClient()
/** The largest side kept for artwork: what Android's media controls expect (640 is Spotify's biggest cover). */
private const val COVER_MAX_PX = 640
diff --git a/base/host-android/src/main/res/drawable/msp_ic_forward_15.xml b/base/host-android/src/main/res/drawable/msp_ic_forward_15.xml
new file mode 100644
index 00000000..fd7b24eb
--- /dev/null
+++ b/base/host-android/src/main/res/drawable/msp_ic_forward_15.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
+ <path android:fillColor="#FFFFFFFF" android:pathData="M4,13c0,4.4 3.6,8 8,8s8,-3.6 8,-8h-2c0,3.3 -2.7,6 -6,6s-6,-2.7 -6,-6 2.7,-6 6,-6v4l5,-5 -5,-5v4c-4.4,0 -8,3.6 -8,8z" />
+ <path android:fillColor="#FFFFFFFF" android:pathData="M9.5,12h1v5h-1v-3.8l-1,0.4v-0.9zM11.5,12h3.5v1h-2.5v1h2.5v3h-3.5v-1h2.5v-1h-2.5z" />
+</vector>
diff --git a/base/host-android/src/main/res/drawable/msp_ic_replay_15.xml b/base/host-android/src/main/res/drawable/msp_ic_replay_15.xml
new file mode 100644
index 00000000..ffb18f3c
--- /dev/null
+++ b/base/host-android/src/main/res/drawable/msp_ic_replay_15.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
+ <group android:pivotX="12" android:scaleX="-1">
+ <path android:fillColor="#FFFFFFFF" android:pathData="M4,13c0,4.4 3.6,8 8,8s8,-3.6 8,-8h-2c0,3.3 -2.7,6 -6,6s-6,-2.7 -6,-6 2.7,-6 6,-6v4l5,-5 -5,-5v4c-4.4,0 -8,3.6 -8,8z" />
+ </group>
+ <path android:fillColor="#FFFFFFFF" android:pathData="M9.5,12h1v5h-1v-3.8l-1,0.4v-0.9zM11.5,12h3.5v1h-2.5v1h2.5v3h-3.5v-1h2.5v-1h-2.5z" />
+</vector>
diff --git a/base/host-android/src/main/res/values-de/strings.xml b/base/host-android/src/main/res/values-de/strings.xml
new file mode 100644
index 00000000..43488f95
--- /dev/null
+++ b/base/host-android/src/main/res/values-de/strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="msp_previous">Zurück</string>
+ <string name="msp_play">Wiedergabe</string>
+ <string name="msp_pause">Pause</string>
+ <string name="msp_next">Weiter</string>
+ <string name="msp_like">Gefällt mir</string>
+ <string name="msp_unlike">Gefällt mir nicht mehr</string>
+ <string name="msp_shuffle_on">Zufallswiedergabe an</string>
+ <string name="msp_shuffle_off">Zufallswiedergabe aus</string>
+ <string name="msp_channel_playback">Wiedergabe</string>
+ <string name="msp_back_15">15 Sekunden zurück</string>
+ <string name="msp_forward_15">15 Sekunden vor</string>
+</resources>
diff --git a/base/host-android/src/main/res/values-el/strings.xml b/base/host-android/src/main/res/values-el/strings.xml
new file mode 100644
index 00000000..c56dce49
--- /dev/null
+++ b/base/host-android/src/main/res/values-el/strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="msp_previous">Προηγούμενο</string>
+ <string name="msp_play">Αναπαραγωγή</string>
+ <string name="msp_pause">Παύση</string>
+ <string name="msp_next">Επόμενο</string>
+ <string name="msp_like">Μου αρέσει</string>
+ <string name="msp_unlike">Δεν μου αρέσει πια</string>
+ <string name="msp_shuffle_on">Τυχαία σειρά ενεργή</string>
+ <string name="msp_shuffle_off">Τυχαία σειρά ανενεργή</string>
+ <string name="msp_channel_playback">Αναπαραγωγή</string>
+ <string name="msp_back_15">Πίσω 15 δευτερόλεπτα</string>
+ <string name="msp_forward_15">Μπροστά 15 δευτερόλεπτα</string>
+</resources>
diff --git a/base/host-android/src/main/res/values-es/strings.xml b/base/host-android/src/main/res/values-es/strings.xml
new file mode 100644
index 00000000..f968617a
--- /dev/null
+++ b/base/host-android/src/main/res/values-es/strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="msp_previous">Anterior</string>
+ <string name="msp_play">Reproducir</string>
+ <string name="msp_pause">Pausa</string>
+ <string name="msp_next">Siguiente</string>
+ <string name="msp_like">Me gusta</string>
+ <string name="msp_unlike">Quitar Me gusta</string>
+ <string name="msp_shuffle_on">Aleatorio activado</string>
+ <string name="msp_shuffle_off">Aleatorio desactivado</string>
+ <string name="msp_channel_playback">Reproducción</string>
+ <string name="msp_back_15">Retroceder 15 segundos</string>
+ <string name="msp_forward_15">Avanzar 15 segundos</string>
+</resources>
diff --git a/base/host-android/src/main/res/values-fr/strings.xml b/base/host-android/src/main/res/values-fr/strings.xml
new file mode 100644
index 00000000..e8644ef2
--- /dev/null
+++ b/base/host-android/src/main/res/values-fr/strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="msp_previous">Précédent</string>
+ <string name="msp_play">Lecture</string>
+ <string name="msp_pause">Pause</string>
+ <string name="msp_next">Suivant</string>
+ <string name="msp_like">Aimer</string>
+ <string name="msp_unlike">Ne plus aimer</string>
+ <string name="msp_shuffle_on">Aléatoire activé</string>
+ <string name="msp_shuffle_off">Aléatoire désactivé</string>
+ <string name="msp_channel_playback">Lecture</string>
+ <string name="msp_back_15">Reculer de 15 secondes</string>
+ <string name="msp_forward_15">Avancer de 15 secondes</string>
+</resources>
diff --git a/base/host-android/src/main/res/values-it/strings.xml b/base/host-android/src/main/res/values-it/strings.xml
new file mode 100644
index 00000000..b16def6b
--- /dev/null
+++ b/base/host-android/src/main/res/values-it/strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="msp_previous">Precedente</string>
+ <string name="msp_play">Riproduci</string>
+ <string name="msp_pause">Pausa</string>
+ <string name="msp_next">Successivo</string>
+ <string name="msp_like">Mi piace</string>
+ <string name="msp_unlike">Non mi piace più</string>
+ <string name="msp_shuffle_on">Casuale attivo</string>
+ <string name="msp_shuffle_off">Casuale disattivo</string>
+ <string name="msp_channel_playback">Riproduzione</string>
+ <string name="msp_back_15">Indietro di 15 secondi</string>
+ <string name="msp_forward_15">Avanti di 15 secondi</string>
+</resources>
diff --git a/base/host-android/src/main/res/values-pl/strings.xml b/base/host-android/src/main/res/values-pl/strings.xml
new file mode 100644
index 00000000..6f555a68
--- /dev/null
+++ b/base/host-android/src/main/res/values-pl/strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="msp_previous">Poprzedni</string>
+ <string name="msp_play">Odtwarzaj</string>
+ <string name="msp_pause">Wstrzymaj</string>
+ <string name="msp_next">Następny</string>
+ <string name="msp_like">Polub</string>
+ <string name="msp_unlike">Cofnij polubienie</string>
+ <string name="msp_shuffle_on">Losowo włączone</string>
+ <string name="msp_shuffle_off">Losowo wyłączone</string>
+ <string name="msp_channel_playback">Odtwarzanie</string>
+ <string name="msp_back_15">Cofnij o 15 sekund</string>
+ <string name="msp_forward_15">Przewiń o 15 sekund</string>
+</resources>
diff --git a/base/host-android/src/main/res/values-pt/strings.xml b/base/host-android/src/main/res/values-pt/strings.xml
new file mode 100644
index 00000000..863fc991
--- /dev/null
+++ b/base/host-android/src/main/res/values-pt/strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="msp_previous">Anterior</string>
+ <string name="msp_play">Reproduzir</string>
+ <string name="msp_pause">Pausar</string>
+ <string name="msp_next">Próxima</string>
+ <string name="msp_like">Curtir</string>
+ <string name="msp_unlike">Descurtir</string>
+ <string name="msp_shuffle_on">Aleatório ativado</string>
+ <string name="msp_shuffle_off">Aleatório desativado</string>
+ <string name="msp_channel_playback">Reprodução</string>
+ <string name="msp_back_15">Recuar 15 segundos</string>
+ <string name="msp_forward_15">Avançar 15 segundos</string>
+</resources>
diff --git a/base/host-android/src/main/res/values-ru/strings.xml b/base/host-android/src/main/res/values-ru/strings.xml
new file mode 100644
index 00000000..7207c5cb
--- /dev/null
+++ b/base/host-android/src/main/res/values-ru/strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="msp_previous">Назад</string>
+ <string name="msp_play">Воспроизвести</string>
+ <string name="msp_pause">Пауза</string>
+ <string name="msp_next">Далее</string>
+ <string name="msp_like">Нравится</string>
+ <string name="msp_unlike">Убрать из любимых</string>
+ <string name="msp_shuffle_on">Перемешивание вкл.</string>
+ <string name="msp_shuffle_off">Перемешивание выкл.</string>
+ <string name="msp_channel_playback">Воспроизведение</string>
+ <string name="msp_back_15">Назад на 15 секунд</string>
+ <string name="msp_forward_15">Вперёд на 15 секунд</string>
+</resources>
diff --git a/base/host-android/src/main/res/values-zh/strings.xml b/base/host-android/src/main/res/values-zh/strings.xml
new file mode 100644
index 00000000..e35b2e64
--- /dev/null
+++ b/base/host-android/src/main/res/values-zh/strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="msp_previous">上一首</string>
+ <string name="msp_play">播放</string>
+ <string name="msp_pause">暂停</string>
+ <string name="msp_next">下一首</string>
+ <string name="msp_like">点赞</string>
+ <string name="msp_unlike">取消点赞</string>
+ <string name="msp_shuffle_on">随机播放已开</string>
+ <string name="msp_shuffle_off">随机播放已关</string>
+ <string name="msp_channel_playback">播放</string>
+ <string name="msp_back_15">后退 15 秒</string>
+ <string name="msp_forward_15">快进 15 秒</string>
+</resources>
diff --git a/base/host-android/src/main/res/values/strings.xml b/base/host-android/src/main/res/values/strings.xml
new file mode 100644
index 00000000..e818a753
--- /dev/null
+++ b/base/host-android/src/main/res/values/strings.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="msp_previous">Previous</string>
+ <string name="msp_play">Play</string>
+ <string name="msp_pause">Pause</string>
+ <string name="msp_next">Next</string>
+ <string name="msp_like">Like</string>
+ <string name="msp_unlike">Unlike</string>
+ <string name="msp_shuffle_on">Shuffle on</string>
+ <string name="msp_shuffle_off">Shuffle off</string>
+ <string name="msp_channel_playback">Playback</string>
+ <string name="msp_back_15">Back 15 seconds</string>
+ <string name="msp_forward_15">Forward 15 seconds</string>
+</resources>
diff --git a/base/host-android/src/test/kotlin/app/myspoti/host/android/HeadsetButtonsTest.kt b/base/host-android/src/test/kotlin/app/myspoti/host/android/HeadsetButtonsTest.kt
new file mode 100644
index 00000000..dc4428c1
--- /dev/null
+++ b/base/host-android/src/test/kotlin/app/myspoti/host/android/HeadsetButtonsTest.kt
@@ -0,0 +1,48 @@
+package app.myspoti.host.android
+
+import android.view.KeyEvent
+import app.myspoti.host.android.HeadsetButtons.Action
+import app.myspoti.host.android.HeadsetButtons.Command
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertNull
+import org.junit.Test
+
+class HeadsetButtonsTest {
+ @Test fun episodeSkipsFifteenSeconds() {
+ assertEquals(Action.SEEK_FORWARD, HeadsetButtons.map(true, true, Command.NEXT))
+ assertEquals(Action.SEEK_BACK, HeadsetButtons.map(true, true, Command.PREVIOUS))
+ assertEquals(Action.SEEK_FORWARD, HeadsetButtons.map(true, true, Command.FAST_FORWARD))
+ assertEquals(Action.SEEK_BACK, HeadsetButtons.map(true, true, Command.REWIND))
+ }
+
+ @Test fun episodeWithSettingOffKeepsEpisodeSkips() {
+ assertEquals(Action.NEXT, HeadsetButtons.map(true, false, Command.NEXT))
+ assertEquals(Action.PREVIOUS, HeadsetButtons.map(true, false, Command.PREVIOUS))
+ // The explicit fast-forward / rewind keys still seek.
+ assertEquals(Action.SEEK_FORWARD, HeadsetButtons.map(true, false, Command.FAST_FORWARD))
+ assertEquals(Action.SEEK_BACK, HeadsetButtons.map(true, false, Command.REWIND))
+ }
+
+ @Test fun musicIsUnchangedWhateverTheSetting() {
+ for (setting in listOf(true, false)) {
+ assertEquals(Action.NEXT, HeadsetButtons.map(false, setting, Command.NEXT))
+ assertEquals(Action.PREVIOUS, HeadsetButtons.map(false, setting, Command.PREVIOUS))
+ assertEquals(Action.NONE, HeadsetButtons.map(false, setting, Command.FAST_FORWARD))
+ assertEquals(Action.NONE, HeadsetButtons.map(false, setting, Command.REWIND))
+ }
+ }
+
+ @Test fun keycodes() {
+ assertEquals(Command.FAST_FORWARD, HeadsetButtons.commandOf(KeyEvent.KEYCODE_MEDIA_SKIP_FORWARD))
+ assertEquals(Command.FAST_FORWARD, HeadsetButtons.commandOf(KeyEvent.KEYCODE_MEDIA_FAST_FORWARD))
+ assertEquals(Command.REWIND, HeadsetButtons.commandOf(KeyEvent.KEYCODE_MEDIA_SKIP_BACKWARD))
+ assertEquals(Command.REWIND, HeadsetButtons.commandOf(KeyEvent.KEYCODE_MEDIA_REWIND))
+ assertNull(HeadsetButtons.commandOf(KeyEvent.KEYCODE_MEDIA_NEXT))
+ }
+
+ @Test fun logLines() {
+ assertEquals("next on episode -> +15 s", HeadsetButtons.logLine(Command.NEXT, true, Action.SEEK_FORWARD))
+ assertEquals("previous on episode -> -15 s", HeadsetButtons.logLine(Command.PREVIOUS, true, Action.SEEK_BACK))
+ assertEquals("next", HeadsetButtons.logLine(Command.NEXT, false, Action.NEXT))
+ }
+}
diff --git a/docs/extensions/API.md b/docs/extensions/API.md
index efdb7174..31d8b917 100644
--- a/docs/extensions/API.md
+++ b/docs/extensions/API.md
@@ -94,8 +94,8 @@ switch and action icons, in the user's order (arrows; installation order until m
is the one the area asks them in (section 3) and the one the playback arbiter uses. The Built-in row says in
one plain sentence what the app already does there; an area no extension acts in says "No
extension — the app already does: …". Nothing is ever installed without the install prompt, and
-the samples in `docs/extensions/samples` are for authors only. An exclusive
-action shows which extension is **Active** and which are **Idle**. Under each area, the last things
+the samples in `docs/extensions/samples` are for authors only. Audio and download sources are
+ordered in Settings (Playback, Downloads). Under each area, the last things
extensions did there ("Lyrics of X from Y", "Skipped by Z") with a one-tap Turn off.
## 2. Manifest
@@ -188,7 +188,7 @@ player.buttons action in the manifest`):
The lyrics, song details, Home, search, menu and player hooks are **additive**: every extension is
asked, the answers merged in the area's order (lyrics: the best, ties to the higher one). Audio and
-downloads are **exclusive**: only the active extension of the area is asked (section 4.2). Registering twice replaces. Returning
+downloads are **ordered**: asked one after the other in the user's order until one answers (section 4.2). Registering twice replaces. Returning
`null`/`undefined` means "no answer": the app goes on without this extension. A throw or a timeout
is a failure (recorded as the extension's last error, shown on its page). Calls are synchronous:
return the answer, do not return a promise.
@@ -227,8 +227,8 @@ Action: `lyrics.provide` (normal). Usually you also need `network`.
### `audio-source`
Where the audio of a song is. The song then plays in Myspoti's own player, like a download;
-Spotify's player does not play it. Action: `audio.source` (critical, exclusive: one active
-extension).
+Spotify's player does not play it. Action: `audio.source` (critical, ordered: the sources are
+asked in the user's order, Spotify included; the ones under Spotify are not asked).
```js
{ url: 'https://cdn.example.com/a.m4a', // http or https, not a local address; required
@@ -304,7 +304,7 @@ what you hand over: it downloads the file, runs the same checks on any file what
recording: if you want that check (an official preview, a fingerprint), do it in the extension
before answering, and say `isrcMatched` only for a file you found by the song's ISRC. Without an
extension providing this hook, downloads tell the user to install one. Action: `download.source`
-(critical, exclusive: one active extension).
+(critical, ordered: asked in the user's order until one has the song).
The input is the track of this section plus `quality`, what the user asked for:
@@ -568,7 +568,7 @@ myspoti.on('setting', function (e) {
The closed catalogue. The icon is the Material Rounded icon the app draws; the user sees the icon,
the label and your `why`. **Critical** actions are shown in the warning colour and explained; the
app frames them at run time (destructive Spotify writes are confirmed one by one, section 6; audio
-and downloads are exclusive; pages are locked down, sign-in pages have their own profile). The sandbox enforces exactly what the manifest
+and downloads are asked in the user's order; pages are locked down, sign-in pages have their own profile). The sandbox enforces exactly what the manifest
declares: a call outside it throws (`"x is not in this extension's manifest (actions)"`). The user
cannot untick single actions: installing grants all of them. An extension installed by an older
Myspoti that let the user untick some stays off, with a "Waits for your OK" card on its page,
@@ -581,8 +581,8 @@ until the user accepts them all with the same tick.
| `playback.events` | GraphicEq | Know what you play | normal | shared | `myspoti.player.current()`, `myspoti.on('track' \| 'playback')`, `spotify.player` state, queue, volume, media (`myspoti.spotify.media`) |
| `lyrics.provide` | Lyrics | Provide lyrics | normal | additive, takeover | `lyrics` hook |
| `trackinfo.provide` | Info | Add song details | normal | additive, takeover | `trackinfo` hook |
-| `audio.source` | Headphones | Play audio from elsewhere | **critical** | exclusive, takeover | `audio-source` hook |
-| `download.source` | Download | Provide downloads | **critical** | exclusive, takeover | `download-source` hook |
+| `audio.source` | Headphones | Play audio from elsewhere | **critical** | ordered, takeover | `audio-source` hook |
+| `download.source` | Download | Provide downloads | **critical** | ordered, takeover | `download-source` hook |
| `home.sections` | Dashboard | Add Home sections | normal | additive, takeover | `home` hook |
| `search.provide` | ManageSearch | Add search results | normal | additive, takeover | `search` hook |
| `menu.items` | MoreHoriz | Add menu entries | normal | additive, takeover | `menu` hook |
@@ -616,10 +616,10 @@ migrated the same way when the app starts.
- **Additive** actions (lyrics, song details, Home, search, menus, player): every extension adds;
answers are merged in the area's order, duplicates dropped, quotas per extension (section 3).
-- **Exclusive** actions (`audio.source`, `download.source`): one extension acts per action, the one
- the user made active (else the first in the area). Installing or turning on a second says
- "Replaces *song audio*, currently provided by Y" and the user picks; the other stays installed,
- idle, and can be made active again from the Installed tab.
+- **Ordered** actions (`audio.source`, `download.source`): every source is asked in the order the
+ user sets in Settings (Playback, Downloads), each action its own order, until one answers. A new
+ source goes last; installing a second one asks nothing. For audio, Spotify has its place in the
+ order too (last until moved): the sources under it are not asked.
- `conflictsWith` / `replaces`: "Incompatible with X (installed)" / "Replaces X (installed)" in the
store, and the install or turn-on prompt asks which to keep; the one not kept is turned off (or the
new one installs turned off).
@@ -854,7 +854,7 @@ type means optional/nullable. Returns of "—" mean `null`.
| `skipTo(item: {uri,uid?})` | — | write | |
| `moveInQueue(item: {uri,uid?}, target: {uri,uid?}, after = false)` | — | write | |
| `setVolume(level: number)` | — | write | |
-| `setLocalMute(on: boolean)` | — | write | Keeps the Web Player playing but unheard (`myspoti.features` has `player.localMute`). While on, the app ignores the Web Player's state, so an extension playing a file itself can mirror the same track there without being replaced. Cleared when the local player stops. |
+| `setLocalMute(on: boolean)` | `playback.mirror` (critical) | write | Keeps Spotify playing unheard on this phone (`myspoti.features` has `player.localMute` only when the user granted `playback.mirror`). It can keep Spotify playing silently and counts listens on the user's Spotify account, so the user ticks the accept-risk box. Host rules, whatever the script does: honoured only while Myspoti's own local / extension player is playing; one extension at a time; at most one enable per 20 s; cleared by itself on track change, local pause or stop, the local track's duration, and when the extension is disabled, uninstalled, blocked or crashes. Both players show "Spotify mirrored by <extension>", and the Activity log and Logbook record each enable and clear. Existing installs do not have it until the user accepts the action through the update / consent flow. |
| `setSpeed(speed: number)` | — | write | |
`media(trackUri)` (also `myspoti.spotify.media(trackUri)`) returns the media manifest Spotify sent the
@@ -1303,3 +1303,8 @@ the extension to `blocked.json` (turned off on every phone, with the reason) or
from the store); see `POLICY.md` and `REPORTING.md` in that repository. The same repository can also
list "verified" extensions in its `index.json` (optional, the owner's choice; the app shows it in the
store only when it lists at least one).
+
+
+### `raw.request` "Always allow" is per operation
+
+A write the user allows for good is a grant on method + host + path pattern. On a multiplexed endpoint (GraphQL / pathfinder, or any request whose JSON body carries `operationName` or a persisted-query `sha256Hash`) the grant also names that operation: it never covers another one. If no operation can be determined from the body on such an endpoint, "Always allow" is not offered and the user is asked each time. The consent shows the real operation, and the revocation list shows it too (`POST https://host/path [operation name]`). Grants stored before this change on such endpoints without an operation were dropped (the user is asked again). Writes declared in the manifest (`writes`) on a multiplexed path cannot cover operations; the user is asked.