Skip to content

Commit

Permalink
fix(all/chineseanime): Update baseUrl + add StreamVid extractor (#3037)
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudemirovsky authored Mar 10, 2024
1 parent b85bc9a commit 6702a45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/all/chineseanime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ext {
extName = 'ChineseAnime'
extClass = '.ChineseAnime'
themePkg = 'animestream'
baseUrl = 'https://chineseanime.top'
baseUrl = 'https://www.chineseanime.vip'
overrideVersionCode = 6
}

Expand All @@ -11,5 +11,6 @@ apply from: "$rootDir/common.gradle"
dependencies {
implementation(project(":lib:dailymotion-extractor"))
implementation(project(":lib:streamwish-extractor"))
implementation(project(":lib:streamvid-extractor"))
implementation(project(":lib:playlist-utils"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.animeextension.all.chineseanime.extractors.VatchusExtractor
import eu.kanade.tachiyomi.animesource.model.Video
import eu.kanade.tachiyomi.lib.dailymotionextractor.DailymotionExtractor
import eu.kanade.tachiyomi.lib.streamvidextractor.StreamVidExtractor
import eu.kanade.tachiyomi.lib.streamwishextractor.StreamWishExtractor
import eu.kanade.tachiyomi.multisrc.animestream.AnimeStream

class ChineseAnime : AnimeStream(
"all",
"ChineseAnime",
"https://chineseanime.top",
"https://www.chineseanime.vip",
) {

// =============================== Search ===============================
Expand All @@ -26,6 +27,7 @@ class ChineseAnime : AnimeStream(
// ============================ Video Links =============================
private val dailymotionExtractor by lazy { DailymotionExtractor(client, headers) }
private val streamwishExtractor by lazy { StreamWishExtractor(client, headers) }
private val streamvidExtractor by lazy { StreamVidExtractor(client) }
private val vatchusExtractor by lazy { VatchusExtractor(client, headers) }

override fun getVideoList(url: String, name: String): List<Video> {
Expand All @@ -34,6 +36,7 @@ class ChineseAnime : AnimeStream(
url.contains("dailymotion") -> dailymotionExtractor.videosFromUrl(url, prefix)
url.contains("embedwish") -> streamwishExtractor.videosFromUrl(url, prefix)
url.contains("vatchus") -> vatchusExtractor.videosFromUrl(url, prefix)
url.contains("donghua.xyz/v/") -> streamvidExtractor.videosFromUrl(url, prefix, true)
else -> emptyList()
}
}
Expand Down

0 comments on commit 6702a45

Please sign in to comment.