feat: implemented streaming buffering strategy

This commit is contained in:
antonio 2023-11-26 19:10:21 +01:00
parent 9fde629233
commit 0a5983e32b
5 changed files with 36 additions and 3 deletions

View file

@ -42,6 +42,7 @@ object Preferences {
private const val SHARE = "share"
private const val SCROBBLING = "scrobbling"
private const val ESTIMATE_CONTENT_LENGTH = "estimate_content_length"
private const val BUFFERING_STRATEGY = "buffering_strategy"
@JvmStatic
fun getServer(): String? {
@ -331,4 +332,10 @@ object Preferences {
fun askForEstimateContentLength(): Boolean {
return App.getInstance().preferences.getBoolean(ESTIMATE_CONTENT_LENGTH, false)
}
@JvmStatic
fun getBufferingStrategy(): Double {
return App.getInstance().preferences.getString(BUFFERING_STRATEGY, "1")!!.toDouble()
}
}