Skip to content

Commit

Permalink
Updated Consumet Instance (#484)
Browse files Browse the repository at this point in the history
* Update YugenAnime.kt

consumet has closed it's public api instance for months now and to use it consumet a person has to host his/her own instance so just updated the instance

* Update Anilibria.kt

* Update Kickassanime.kt

* Update Loklok.kt
  • Loading branch information
lirena00 committed Jan 1, 2024
1 parent 03c2641 commit 4643275
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Anilibria/src/main/kotlin/com/hexated/Anilibria.kt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class Anilibria : MainAPI() {
}

private suspend fun getTracker(title: String?, type: String?, year: Int?): Tracker {
val res = app.get("https://api.consumet.org/meta/anilist/$title")
val res = app.get("https://consumet-instance.vercel.app/meta/anilist/$title")
.parsedSafe<AniSearch>()?.results?.find { media ->
(media.title?.english.equals(title, true) || media.title?.romaji.equals(
title,
Expand Down Expand Up @@ -194,4 +194,4 @@ class Anilibria : MainAPI() {
@JsonProperty("mes") val mes: String? = null,
)

}
}
6 changes: 3 additions & 3 deletions Kickassanime/src/main/kotlin/com/hexated/Kickassanime.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ open class Kickassanime : MainAPI() {

companion object {
const val kaast = "https://kaast1.com"
private const val consumetAnilist = "https://api.consumet.org/meta/anilist"
private const val consumetMal = "https://api.consumet.org/meta/mal"
private const val consumetAnilist = "https://consumet-instance.vercel.app/meta/anilist"
private const val consumetMal = "https://consumet-instance.vercel.app/meta/mal"
fun getType(t: String): TvType {
return when {
t.contains("Ova", true) -> TvType.OVA
Expand Down Expand Up @@ -379,4 +379,4 @@ open class Kickassanime : MainAPI() {
@JsonProperty("title") val title: SyncTitle? = null,
)

}
}
2 changes: 1 addition & 1 deletion Loklok/src/main/kotlin/com/hexated/Loklok.kt
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class Loklok : MainAPI() {
}

private suspend fun getTracker(title: String?, type: String?, year: Int?): Tracker {
val res = app.get("https://api.consumet.org/meta/anilist/$title")
val res = app.get("https://consumet-instance.vercel.app/meta/anilist/$title")
.parsedSafe<AniSearch>()?.results?.find { media ->
(media.title?.english.equals(title, true) || media.title?.romaji.equals(
title,
Expand Down
4 changes: 2 additions & 2 deletions YugenAnime/src/main/kotlin/com/hexated/YugenAnime.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class YugenAnime : MainAPI() {
)

companion object {
private const val consumetAnilist = "https://api.consumet.org/meta/anilist"
private const val consumetMal = "https://api.consumet.org/meta/mal"
private const val consumetAnilist = "https://consumet-instance.vercel.app/meta/anilist"
private const val consumetMal = "https://consumet-instance.vercel.app/meta/mal"

fun getType(t: String): TvType {
return if (t.contains("OVA", true) || t.contains("Special", true)) TvType.OVA
Expand Down

0 comments on commit 4643275

Please sign in to comment.