mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-26 22:20:24 +00:00
Only generate Thumbnails once seek has started
This commit is contained in:
parent
88db031214
commit
a4b5b2f528
1 changed files with 1 additions and 6 deletions
|
@ -28,7 +28,7 @@ class ChaosflixSeekDataProvider(
|
|||
|
||||
private val scope = CoroutineScope(Dispatchers.IO + Job())
|
||||
|
||||
private var canceled = false
|
||||
private var canceled = true
|
||||
private var generateThumbsJob: Job? = null
|
||||
|
||||
private val mediaMetadataRetriever = MediaMetadataRetriever()
|
||||
|
@ -36,11 +36,6 @@ class ChaosflixSeekDataProvider(
|
|||
private val thumbnails: MutableMap<Long, Bitmap> = mutableMapOf()
|
||||
private val dummyThumbnails: MutableMap<Long, Bitmap> = mutableMapOf()
|
||||
|
||||
init {
|
||||
mediaMetadataRetriever.setDataSource(url, mapOf("User-Agent" to ApiFactory.buildUserAgent()))
|
||||
generateThumbs()
|
||||
}
|
||||
|
||||
private val positions: LongArray by lazy {
|
||||
val list = mutableListOf<Long>()
|
||||
for (i in 0..(length * 1000) step calculateInterval(length)) {
|
||||
|
|
Loading…
Reference in a new issue