From 240f7521c82f693863b3ba398d2a75a2d3b67399 Mon Sep 17 00:00:00 2001 From: Tom Briden Date: Wed, 5 Jun 2013 08:30:25 +0100 Subject: open the offline scrobbles file in append mode, d'oh --- .../src/github/daneren2005/dsub/service/OfflineMusicService.java | 2 +- .../src/github/daneren2005/dsub/service/RESTMusicService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'subsonic-android') diff --git a/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java index 83c7f960..b8050bb2 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java @@ -446,7 +446,7 @@ public class OfflineMusicService extends RESTMusicService { scrobbleSearchCriteria = scrobbleSearchCriteria.replace(".complete", "").replace(".partial", ""); scrobbleSearchCriteria = scrobbleSearchCriteria.replace("/", " ").replace("-", "\\-").replace(".", "\\."); - BufferedWriter bw = new BufferedWriter(new FileWriter(offlineScrobblesFile)); + BufferedWriter bw = new BufferedWriter(new FileWriter(offlineScrobblesFile, true)); bw.write(scrobbleSearchCriteria + "," + System.currentTimeMillis()); bw.newLine(); bw.flush(); diff --git a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java index be0763e7..ce17754a 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -196,7 +196,7 @@ public class RESTMusicService implements MusicService { } catch(Exception e){ Log.e(TAG, e.toString()); - BufferedWriter bw = new BufferedWriter(new FileWriter(offlineScrobblesFile)); + BufferedWriter bw = new BufferedWriter(new FileWriter(offlineScrobblesFile, true)); bw.write(line); bw.newLine(); bw.flush(); -- cgit v1.2.3