Skip to content

Commit bd3c626

Browse files
authored
Minor fixes
- Anime-sama Homepage fixed. - FrenchStream optimized. - Anizone logo updated. - Watch32 language added 'english' - readme updated
1 parent 52e0828 commit bd3c626

File tree

10 files changed

+50
-83
lines changed

10 files changed

+50
-83
lines changed

AnimeSama/build.gradle.kts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
dependencies {
2-
implementation("androidx.legacy:legacy-support-v4:1.0.0")
3-
implementation("com.google.android.material:material:1.4.0")
4-
implementation("androidx.recyclerview:recyclerview:1.2.1")
5-
}
61
// use an integer for version numbers
72
version = 2
83

@@ -20,7 +15,7 @@ cloudstream {
2015
* 2: Slow
2116
* 3: Beta only
2217
* */
23-
status = 1
18+
status = 2
2419

2520
tvTypes = listOf("Anime")
2621

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest />
2+
<manifest />

AnimeSama/src/main/kotlin/com/ycngmn/AnimesamaProvider.kt

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package com.ycngmn
22

3-
4-
import android.util.Log
53
import com.lagradost.cloudstream3.DubStatus
64
import com.lagradost.cloudstream3.Episode
75
import com.lagradost.cloudstream3.HomePageList
@@ -20,7 +18,6 @@ import com.lagradost.cloudstream3.mainPageOf
2018
import com.lagradost.cloudstream3.newAnimeLoadResponse
2119
import com.lagradost.cloudstream3.newAnimeSearchResponse
2220
import com.lagradost.cloudstream3.newHomePageResponse
23-
import com.lagradost.cloudstream3.newMovieSearchResponse
2421
import com.lagradost.cloudstream3.utils.ExtractorLink
2522
import com.lagradost.cloudstream3.utils.loadExtractor
2623
import org.jsoup.nodes.Element
@@ -55,32 +52,12 @@ class AnimesamaProvider : MainAPI() {
5552
val query = when (request.data) {
5653
"1" -> "#containerAjoutsAnimes a"
5754
"2" -> "#containerSorties a"
58-
"3" -> "#containerClassiques"
59-
"4" -> "#containerPepites"
55+
"3" -> "#containerClassiques a"
56+
"4" -> "#containerPepites a"
6057
else -> ""
6158
}
62-
val home = when (request.data) {
63-
"1", "2" -> doc.select(query).mapNotNull { toResult(it) }
64-
"3", "4" -> {
65-
val regex =
66-
Regex("""carte(Classique|Pepite)\("([^"]+)",\s*"([^"]+)"(?:,\s*"([^"]+)")*\)""")
67-
val matches = regex.findAll(doc.select(query).toString())
68-
matches.map { match ->
69-
val title = match.groupValues[2]
70-
val path = match.groupValues[3]
71-
newMovieSearchResponse(
72-
title,
73-
"https://anime-sama.fr/catalogue/$path",
74-
TvType.Anime
75-
) {
76-
this.posterUrl =
77-
"https://cdn.statically.io/gh/Anime-Sama/IMG/img/contenu/$path.jpg"
78-
}
79-
}.toList()
80-
}
59+
val home = doc.select(query).mapNotNull { toResult(it) }
8160

82-
else -> listOf()
83-
}
8461
return newHomePageResponse(
8562
HomePageList(request.name, home, isHorizontalImages = true),
8663
false
@@ -249,7 +226,6 @@ class AnimesamaProvider : MainAPI() {
249226
return true
250227
}
251228

252-
253229
/**
254230
* Extracts the stream host and episode URLs from AnimeSama stream pages.
255231
*
@@ -259,23 +235,20 @@ class AnimesamaProvider : MainAPI() {
259235
* https://anime-sama.fr/catalogue/anime-name/saison0/vostfr/
260236
* ```
261237
* @return A map containing pairs of sources and their corresponding lists of stream links,
262-
* or an empty string if no match is found.
238+
* or an empty list if no match is found.
263239
*/
264240

265241
private suspend fun retreiveSrcs(streamPage: String): Map<String, List<String>> {
266242

267-
val request = app.get(streamPage, timeout = 30)
243+
val request = app.get(streamPage)
268244

269245
if (request.isSuccessful) {
270246

271247
val doc = request.document
272248
val epiKey = doc.selectFirst("#sousBlocMiddle script").toString()
273249
val re = Regex("""<script[^>]*src=['"]([^'"]*episodes\.js\?filever=\d+)['"][^>]*>""")
274250
val episodeKey = re.find(epiKey)?.groupValues?.get(1)
275-
val rawLinks = app.get(
276-
"$streamPage/$episodeKey",
277-
timeout = 60
278-
).document.toString() // change to .text?
251+
val rawLinks = app.get("$streamPage/$episodeKey",).text
279252
val reURL = """['"]https?://[^\s'"]+['"]""".toRegex()
280253
val urls = reURL.findAll(rawLinks)
281254
.map { it.value.trim('\'', '"') }

Anizone/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ cloudstream {
55
// All of these properties are optional, you can safely remove them
66

77
description = "Anizone.to is a website with no about us section but hey, there are anime."
8+
language = "en"
89
authors = listOf("ycngmn")
910

1011
/**
@@ -20,5 +21,5 @@ cloudstream {
2021

2122

2223
// random cc logo i found : me too, how cool
23-
iconUrl = "https://assets.turbologo.com/blog/fr/2021/09/21101525/anime-logo.png"
24+
iconUrl = "https://avatarfiles.alphacoders.com/292/thumb-1920-292030.png"
2425
}

Anizone/src/main/kotlin/com/ycngmn/AnizoneProvider.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class AnizoneProvider : MainAPI() {
4040
TvType.AnimeMovie,
4141
)
4242

43-
override var lang = ""
43+
override var lang = "en"
4444

4545
override val hasMainPage = true
4646
override val hasQuickSearch = true
@@ -243,7 +243,7 @@ class AnizoneProvider : MainAPI() {
243243

244244

245245
val web = app.get(data).document
246-
val sourceName = web.select("span.truncate")[1]?.text() ?: ""
246+
val sourceName = web.selectFirst("span.truncate")?.text() ?: ""
247247
val mediaPlayer = web.selectFirst("media-player")
248248
val m3U8 = mediaPlayer?.attr("src") ?: ""
249249

@@ -258,8 +258,8 @@ class AnizoneProvider : MainAPI() {
258258

259259
callback.invoke(
260260
ExtractorLink(
261-
name,
262261
sourceName,
262+
name,
263263
m3U8,
264264
"",
265265
Qualities.Unknown.value,
@@ -270,4 +270,4 @@ class AnizoneProvider : MainAPI() {
270270
return true
271271
}
272272

273-
}
273+
}

FrenchStream/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// use an integer for version numbers
2-
version = 1
2+
version = 2
33

44

55
cloudstream {

FrenchStream/src/main/kotlin/com/ycngmn/FrenchStreamProvider.kt

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,19 @@ class FrenchStreamProvider : MainAPI() {
4949
"series-disney-plus" to "Nouveautés Disney+",
5050
"serie-amazon-prime-videos" to "Nouveautés Prime Video",
5151
"sries-du-moment" to "Box Office Série",
52+
"" to "Box Office Film"
5253

5354
)
5455

5556
override suspend fun getMainPage(page: Int, request: MainPageRequest
5657
): HomePageResponse {
5758

5859

59-
60-
val home = app.get("$mainUrl/${request.data}/page/$page").document
61-
.select(".short").map { toResult(it) }
60+
val home = if (request.data == "" && page == 1)
61+
app.get("$mainUrl/${request.data}/page/$page").document
62+
.select("#dle-content .short").map { toResult(it) }
63+
else app.get("$mainUrl/${request.data}/page/$page").document
64+
.select(".short").map { toResult(it) }
6265

6366
return newHomePageResponse(
6467
HomePageList(request.name, home, isHorizontalImages = false),
@@ -90,7 +93,7 @@ class FrenchStreamProvider : MainAPI() {
9093

9194
override suspend fun load(url: String): LoadResponse {
9295

93-
val doc = app.get(url, cacheTime = 60).document
96+
val doc = app.post(url, cacheTime = 60).document
9497
val title = doc.selectFirst("#s-title")?.ownText() ?: ""
9598
val image = doc.selectFirst(".thumbnail")?.attr("src")
9699
val synopsis = doc.selectFirst("#s-desc")?.ownText()
@@ -107,13 +110,14 @@ class FrenchStreamProvider : MainAPI() {
107110

108111
// Version 1 for VF, 2 for VOSTFR. Seasons are separate card.
109112
versionContainers.forEachIndexed { i, versionContainer ->
110-
versionContainer.select("a").forEach {
113+
versionContainer.select("a").forEachIndexed { j, it ->
111114
val dataRel = it.attr("data-rel")
112115
if (dataRel.isNotEmpty())
113116
episodes += Episode(
114117
data = doc.selectFirst("#$dataRel")?.toString() ?: "",
115118
name = it.attr("title"),
116119
posterUrl = image,
120+
episode = j+1,
117121
season = i + 1,
118122
)
119123
}
@@ -176,11 +180,14 @@ class FrenchStreamProvider : MainAPI() {
176180
callback: (ExtractorLink) -> Unit
177181
): Boolean {
178182

179-
if (data.contains("class=\"fsctab\"")) {
183+
if (data.contains("class=\"fsctab\"")) { // series
180184

181185
Jsoup.parse(data).select(".fsctab").forEach {
182186
// create extractor kt
183-
val vid = app.get(it.attr("href"), allowRedirects = true).url
187+
val vidSrc = it.attr("href")
188+
189+
val vid = if (vidSrc.contains("flixeo.xyz")) app.head(vidSrc, allowRedirects = false).headers["Location"] ?: ""
190+
else vidSrc
184191
loadExtractor(vid, subtitleCallback, callback)
185192
}
186193
}

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
# CuxPlug
2-
International plugins for [CloudStream](https://cloudstream.on.fleek.co) developed from fun and interest
3-
## installing the repository
4-
### [Install automatically](https://self-similarity.github.io/http-protocol-redirector?r=cloudstreamrepo://raw.githubusercontent.com/ycngmn/CuxPlug/refs/heads/main/repo.json)
5-
### Install manually
6-
- Navigate
7-
- Settings
8-
- extensions
9-
- add repository
10-
- in repository URL, input either
11-
- *short-code*: `CuxPlug`
12-
- *direct-link*: `https://raw.githubusercontent.com/ycngmn/CuxPlug/refs/heads/main/repo.json`
13-
## Extensions
14-
- [**Watch32**](https://watch32.sx): Watch32 is a Free Movies streaming site with over 10000 movies and TV-Series
15-
- [**AniZone**](https://anizone.to): Anizone.to is a website with no about us section but hey, there are anime
16-
- [**AnimeSama**](https://anime-sama.fr): Anime-Sama est un site de référencement et de catalogage, créé par des passionnés de l’animation et du divertissement APAC
17-
- [**StreamCloud**](https://streamcloud.my): Stream Filme Kostenlos Online anschauen Deutsch
1+
# CuxPlug
2+
International plugins for [CloudStream](https://cloudstream.on.fleek.co) developed from fun and interest
3+
## Installing the repository
4+
### [Install automatically](https://self-similarity.github.io/http-protocol-redirector?r=cloudstreamrepo://raw.githubusercontent.com/ycngmn/CuxPlug/refs/heads/main/repo.json)
5+
### Install manually
6+
- Navigate
7+
- Settings
8+
- extensions
9+
- add repository
10+
- in repository URL, input either
11+
- *short-code*: `CuxPlug`
12+
- *direct-link*: `https://raw.githubusercontent.com/ycngmn/CuxPlug/refs/heads/main/repo.json`
13+
## Extensions
14+
- [**Watch32**](https://watch32.sx): Watch32 is a Free Movies streaming site with over 10000 movies and TV-Series.
15+
- [**AniZone**](https://anizone.to): Anizone.to is a website with no about us section but hey, there are anime.
16+
- [**AnimeSama**](https://anime-sama.fr): Anime-Sama est un site de référencement et de catalogage, créé par des passionnés de l’animation et du divertissement APAC.
17+
- [**StreamCloud**](https://streamcloud.my): Stream Filme Kostenlos Online anschauen Deutsch.
18+
- [**French-stream**](https://fstream.one/): French Stream est un site qui va récupèrer les films et séries sur des plateformes comme Disney+, Netflix, Amazon Prime Video, HBO, Apple TV , Wakanim, Viki... et vous les proposer Gratuitement!

Watch32/build.gradle.kts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
dependencies {
2-
implementation("androidx.legacy:legacy-support-v4:1.0.0")
3-
implementation("com.google.android.material:material:1.12.0")
4-
implementation("androidx.recyclerview:recyclerview:1.4.0")
5-
}
61
// use an integer for version numbers
72
version = 1
83

@@ -11,6 +6,7 @@ cloudstream {
116
// All of these properties are optional, you can safely remove them
127

138
description = "Watch32 is a Free Movies streaming site with over 10000 movies and TV-Series."
9+
language = "en"
1410
authors = listOf("ycngmn")
1511

1612
/**
@@ -28,9 +24,3 @@ cloudstream {
2824
// random cc logo i found
2925
iconUrl = "https://editorialge.com/wp-content/uploads/2023/07/Watch32..jpg"
3026
}
31-
32-
android {
33-
buildFeatures {
34-
viewBinding = true
35-
}
36-
}

Watch32/src/main/kotlin/com/ycngmn/Watch32Provider.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Watch32Provider : MainAPI() {
2929
TvType.TvSeries,
3030
)
3131

32-
override var lang = ""
32+
override var lang = "en"
3333

3434
override val hasMainPage = true
3535
override val hasQuickSearch = true
@@ -234,4 +234,4 @@ class Watch32Provider : MainAPI() {
234234
return true
235235
}
236236

237-
}
237+
}

0 commit comments

Comments
 (0)