From ef83e1c1fcb8a88e18956ceeb14cdacf7cf6b882 Mon Sep 17 00:00:00 2001 From: Hardcore Sushi Date: Sat, 5 Sep 2020 10:27:42 +0200 Subject: [PATCH] Adding supported file extensions --- app/src/main/java/sushi/hardcore/droidfs/ConstValues.kt | 8 ++++---- .../sushi/hardcore/droidfs/file_viewers/MediaPlayer.kt | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/sushi/hardcore/droidfs/ConstValues.kt b/app/src/main/java/sushi/hardcore/droidfs/ConstValues.kt index f3e5292..c7d3577 100644 --- a/app/src/main/java/sushi/hardcore/droidfs/ConstValues.kt +++ b/app/src/main/java/sushi/hardcore/droidfs/ConstValues.kt @@ -13,10 +13,10 @@ class ConstValues { const val wipe_passes = 2 const val slideshow_delay: Long = 4000 private val fileExtensions = mapOf( - Pair("image", listOf("png", "jpg", "jpeg")), - Pair("video", listOf("mp4", "webm")), - Pair("audio", listOf("mp3", "ogg")), - Pair("text", listOf("txt", "json", "conf", "log", "xml", "java", "kt", "py", "go", "c", "h", "cpp", "hpp", "sh", "js", "html", "css", "php")) + Pair("image", listOf("png", "jpg", "jpeg", "gif", "bmp")), + Pair("video", listOf("mp4", "webm", "mkv", "mov")), + Pair("audio", listOf("mp3", "ogg", "m4a", "wav", "flac")), + Pair("text", listOf("txt", "json", "conf", "log", "xml", "java", "kt", "py", "pl", "rb", "go", "c", "h", "cpp", "hpp", "sh", "bat", "js", "html", "css", "php", "yml", "yaml", "ini", "md")) ) fun isImage(path: String): Boolean { diff --git a/app/src/main/java/sushi/hardcore/droidfs/file_viewers/MediaPlayer.kt b/app/src/main/java/sushi/hardcore/droidfs/file_viewers/MediaPlayer.kt index 98e5357..09f7b46 100644 --- a/app/src/main/java/sushi/hardcore/droidfs/file_viewers/MediaPlayer.kt +++ b/app/src/main/java/sushi/hardcore/droidfs/file_viewers/MediaPlayer.kt @@ -6,7 +6,7 @@ import com.google.android.exoplayer2.ExoPlaybackException import com.google.android.exoplayer2.Player import com.google.android.exoplayer2.SimpleExoPlayer import com.google.android.exoplayer2.extractor.ExtractorsFactory -import com.google.android.exoplayer2.extractor.flv.FlvExtractor +import com.google.android.exoplayer2.extractor.flac.FlacExtractor import com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor import com.google.android.exoplayer2.extractor.mp3.Mp3Extractor import com.google.android.exoplayer2.extractor.mp4.Mp4Extractor @@ -46,9 +46,9 @@ abstract class MediaPlayer: FileViewerActivity() { MatroskaExtractor(), Mp4Extractor(), Mp3Extractor(), - FlvExtractor(), OggExtractor(), - WavExtractor() + WavExtractor(), + FlacExtractor() ) }).createMediaSource(ConstValues.fakeUri) player.seekTo(currentWindow, playbackPosition)