From 9a79121a9b83024e03834c9334e3c4c400d13341 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Thu, 8 Dec 2022 17:42:20 +0100 Subject: [PATCH] allow `application/*` as import file type --- app/src/main/java/com/github/libretube/util/ImportHelper.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/github/libretube/util/ImportHelper.kt b/app/src/main/java/com/github/libretube/util/ImportHelper.kt index cd0ab71a1..b0682abb3 100644 --- a/app/src/main/java/com/github/libretube/util/ImportHelper.kt +++ b/app/src/main/java/com/github/libretube/util/ImportHelper.kt @@ -40,7 +40,7 @@ class ImportHelper( Log.e(TAG(), e.toString()) activity.toastFromMainThread( activity.getString(R.string.unsupported_file_format) + - " (${activity.contentResolver.getType(uri)}" + " (${activity.contentResolver.getType(uri)})" ) } catch (e: Exception) { Log.e(TAG(), e.toString()) @@ -53,7 +53,7 @@ class ImportHelper( */ private fun getChannelsFromUri(uri: Uri): List { return when (val fileType = activity.contentResolver.getType(uri)) { - "application/json", "application/octet-stream" -> { + "application/json", "application/*", "application/octet-stream" -> { // NewPipe subscriptions format val subscriptions = ObjectMapper().readValue(uri.readText(), NewPipeSubscriptions::class.java) subscriptions.subscriptions.orEmpty().map {