mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Try to cache streaming contents
This commit is contained in:
parent
3e1c3133ca
commit
3d3d0fa856
7 changed files with 152 additions and 1 deletions
|
|
@ -22,6 +22,7 @@ object Preferences {
|
|||
private const val PLAYBACK_SPEED = "playback_speed"
|
||||
private const val SKIP_SILENCE = "skip_silence"
|
||||
private const val IMAGE_CACHE_SIZE = "image_cache_size"
|
||||
private const val STREAMING_CACHE_SIZE = "streaming_cache_size"
|
||||
private const val IMAGE_SIZE = "image_size"
|
||||
private const val MAX_BITRATE_WIFI = "max_bitrate_wifi"
|
||||
private const val MAX_BITRATE_MOBILE = "max_bitrate_mobile"
|
||||
|
|
@ -187,6 +188,14 @@ object Preferences {
|
|||
return App.getInstance().preferences.getString(IMAGE_SIZE, "-1")!!.toInt()
|
||||
}
|
||||
|
||||
/**
|
||||
* Size of streaming cache in MiB.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun getStreamingCacheSize(): Long {
|
||||
return App.getInstance().preferences.getString(STREAMING_CACHE_SIZE, "256")!!.toLong()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getMaxBitrateWifi(): String {
|
||||
return App.getInstance().preferences.getString(MAX_BITRATE_WIFI, "0")!!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue