fix: extension permission prefix cause installation failed.

This commit is contained in:
oxy-macmini
2025-03-30 11:03:34 +08:00
parent f289ae67da
commit 0d160d83bb
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<permission <permission
android:name="com.m3u.permission.CONNECT_EXTENSION_PLUGIN" android:name="${applicationId}.permission.CONNECT_EXTENSION_PLUGIN"
android:protectionLevel="normal" /> android:protectionLevel="normal" />
<uses-feature <uses-feature

View File

@ -1,6 +1,6 @@
package com.m3u.data.parser.m3u package com.m3u.data.parser.m3u
import android.net.Uri import androidx.core.net.toUri
import com.m3u.data.database.model.Channel import com.m3u.data.database.model.Channel
internal data class M3UData( internal data class M3UData(
@ -22,7 +22,7 @@ internal fun M3UData.toChannel(
val fileScheme = "file:///" val fileScheme = "file:///"
val absoluteUrl = if (!url.startsWith(fileScheme)) url val absoluteUrl = if (!url.startsWith(fileScheme)) url
else { else {
with(Uri.parse(playlistUrl)) { with(playlistUrl.toUri()) {
val paths = pathSegments.dropLast(1) + url.drop(fileScheme.length) val paths = pathSegments.dropLast(1) + url.drop(fileScheme.length)
buildUpon() buildUpon()
.path( .path(