aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-02-28 13:56:23 -0800
committerScott Jackson <daneren2005@gmail.com>2014-02-28 13:56:23 -0800
commit176b820d8ac3b744145291e9f2295120f88ae0a2 (patch)
treebfccb8dcff8b6e0247b447fd3e2166902cd77343 /src/github
parent9bff3b624fd14b58dcf53cbf6cd71b741a1ad536 (diff)
downloaddsub-176b820d8ac3b744145291e9f2295120f88ae0a2.tar.gz
dsub-176b820d8ac3b744145291e9f2295120f88ae0a2.tar.bz2
dsub-176b820d8ac3b744145291e9f2295120f88ae0a2.zip
Auto scan for new results on Madsonic servers
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/service/RESTMusicService.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/service/RESTMusicService.java b/src/github/daneren2005/dsub/service/RESTMusicService.java
index 354cd145..6c4872e9 100644
--- a/src/github/daneren2005/dsub/service/RESTMusicService.java
+++ b/src/github/daneren2005/dsub/service/RESTMusicService.java
@@ -203,6 +203,18 @@ public class RESTMusicService implements MusicService {
return cachedIndexes;
}
+ // If manual refresh, try to start server scan for madsonic servers
+ if(refresh) {
+ Reader reader = getReader(context, progressListener, "startRescan", null);
+ try {
+ new ErrorParser(context).parse(reader);
+ } catch(Exception e) {
+ // Probably not madsonic, don't care
+ } finally {
+ Util.close(reader);
+ }
+ }
+
long lastModified = (cachedIndexes == null || refresh) ? 0L : cachedIndexes.getLastModified();
List<String> parameterNames = new ArrayList<String>();