Skip to content
Snippets Groups Projects
Commit 7867264b authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Restore systematic media expand

parent c648c4c3
No related branches found
No related tags found
No related merge requests found
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment