From e3301235bf2d68db803b3fa3f162b314c4f3cba0 Mon Sep 17 00:00:00 2001 From: jmir1 Date: Tue, 6 Jun 2023 16:21:13 +0200 Subject: [PATCH] fix: delete duplicate files --- .../tachiyomi/util/storage/FFmpegUtils.kt | 19 -------------- .../tachiyomi/util/storage/FileExtensions.kt | 25 ------------------- 2 files changed, 44 deletions(-) delete mode 100644 app/src/main/java/eu/kanade/tachiyomi/util/storage/FFmpegUtils.kt delete mode 100644 app/src/main/java/eu/kanade/tachiyomi/util/storage/FileExtensions.kt diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/storage/FFmpegUtils.kt b/app/src/main/java/eu/kanade/tachiyomi/util/storage/FFmpegUtils.kt deleted file mode 100644 index 1acde9075..000000000 --- a/app/src/main/java/eu/kanade/tachiyomi/util/storage/FFmpegUtils.kt +++ /dev/null @@ -1,19 +0,0 @@ -package eu.kanade.tachiyomi.util.storage - -import android.content.Context -import android.net.Uri -import android.os.Build -import com.arthenica.ffmpegkit.FFmpegKitConfig -import java.io.File - -fun String.toFFmpegString(context: Context): String { - return File(this).getUriCompat(context).toFFmpegString(context) -} - -fun Uri.toFFmpegString(context: Context): String { - return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && this.scheme == "content") { - FFmpegKitConfig.getSafParameter(context, this, "rw") - } else { - this.path!! - }.replace("\"", "\\\"") -} diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/storage/FileExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/storage/FileExtensions.kt deleted file mode 100644 index b939eb301..000000000 --- a/app/src/main/java/eu/kanade/tachiyomi/util/storage/FileExtensions.kt +++ /dev/null @@ -1,25 +0,0 @@ -package eu.kanade.tachiyomi.util.storage - -import android.content.Context -import android.net.Uri -import android.os.Build -import androidx.core.content.FileProvider -import androidx.core.net.toUri -import eu.kanade.tachiyomi.BuildConfig -import java.io.File - -val Context.cacheImageDir: File - get() = File(cacheDir, "shared_image") - -/** - * Returns the uri of a file - * - * @param context context of application - */ -fun File.getUriCompat(context: Context): Uri { - return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { - FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID + ".provider", this) - } else { - this.toUri() - } -}