aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-11-15 00:01:44 -0800
committerScott Jackson <daneren2005@gmail.com>2013-11-15 00:01:44 -0800
commit22a88ac31554301346ac20223bc22b949b1c344e (patch)
treee485caa9df13004c062b4b1427372d87825d1d37
parentd3993fc46d8efb9792a3cb64262b20a2b8e6b586 (diff)
downloaddsub-22a88ac31554301346ac20223bc22b949b1c344e.tar.gz
dsub-22a88ac31554301346ac20223bc22b949b1c344e.tar.bz2
dsub-22a88ac31554301346ac20223bc22b949b1c344e.zip
Fix web commits
-rw-r--r--src/github/daneren2005/dsub/activity/SettingsActivity.java1
-rw-r--r--src/github/daneren2005/dsub/service/CachedMusicService.java2
-rw-r--r--src/github/daneren2005/dsub/service/MusicService.java2
-rw-r--r--src/github/daneren2005/dsub/service/OfflineMusicService.java4
-rw-r--r--src/github/daneren2005/dsub/service/RESTMusicService.java6
-rw-r--r--src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java6
6 files changed, 13 insertions, 8 deletions
diff --git a/src/github/daneren2005/dsub/activity/SettingsActivity.java b/src/github/daneren2005/dsub/activity/SettingsActivity.java
index 6bf3dde4..a57ac382 100644
--- a/src/github/daneren2005/dsub/activity/SettingsActivity.java
+++ b/src/github/daneren2005/dsub/activity/SettingsActivity.java
@@ -292,6 +292,7 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer
bufferLength.setSummary(bufferLength.getText() + " seconds");
chatRefreshRate.setSummary(chatRefreshRate.getText());
videoPlayer.setSummary(videoPlayer.getEntry());
+ syncInterval.setSummary(syncInterval.getEntry());
for (ServerSettings ss : serverSettings.values()) {
ss.update();
}
diff --git a/src/github/daneren2005/dsub/service/CachedMusicService.java b/src/github/daneren2005/dsub/service/CachedMusicService.java
index 29af6426..4d7ddb7e 100644
--- a/src/github/daneren2005/dsub/service/CachedMusicService.java
+++ b/src/github/daneren2005/dsub/service/CachedMusicService.java
@@ -431,7 +431,7 @@ public class CachedMusicService implements MusicService {
}
@Override
- public void setInstance(Integer instance) {
+ public void setInstance(Integer instance) throws Exception {
musicService.setInstance(instance);
}
diff --git a/src/github/daneren2005/dsub/service/MusicService.java b/src/github/daneren2005/dsub/service/MusicService.java
index a572d7e2..b5b37354 100644
--- a/src/github/daneren2005/dsub/service/MusicService.java
+++ b/src/github/daneren2005/dsub/service/MusicService.java
@@ -147,5 +147,5 @@ public interface MusicService {
int processOfflineSyncs(final Context context, final ProgressListener progressListener) throws Exception;
- void setInstance(Integer instance);
+ void setInstance(Integer instance) throws Exception;
}
diff --git a/src/github/daneren2005/dsub/service/OfflineMusicService.java b/src/github/daneren2005/dsub/service/OfflineMusicService.java
index 802ac32d..3386af70 100644
--- a/src/github/daneren2005/dsub/service/OfflineMusicService.java
+++ b/src/github/daneren2005/dsub/service/OfflineMusicService.java
@@ -662,8 +662,8 @@ public class OfflineMusicService extends RESTMusicService {
}
@Override
- public void setInstance(Integer instance) {
- throw new OfflinceException("Offline servers only have one instance");
+ public void setInstance(Integer instance) throws Exception{
+ throw new OfflineException("Offline servers only have one instance");
}
private void listFilesRecursively(File parent, List<File> children) {
diff --git a/src/github/daneren2005/dsub/service/RESTMusicService.java b/src/github/daneren2005/dsub/service/RESTMusicService.java
index 3f3152c2..c96f3569 100644
--- a/src/github/daneren2005/dsub/service/RESTMusicService.java
+++ b/src/github/daneren2005/dsub/service/RESTMusicService.java
@@ -1116,7 +1116,7 @@ public class RESTMusicService implements MusicService {
}
@Override
- public void setInstance(Integer instance) {
+ public void setInstance(Integer instance) throws Exception {
this.instance = instance;
}
@@ -1325,9 +1325,9 @@ public class RESTMusicService implements MusicService {
private String getRestUrl(Context context, String method) {
if(instance == null) {
- Util.getRestUrl(context, method);
+ return Util.getRestUrl(context, method);
} else {
- Util.getRestUrl(context, method, instance);
+ return Util.getRestUrl(context, method, instance);
}
}
}
diff --git a/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java b/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java
index 4073b1b3..71b7ae04 100644
--- a/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java
+++ b/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java
@@ -24,6 +24,7 @@ import android.annotation.TargetApi;
import android.content.AbstractThreadedSyncAdapter;
import android.content.ContentProviderClient;
import android.content.Context;
+import android.content.SharedPreferences;
import android.content.SyncResult;
import android.os.Bundle;
import android.net.ConnectivityManager;
@@ -31,6 +32,7 @@ import android.net.NetworkInfo;
import android.util.Log;
import github.daneren2005.dsub.service.RESTMusicService;
+import github.daneren2005.dsub.util.Constants;
import github.daneren2005.dsub.util.Util;
/**
@@ -40,13 +42,15 @@ import github.daneren2005.dsub.util.Util;
public class SubsonicSyncAdapter extends AbstractThreadedSyncAdapter {
private static final String TAG = SubsonicSyncAdapter.class.getSimpleName();
protected RESTMusicService musicService = new RESTMusicService();
+ private Context context;
public SubsonicSyncAdapter(Context context, boolean autoInitialize) {
super(context, autoInitialize);
}
@TargetApi(14)
- public SubsonicSyncSyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs) {
+ public SubsonicSyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs) {
super(context, autoInitialize, allowParallelSyncs);
+ this.context = context;
}
@Override