Commit 7867264b authored by Geoffrey Métais's avatar Geoffrey Métais

Restore systematic media expand

parent c648c4c3
......@@ -674,7 +674,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(
......@@ -686,5 +689,5 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
service.onMediaPlayerEvent(event)
}
fun isAudioList() = !player.canSwitchToVideo() && mediaList.isAudioList
private fun isAudioList() = !player.canSwitchToVideo() && mediaList.isAudioList
}
\ No newline at end of file
package org.videolan.vlc.util
import kotlinx.coroutines.experimental.delay
import org.videolan.libvlc.Media
import java.io.File
import java.net.URI
import java.net.URISyntaxException
import java.util.*
fun String.validateLocation(): Boolean {
var location = this
/* Check if the MRL contains a scheme */
......@@ -36,4 +36,6 @@ suspend fun retry (
delay(delayTime)
}
return block() // last attempt
}
\ No newline at end of file
}
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