Android 2.0.5: ListenBrainz and a scrobble queue that can't get stuck

- Connect ListenBrainz with a user token (checked), disconnect, send now
- Listens carry MusicBrainz ids, ISRC, disc, tags, release artist read from the file
- Last.fm: dead sessions sign out and keep the queue; rejected data is dropped;
  >14-day-old scrobbles dropped; recording MBID sent
- Each service flushes on its own

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
astar76 2026-12-03 08:33:13 -06:00
commit c0dc2c68c3

View file

@ -1753,7 +1753,7 @@ public class MainActivity extends Activity implements MusicService.Listener, Lib
Song songCurrent = this.svc.current();
boolean z = !PlayStats.fav(songCurrent);
PlayStats.setFav(songCurrent, z);
if (z && LastFm.enabled()) {
if (z && LastFm.anyOn()) {
LastFm.love(songCurrent, true);
}
this.svc.refreshUi();
@ -1795,12 +1795,12 @@ public class MainActivity extends Activity implements MusicService.Listener, Lib
MainActivity.this.sleepTimer();
}
}));
if (LastFm.enabled()) {
arrayList.add(new Lists.Item(R.drawable.ic_favorite, "Love on Last.fm", new Runnable() { // from class: com.mulberry.player.MainActivity.85
if (LastFm.anyOn()) {
arrayList.add(new Lists.Item(R.drawable.ic_favorite, LastFm.enabled() ? "Love on Last.fm" : "Love on ListenBrainz", new Runnable() { // from class: com.mulberry.player.MainActivity.85
@Override // java.lang.Runnable
public void run() {
LastFm.love(songCurrent, true);
MainActivity.toast("Loved on Last.fm");
MainActivity.toast("Loved");
}
}));
}