diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-08-14 14:27:15 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-08-14 14:27:15 -0700 |
commit | 24e8d038e9cc2aa18c14a6f4790acd758fc47aad (patch) | |
tree | 2cf0b937278052a1bf8e6214eb55bcbe887cd078 | |
parent | d818fe58d1324936784670b72c0de8e742d46aed (diff) | |
download | dsub-24e8d038e9cc2aa18c14a6f4790acd758fc47aad.tar.gz dsub-24e8d038e9cc2aa18c14a6f4790acd758fc47aad.tar.bz2 dsub-24e8d038e9cc2aa18c14a6f4790acd758fc47aad.zip |
Persist suggested playlist name/id between sessions
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadService.java | 8 |
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() { |