diff --git a/Nimegami/build.gradle.kts b/Nimegami/build.gradle.kts index e1c3af2e..29da8e82 100644 --- a/Nimegami/build.gradle.kts +++ b/Nimegami/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 10 +version = 11 cloudstream { diff --git a/Nimegami/src/main/kotlin/com/hexated/Extractors.kt b/Nimegami/src/main/kotlin/com/hexated/Extractors.kt index 3452bf15..f67b59d6 100644 --- a/Nimegami/src/main/kotlin/com/hexated/Extractors.kt +++ b/Nimegami/src/main/kotlin/com/hexated/Extractors.kt @@ -1,12 +1,8 @@ package com.hexated import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.SubtitleFile -import com.lagradost.cloudstream3.app -import com.lagradost.cloudstream3.utils.ExtractorApi -import com.lagradost.cloudstream3.utils.ExtractorLink -import com.lagradost.cloudstream3.utils.INFER_TYPE -import com.lagradost.cloudstream3.utils.Qualities +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.utils.* open class Mitedrive : ExtractorApi() { override val name = "Mitedrive" @@ -79,4 +75,21 @@ open class Berkasdrive : ExtractorApi() { } +} + +open class Videogami : ExtractorApi() { + override val name = "Videogami" + override val mainUrl = "https://video.nimegami.id" + override val requiresReferer = false + + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val id = base64Decode(url.substringAfter("url=")).substringAfterLast("/") + loadExtractor("https://hxfile.co/embed-$id.html", "$mainUrl/", subtitleCallback, callback) + } + } \ No newline at end of file diff --git a/Nimegami/src/main/kotlin/com/hexated/NimegamiPlugin.kt b/Nimegami/src/main/kotlin/com/hexated/NimegamiPlugin.kt index 87802ce3..fe6de7b7 100644 --- a/Nimegami/src/main/kotlin/com/hexated/NimegamiPlugin.kt +++ b/Nimegami/src/main/kotlin/com/hexated/NimegamiPlugin.kt @@ -12,5 +12,6 @@ class NimegamiPlugin: Plugin() { registerMainAPI(Nimegami()) registerExtractorAPI(Mitedrive()) registerExtractorAPI(Berkasdrive()) + registerExtractorAPI(Videogami()) } } \ No newline at end of file diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index 6560a0f9..f6b3f13d 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -1065,9 +1065,9 @@ fun vidsrctoDecrypt(text: String): String { } fun String?.createSlug(): String? { - return this?.replace(Regex("[^\\w\\s-]"), "") - ?.replace(" ", "-") - ?.replace(Regex("( – )|( -)|(- )|(--)"), "-") + return this?.filter { it.isWhitespace() || it.isLetterOrDigit() } + ?.trim() + ?.replace("\\s+".toRegex(), "-") ?.lowercase() }