mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-06-11 17:07:51 +02:00
v2.1.0-preview: Download speed optimizations
This commit is contained in:
@@ -211,6 +211,25 @@ class MainActivity: FlutterActivity() {
|
||||
}
|
||||
result.success(null)
|
||||
}
|
||||
"preWarmTrackCache" -> {
|
||||
val tracksJson = call.argument<String>("tracks") ?: "[]"
|
||||
withContext(Dispatchers.IO) {
|
||||
Gobackend.preWarmTrackCacheJSON(tracksJson)
|
||||
}
|
||||
result.success(null)
|
||||
}
|
||||
"getTrackCacheSize" -> {
|
||||
val size = withContext(Dispatchers.IO) {
|
||||
Gobackend.getTrackCacheSize()
|
||||
}
|
||||
result.success(size.toInt())
|
||||
}
|
||||
"clearTrackCache" -> {
|
||||
withContext(Dispatchers.IO) {
|
||||
Gobackend.clearTrackIDCache()
|
||||
}
|
||||
result.success(null)
|
||||
}
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
||||
Reference in New Issue
Block a user