From e6413a84ece8dd70bf09b505da8a339b49a1ea5e Mon Sep 17 00:00:00 2001 From: Tom Briden Date: Wed, 5 Jun 2013 14:25:19 +0100 Subject: throw exception if song not found so it can be put back on the list removed unneeded log line --- .../src/github/daneren2005/dsub/service/RESTMusicService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java index ce17754a..e0bffc57 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -183,7 +183,6 @@ public class RESTMusicService implements MusicService { line = lines.get(i); String filename = line.substring(0, line.lastIndexOf(',')); - Log.i(TAG, "Searching for id of file" + filename); try{ long time = Long.parseLong(line.substring(line.lastIndexOf(',')+1)); SearchCritera critera = new SearchCritera(filename, 0, 0, 1); @@ -193,6 +192,9 @@ public class RESTMusicService implements MusicService { Log.i(TAG, "Scrobbling " + result.getSongs().get(0).getId() + " with time " + time); scrobble(result.getSongs().get(0).getId(), true, time, context, progressListener); } + else{ + throw new Exception("Song not found on server"); + } } catch(Exception e){ Log.e(TAG, e.toString()); -- cgit v1.2.3