aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-08-12 16:14:19 -0700
committerScott Jackson <daneren2005@gmail.com>2014-08-12 16:14:19 -0700
commit39d06f32e465e53dbf8d07dc5378ef46c4d43478 (patch)
treedb9d5df2add81c876bed82785f60df89f5dc419e /src/github
parent6e5d2b00bf90cd752aca6a41dfc697b058cde3c6 (diff)
downloaddsub-39d06f32e465e53dbf8d07dc5378ef46c4d43478.tar.gz
dsub-39d06f32e465e53dbf8d07dc5378ef46c4d43478.tar.bz2
dsub-39d06f32e465e53dbf8d07dc5378ef46c4d43478.zip
Add musicFolderId to list of cleanup fields when removing a server
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/util/Util.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/util/Util.java b/src/github/daneren2005/dsub/util/Util.java
index edfa5555..844face3 100644
--- a/src/github/daneren2005/dsub/util/Util.java
+++ b/src/github/daneren2005/dsub/util/Util.java
@@ -183,23 +183,30 @@ public final class Util {
int newInstance = instance + 1;
+ // Get what the +1 server details are
String server = prefs.getString(Constants.PREFERENCES_KEY_SERVER_KEY + newInstance, null);
String serverName = prefs.getString(Constants.PREFERENCES_KEY_SERVER_NAME + newInstance, null);
String serverUrl = prefs.getString(Constants.PREFERENCES_KEY_SERVER_URL + newInstance, null);
String userName = prefs.getString(Constants.PREFERENCES_KEY_USERNAME + newInstance, null);
String password = prefs.getString(Constants.PREFERENCES_KEY_PASSWORD + newInstance, null);
+ String musicFolderId = prefs.getString(Constants.PREFERENCES_KEY_MUSIC_FOLDER_ID + newInstance, null);
+ // Store the +1 server details in the to be deleted instance
editor.putString(Constants.PREFERENCES_KEY_SERVER_KEY + instance, server);
editor.putString(Constants.PREFERENCES_KEY_SERVER_NAME + instance, serverName);
editor.putString(Constants.PREFERENCES_KEY_SERVER_URL + instance, serverUrl);
editor.putString(Constants.PREFERENCES_KEY_USERNAME + instance, userName);
editor.putString(Constants.PREFERENCES_KEY_PASSWORD + instance, password);
+ editor.putString(Constants.PREFERENCES_KEY_MUSIC_FOLDER_ID + instance, musicFolderId);
+ // Delete the +1 server instance
+ // Calling method will loop up to fill this in if +2 server exists
editor.putString(Constants.PREFERENCES_KEY_SERVER_KEY + newInstance, null);
editor.putString(Constants.PREFERENCES_KEY_SERVER_NAME + newInstance, null);
editor.putString(Constants.PREFERENCES_KEY_SERVER_URL + newInstance, null);
editor.putString(Constants.PREFERENCES_KEY_USERNAME + newInstance, null);
editor.putString(Constants.PREFERENCES_KEY_PASSWORD + newInstance, null);
+ editor.putString(Constants.PREFERENCES_KEY_MUSIC_FOLDER_ID + newInstance, null);
editor.commit();
if (instance == activeInstance) {