Commit 37cda385 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Restore systematic media expand

parent 67f3eac9
......@@ -683,7 +683,10 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
if (isBenchmark) player.setPreviousStats()
if (nextIndex == -1) savePosition(true)
}
next()
launch(UI, CoroutineStart.UNDISPATCHED) {
determinePrevAndNextIndices(true)
next()
}
}
MediaPlayer.Event.EncounteredError -> {
service.showToast(service.getString(
......
......@@ -7,6 +7,7 @@ import android.support.v4.app.Fragment
import android.support.v4.app.FragmentActivity
import kotlinx.coroutines.experimental.CoroutineStart
import kotlinx.coroutines.experimental.delay
import org.videolan.libvlc.Media
import java.io.File
import java.net.URI
import java.net.URISyntaxException
......@@ -47,4 +48,7 @@ suspend fun retry (
return block() // last attempt
}
fun uiStart() = if (Looper.getMainLooper() == Looper.myLooper()) CoroutineStart.UNDISPATCHED else CoroutineStart.DEFAULT
\ No newline at end of file
fun uiStart() = if (Looper.getMainLooper() == Looper.myLooper()) CoroutineStart.UNDISPATCHED else CoroutineStart.DEFAULT
fun Media?.canExpand() = this != null && (type == Media.Type.Directory || type == Media.Type.Playlist)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment