diff --git a/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt b/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt index 742bf308..b80a590e 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/plugins/RepositoryManager.kt @@ -95,15 +95,11 @@ object RepositoryManager { } } else if (fixedUrl.matches("^[a-zA-Z0-9!_-]+$".toRegex())) { suspendSafeApiCall { - app.get("https://l.cloudstream.cf/${fixedUrl}", allowRedirects = false).let { - it.headers["Location"]?.let { url -> - return@suspendSafeApiCall if (!url.startsWith("https://cutt.ly/branded-domains")) url - else null - } - app.get("https://cutt.ly/${fixedUrl}", allowRedirects = false).let { it2 -> - it2.headers["Location"]?.let { url -> - return@suspendSafeApiCall if (url.startsWith("https://cutt.ly/404")) url else null - } + app.get("https://cutt.ly/${fixedUrl}", allowRedirects = false).let { it2 -> + it2.headers["Location"]?.let { url -> + if (url.startsWith("https://cutt.ly/404")) return@suspendSafeApiCall null + if (url.removeSuffix("/") == "https://cutt.ly") return@suspendSafeApiCall null + return@suspendSafeApiCall url } } } diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/ExtensionsFragment.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/ExtensionsFragment.kt index 7e60910d..045ed92d 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/ExtensionsFragment.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/settings/extensions/ExtensionsFragment.kt @@ -1,6 +1,5 @@ package com.lagradost.cloudstream3.ui.settings.extensions -import android.content.ClipData import android.content.ClipboardManager import android.content.Context import android.content.DialogInterface