diff --git a/app/src/main/java/com/cappielloantonio/tempo/service/MediaManager.java b/app/src/main/java/com/cappielloantonio/tempo/service/MediaManager.java
index d595947e..b27b88a8 100644
--- a/app/src/main/java/com/cappielloantonio/tempo/service/MediaManager.java
+++ b/app/src/main/java/com/cappielloantonio/tempo/service/MediaManager.java
@@ -12,6 +12,7 @@ import com.cappielloantonio.tempo.subsonic.models.Child;
import com.cappielloantonio.tempo.subsonic.models.InternetRadioStation;
import com.cappielloantonio.tempo.subsonic.models.PodcastEpisode;
import com.cappielloantonio.tempo.util.MappingUtil;
+import com.cappielloantonio.tempo.util.Preferences;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
@@ -293,7 +294,7 @@ public class MediaManager {
}
public static void scrobble(MediaItem mediaItem) {
- if (mediaItem != null) {
+ if (mediaItem != null && Preferences.isScrobblingEnabled()) {
getSongRepository().scrobble(mediaItem.mediaMetadata.extras.getString("id"));
}
}
diff --git a/app/src/main/java/com/cappielloantonio/tempo/util/Preferences.kt b/app/src/main/java/com/cappielloantonio/tempo/util/Preferences.kt
index 985ccc32..578b9fd0 100644
--- a/app/src/main/java/com/cappielloantonio/tempo/util/Preferences.kt
+++ b/app/src/main/java/com/cappielloantonio/tempo/util/Preferences.kt
@@ -40,6 +40,7 @@ object Preferences {
private const val MAX_BITRATE_DOWNLOAD = "max_bitrate_download"
private const val AUDIO_TRANSCODE_FORMAT_DOWNLOAD = "audio_transcode_format_download"
private const val SHARE = "share"
+ private const val SCROBBLING = "scrobbling"
private const val ESTIMATE_CONTENT_LENGTH = "estimate_content_length"
@JvmStatic
@@ -321,6 +322,11 @@ object Preferences {
return App.getInstance().preferences.getBoolean(SHARE, false)
}
+ @JvmStatic
+ fun isScrobblingEnabled(): Boolean {
+ return App.getInstance().preferences.getBoolean(SCROBBLING, true)
+ }
+
@JvmStatic
fun askForEstimateContentLength(): Boolean {
return App.getInstance().preferences.getBoolean(ESTIMATE_CONTENT_LENGTH, false)
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index d507b68a..df930e18 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -269,8 +269,11 @@
Sets the magnitude of the curvature angle.
If enabled, sets a curvature angle for all rendered covers. The changes will take effect on restart.
Scan library
+ Enable music scrobbling
Enable music sharing
+ It\'s important to note that scrobbling also relies on the server being enabled to receive this data.
Replay gain is a feature that allows you to adjust the volume level of audio tracks for a consistent listening experience. This setting is only effective if the track contains the necessary metadata.
+ Scrobbling is a feature that allows your device to send information about the songs you listen to the music server. This information helps create personalized recommendations based on your music preferences.
Allows the user to share music via a link. The functionality must be supported and enabled server-side and is limited to individual tracks, albums and playlists.
Returns the state of the play queue for this user. This includes the tracks in the play queue, the currently playing track, and the position within this track. The server must support this feature.
Priority given to the transcoding mode. If set to \"Direct play\" the bitrate of the file will not be changed.
@@ -282,6 +285,7 @@
Data
General
Replay Gain
+ Scrobble
Share
Syncing
Transcoding
diff --git a/app/src/main/res/xml/global_preferences.xml b/app/src/main/res/xml/global_preferences.xml
index d1b0cb0f..9529326d 100644
--- a/app/src/main/res/xml/global_preferences.xml
+++ b/app/src/main/res/xml/global_preferences.xml
@@ -222,6 +222,22 @@
+
+
+
+
+
+
+
+
+