mirror of
https://github.com/gabehf/tempus.git
synced 2026-03-14 09:55:53 -07:00
Merge pull request #190 from kmod-midori/streaming-cache
feat: cache streaming contents
This commit is contained in:
commit
d08c113d99
7 changed files with 152 additions and 1 deletions
|
|
@ -23,6 +23,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"
|
||||
|
|
@ -189,6 +190,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