Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(all/chineseanime): Update baseUrl + add StreamVid extractor #3037

Merged
merged 4 commits into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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