diff options
author | Tom Briden <tom.briden@veritape.com> | 2013-06-05 14:25:19 +0100 |
---|---|---|
committer | Tom Briden <tom.briden@veritape.com> | 2013-06-05 14:25:19 +0100 |
commit | e6413a84ece8dd70bf09b505da8a339b49a1ea5e (patch) | |
tree | 95172f817158f90374cd76fc121fe2cfe905daa2 | |
parent | f313378bc3ddc4023b50c9e8fa0af4b72f34cc7c (diff) | |
download | dsub-e6413a84ece8dd70bf09b505da8a339b49a1ea5e.tar.gz dsub-e6413a84ece8dd70bf09b505da8a339b49a1ea5e.tar.bz2 dsub-e6413a84ece8dd70bf09b505da8a339b49a1ea5e.zip |
throw exception if song not found so it can be put back on the list
removed unneeded log line
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java | 4 |
1 files changed, 3 insertions, 1 deletions
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()); |