forked from AlmightyHak/extensions-source
Initial commit
This commit is contained in:
commit
98ed7e8839
2263 changed files with 108711 additions and 0 deletions
15
src/en/luciferdonghua/build.gradle
Normal file
15
src/en/luciferdonghua/build.gradle
Normal file
|
@ -0,0 +1,15 @@
|
|||
ext {
|
||||
extName = 'LuciferDonghua'
|
||||
extClass = '.LuciferDonghua'
|
||||
themePkg = 'animestream'
|
||||
baseUrl = 'https://luciferdonghua.in'
|
||||
overrideVersionCode = 4
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
||||
dependencies {
|
||||
implementation(project(':lib:dailymotion-extractor'))
|
||||
implementation(project(':lib:okru-extractor'))
|
||||
implementation(project(':lib:streamwish-extractor'))
|
||||
}
|
BIN
src/en/luciferdonghua/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
src/en/luciferdonghua/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
BIN
src/en/luciferdonghua/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
src/en/luciferdonghua/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
BIN
src/en/luciferdonghua/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
src/en/luciferdonghua/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
BIN
src/en/luciferdonghua/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
src/en/luciferdonghua/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
BIN
src/en/luciferdonghua/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
src/en/luciferdonghua/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
|
@ -0,0 +1,42 @@
|
|||
package eu.kanade.tachiyomi.animeextension.en.luciferdonghua
|
||||
|
||||
import eu.kanade.tachiyomi.animesource.model.Video
|
||||
import eu.kanade.tachiyomi.lib.dailymotionextractor.DailymotionExtractor
|
||||
import eu.kanade.tachiyomi.lib.okruextractor.OkruExtractor
|
||||
import eu.kanade.tachiyomi.lib.streamwishextractor.StreamWishExtractor
|
||||
import eu.kanade.tachiyomi.multisrc.animestream.AnimeStream
|
||||
|
||||
class LuciferDonghua : AnimeStream(
|
||||
"en",
|
||||
"LuciferDonghua",
|
||||
"https://luciferdonghua.in",
|
||||
) {
|
||||
// ============================== Episodes ==============================
|
||||
override fun episodeListSelector() = "div.eplister > ul > li a"
|
||||
|
||||
// ============================ Video Links =============================
|
||||
private val okruExtractor by lazy { OkruExtractor(client) }
|
||||
private val dailymotionExtractor by lazy { DailymotionExtractor(client, headers) }
|
||||
private val filelionsExtractor by lazy { StreamWishExtractor(client, headers) }
|
||||
|
||||
override fun getVideoList(url: String, name: String): List<Video> {
|
||||
val prefix = "$name - "
|
||||
return when {
|
||||
url.contains("ok.ru") -> okruExtractor.videosFromUrl(url, prefix = prefix)
|
||||
url.contains("dailymotion") -> dailymotionExtractor.videosFromUrl(url, prefix)
|
||||
url.contains("filelions") -> filelionsExtractor.videosFromUrl(url, videoNameGen = { quality -> "FileLions - $quality" })
|
||||
else -> emptyList()
|
||||
}
|
||||
}
|
||||
|
||||
// ============================= Utilities ==============================
|
||||
override fun List<Video>.sort(): List<Video> {
|
||||
val quality = preferences.getString(videoSortPrefKey, videoSortPrefDefault)!!
|
||||
return sortedWith(
|
||||
compareBy(
|
||||
{ it.quality.contains(quality) },
|
||||
{ Regex("""(\d+)p""").find(it.quality)?.groupValues?.get(1)?.toIntOrNull() ?: 0 },
|
||||
),
|
||||
).reversed()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue