mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
Add song/genre sync
This commit is contained in:
parent
b2c269a051
commit
76037e487b
47 changed files with 703 additions and 89 deletions
|
|
@ -11,8 +11,10 @@ public class PreferenceUtil {
|
|||
public static final String SERVER = "server";
|
||||
public static final String USER = "user";
|
||||
public static final String TOKEN = "token";
|
||||
public static final String MUSIC_LIBRARY_ID = "music_library_id";
|
||||
|
||||
public static final String SYNC = "sync";
|
||||
public static final String SONG_GENRE_SYNC = "song_genre_sync";
|
||||
|
||||
public static final String HOST_URL = "host";
|
||||
public static final String IMAGE_CACHE_SIZE = "image_cache_size";
|
||||
|
|
@ -75,6 +77,26 @@ public class PreferenceUtil {
|
|||
editor.apply();
|
||||
}
|
||||
|
||||
public Boolean getSongGenreSync() {
|
||||
return mPreferences.getBoolean(SONG_GENRE_SYNC, false);
|
||||
}
|
||||
|
||||
public void setSongGenreSync(Boolean sync) {
|
||||
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||
editor.putBoolean(SONG_GENRE_SYNC, sync);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public String getMusicLibraryID() {
|
||||
return mPreferences.getString(MUSIC_LIBRARY_ID, "");
|
||||
}
|
||||
|
||||
public void setMusicLibraryID(String musicLibraryID) {
|
||||
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||
editor.putString(MUSIC_LIBRARY_ID, musicLibraryID);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public final String getHostUrl() {
|
||||
return mPreferences.getString(HOST_URL, "undefined");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue