aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-08-14 14:27:15 -0700
committerScott Jackson <daneren2005@gmail.com>2014-08-14 14:27:15 -0700
commit24e8d038e9cc2aa18c14a6f4790acd758fc47aad (patch)
tree2cf0b937278052a1bf8e6214eb55bcbe887cd078 /src
parentd818fe58d1324936784670b72c0de8e742d46aed (diff)
downloaddsub-24e8d038e9cc2aa18c14a6f4790acd758fc47aad.tar.gz
dsub-24e8d038e9cc2aa18c14a6f4790acd758fc47aad.tar.bz2
dsub-24e8d038e9cc2aa18c14a6f4790acd758fc47aad.zip
Persist suggested playlist name/id between sessions
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/service/DownloadService.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java
index 5f58e7fa..76e2dd89 100644
--- a/src/github/daneren2005/dsub/service/DownloadService.java
+++ b/src/github/daneren2005/dsub/service/DownloadService.java
@@ -409,6 +409,9 @@ public class DownloadService extends Service {
this.toDelete.add(forSong(entry));
}
}
+
+ suggestedPlaylistName = prefs.getString(Constants.PREFERENCES_KEY_PLAYLIST_NAME, null);
+ suggestedPlaylistId = prefs.getString(Constants.PREFERENCES_KEY_PLAYLIST_ID, null);
}
public synchronized void setRemovePlayed(boolean enabled) {
@@ -1152,6 +1155,11 @@ public class DownloadService extends Service {
public void setSuggestedPlaylistName(String name, String id) {
this.suggestedPlaylistName = name;
this.suggestedPlaylistId = id;
+
+ SharedPreferences.Editor editor = Util.getPreferences(this).edit();
+ editor.putString(Constants.PREFERENCES_KEY_PLAYLIST_NAME, name);
+ editor.putString(Constants.PREFERENCES_KEY_PLAYLIST_ID, id);
+ editor.commit();
}
public String getSuggestedPlaylistName() {