Unblocklist spotify custom actions

This commit is contained in:
MM20 2024-05-03 11:13:45 +02:00
parent 7ee5bd5c61
commit b5aa35ed70
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -23,12 +23,6 @@ data class SupportedActions(
seekTo = actions?.and(PlaybackState.ACTION_SEEK_TO) == PlaybackState.ACTION_SEEK_TO,
setPlaybackSpeed = actions?.and(PlaybackState.ACTION_SET_PLAYBACK_SPEED) == PlaybackState.ACTION_SET_PLAYBACK_SPEED,
setRating = actions?.and(PlaybackState.ACTION_SET_RATING) == PlaybackState.ACTION_SET_RATING,
customActions = customActions?.filter {
// Most of Spotify's custom actions are known to be broken, blocklist them in release builds
if (!BuildConfig.DEBUG && playerPackege == "com.spotify.music") {
return@filter (it.action == "REMOVE_FROM_COLLECTION" || it.action == "ADD_TO_COLLECTION")
}
true
} ?: emptyList(),
customActions = customActions ?: emptyList(),
)
}