Skip to content

Commit

Permalink
Nimegami: added Videogami
Browse files Browse the repository at this point in the history
  • Loading branch information
olivia committed Jan 25, 2024
1 parent c4de07a commit 25ab02c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Nimegami/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// use an integer for version numbers
version = 10
version = 11


cloudstream {
Expand Down
25 changes: 19 additions & 6 deletions Nimegami/src/main/kotlin/com/hexated/Extractors.kt
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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)
}

}
1 change: 1 addition & 0 deletions Nimegami/src/main/kotlin/com/hexated/NimegamiPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ class NimegamiPlugin: Plugin() {
registerMainAPI(Nimegami())
registerExtractorAPI(Mitedrive())
registerExtractorAPI(Berkasdrive())
registerExtractorAPI(Videogami())
}
}
6 changes: 3 additions & 3 deletions SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit 25ab02c

Please sign in to comment.