mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
feat: implemented the ability to choose external storage (if available) as storage for offline file downloads
This commit is contained in:
parent
838d4496e5
commit
5733dca68a
9 changed files with 214 additions and 9 deletions
|
|
@ -33,6 +33,7 @@ object Preferences {
|
|||
private const val MUSIC_DIRECTORY_SECTION_VISIBILITY = "music_directory_section_visibility"
|
||||
private const val REPLAY_GAIN_MODE = "replay_gain_mode"
|
||||
private const val AUDIO_TRANSCODE_PRIORITY = "audio_transcode_priority"
|
||||
private const val DOWNLOAD_STORAGE = "download_storage"
|
||||
|
||||
@JvmStatic
|
||||
fun getServer(): String? {
|
||||
|
|
@ -258,4 +259,17 @@ object Preferences {
|
|||
fun isServerPrioritized(): Boolean {
|
||||
return App.getInstance().preferences.getBoolean(AUDIO_TRANSCODE_PRIORITY, false)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getDownloadStoragePreference(): Int {
|
||||
return App.getInstance().preferences.getString(DOWNLOAD_STORAGE, "0")!!.toInt()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun setDownloadStoragePreference(storagePreference: Int) {
|
||||
return App.getInstance().preferences.edit().putString(
|
||||
DOWNLOAD_STORAGE,
|
||||
storagePreference.toString()
|
||||
).apply()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue