mirror of
https://github.com/yuzono/anime-extensions.git
synced 2026-10-20 10:51:36 +00:00
[skip yuzono ci] feat(core): Bump minSDK to 24
This commit is contained in:
4
.github/ISSUE_TEMPLATE/01_report_issue.yml
vendored
4
.github/ISSUE_TEMPLATE/01_report_issue.yml
vendored
@@ -10,7 +10,7 @@ body:
|
||||
description: |
|
||||
You can find the extension name and version in **Browse → Extensions**.
|
||||
placeholder: |
|
||||
Example: "AnimePahe 14.19 (English)"
|
||||
Example: "Stremio 16.7 (All)"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
@@ -74,7 +74,7 @@ body:
|
||||
description: |
|
||||
You can find your app version in **More → About**.
|
||||
placeholder: |
|
||||
Example: "0.15.2.4" or "Preview r7473"
|
||||
Example: "0.17.0" or "Preview r8888"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ body:
|
||||
description: |
|
||||
You can find the extension name in **Browse → Extensions**.
|
||||
placeholder: |
|
||||
Example: "DopeBox"
|
||||
Example: "Jellyfin"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
|
||||
7
.github/workflows/build_pull_request.yml
vendored
7
.github/workflows/build_pull_request.yml
vendored
@@ -36,12 +36,14 @@ jobs:
|
||||
|
||||
- name: Set env
|
||||
id: set-env
|
||||
env:
|
||||
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
run: |
|
||||
LATEST_COMMIT_MESSAGE=$(git log -1 --pretty=%B)
|
||||
LATEST_COMMIT_MESSAGE=$(git log -1 --pretty=%B "$HEAD_SHA")
|
||||
echo "LATEST_COMMIT_MESSAGE<<{delimiter}
|
||||
$LATEST_COMMIT_MESSAGE
|
||||
|
||||
Built on commit: $(git log -1 --pretty=%H)
|
||||
Built on commit: $HEAD_SHA
|
||||
{delimiter}" >> $GITHUB_OUTPUT
|
||||
|
||||
# Commit message markers:
|
||||
@@ -61,6 +63,7 @@ jobs:
|
||||
esac
|
||||
echo "SKIP_BUMP=$skip_bump" >> $GITHUB_OUTPUT
|
||||
echo "SKIP_BUILD=$skip_build" >> $GITHUB_OUTPUT
|
||||
echo "Commit $HEAD_SHA -> SKIP_BUMP=$skip_bump SKIP_BUILD=$skip_build"
|
||||
|
||||
- name: Find lib changes
|
||||
id: modified-libs
|
||||
|
||||
7
.github/workflows/build_push.yml
vendored
7
.github/workflows/build_push.yml
vendored
@@ -43,12 +43,14 @@ jobs:
|
||||
|
||||
- name: Set env
|
||||
id: set-env
|
||||
env:
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
LATEST_COMMIT_MESSAGE=$(git log -1 --pretty=%B)
|
||||
LATEST_COMMIT_MESSAGE=$(git log -1 --pretty=%B "$HEAD_SHA")
|
||||
echo "LATEST_COMMIT_MESSAGE<<{delimiter}
|
||||
$LATEST_COMMIT_MESSAGE
|
||||
|
||||
Built on commit: $(git log -1 --pretty=%H)
|
||||
Built on commit: $HEAD_SHA
|
||||
{delimiter}" >> $GITHUB_OUTPUT
|
||||
|
||||
# Commit message markers:
|
||||
@@ -68,6 +70,7 @@ jobs:
|
||||
esac
|
||||
echo "SKIP_BUMP=$skip_bump" >> $GITHUB_OUTPUT
|
||||
echo "SKIP_BUILD=$skip_build" >> $GITHUB_OUTPUT
|
||||
echo "Commit $HEAD_SHA -> SKIP_BUMP=$skip_bump SKIP_BUILD=$skip_build"
|
||||
|
||||
- name: Find lib changes
|
||||
id: modified-libs
|
||||
|
||||
28
.gitignore
vendored
28
.gitignore
vendored
@@ -1,16 +1,22 @@
|
||||
# Build files
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/workspace.xml
|
||||
.DS_Store
|
||||
build/
|
||||
/captures
|
||||
.idea/
|
||||
*.iml
|
||||
repo/
|
||||
apk/
|
||||
gen
|
||||
generated-src/
|
||||
.kotlin
|
||||
build
|
||||
|
||||
# IDE files
|
||||
*.iml
|
||||
.idea/*
|
||||
!.idea/icon.svg
|
||||
!.idea/dictionaries
|
||||
/captures
|
||||
|
||||
# Configuration files
|
||||
local.properties
|
||||
|
||||
# macOS specific files
|
||||
.DS_Store
|
||||
|
||||
# Dev
|
||||
.history
|
||||
signingkey.jks
|
||||
nul
|
||||
|
||||
12
.idea/dictionaries/project.xml
generated
Normal file
12
.idea/dictionaries/project.xml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="project">
|
||||
<words>
|
||||
<w>aniyomi</w>
|
||||
<w>jellyfin</w>
|
||||
<w>mylist</w>
|
||||
<w>requestdl</w>
|
||||
<w>stremio</w>
|
||||
<w>torbox</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
||||
@@ -304,8 +304,7 @@ apply plugin: "kei.plugins.extension.legacy"
|
||||
| `extVersionCode` | The extension version code. This must be a positive integer and incremented with any change to the code. Do not bump for changes that do not affect users, such as changing a private function to a public function. |
|
||||
| `isNsfw` | Flag to indicate that a source contains NSFW content. Should always be set explicitly to either `true` or `false`. Falls back to `false` if not set. |
|
||||
|
||||
The extension's version name is generated automatically by concatenating `14` and `extVersionCode`.
|
||||
With the example used above, the version would be `14.1`.
|
||||
The extension's version name is generated automatically by concatenating `16` and `extVersionCode`. With the example used above, the version would be `16.1`.
|
||||
|
||||
### Core dependencies
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[versions]
|
||||
# Used in [/gradle/build-config/src/main/kotlin/PluginKotlinMultiplatform.kt]
|
||||
android-sdk-min = "21"
|
||||
android-sdk-min = "24"
|
||||
android-sdk-compile = "34"
|
||||
android-sdk-target = "34"
|
||||
java = "11"
|
||||
|
||||
@@ -111,7 +111,7 @@ class AniZone :
|
||||
|
||||
val isLivewire = res.request.url.encodedPath.contains("/livewire/update")
|
||||
val html = if (isLivewire) {
|
||||
res.parseAs<LivewireDto>().getHtml(ANIME_SNAPSHOT_KEY)
|
||||
res.parseAs<LivewireDto>().getHtml(ANIME_SNAPSHOT_KEY).body()
|
||||
} else {
|
||||
res.asJsoup().updateState(ANIME_SNAPSHOT_KEY)
|
||||
}
|
||||
@@ -280,7 +280,7 @@ class AniZone :
|
||||
val res = response.retryOn419 { client.newCall(it).execute() }
|
||||
|
||||
val html = if (res.request.url.encodedPath.contains("/livewire/update")) {
|
||||
res.parseAs<LivewireDto>().getHtml(EPISODE_SNAPSHOT_KEY)
|
||||
res.parseAs<LivewireDto>().getHtml(EPISODE_SNAPSHOT_KEY).body()
|
||||
} else {
|
||||
res.asJsoup().updateState(EPISODE_SNAPSHOT_KEY)
|
||||
}
|
||||
@@ -564,7 +564,7 @@ class AniZone :
|
||||
private fun Document.updateState(mapKey: String): Element {
|
||||
this.selectFirst("script[data-csrf]")?.attr("data-csrf")?.takeIf(String::isNotEmpty)?.let { token = it }
|
||||
this.getSnapshot()?.let { snapShots[mapKey] = it }
|
||||
return this.selectFirst("main > div[wire:snapshot], main > ul[wire:snapshot]") ?: this
|
||||
return this.selectFirst("main > div[wire:snapshot], main > ul[wire:snapshot]") ?: this.body()
|
||||
}
|
||||
|
||||
private fun createLivewireReq(
|
||||
|
||||
@@ -78,7 +78,7 @@ class AV1Encodes :
|
||||
val seen = mutableSetOf<String>()
|
||||
val animes = mutableListOf<SAnime>()
|
||||
|
||||
var searchContext: Element = doc
|
||||
var searchContext: Element = doc.body()
|
||||
val header = doc.select("h1,h2,h3,h4,h5,h6").firstOrNull {
|
||||
it.text().contains("Top Downloads", ignoreCase = true)
|
||||
}
|
||||
@@ -87,7 +87,7 @@ class AV1Encodes :
|
||||
searchContext = if (sibling != null && sibling.text().length > 20) {
|
||||
sibling
|
||||
} else {
|
||||
header.parent() ?: doc
|
||||
header.parent() ?: doc.body()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ class AV1Encodes :
|
||||
val contentRoot = doc.selectFirst(
|
||||
"main, #main, #content, .content, [class*='anime-list'], [class*='anime-grid'], " +
|
||||
"[class*='result'], [class*='listing'], [class*='airing'], section.animes",
|
||||
) ?: doc
|
||||
) ?: doc.body()
|
||||
animes = contentRoot.select("h3").mapNotNull { h3 ->
|
||||
val block = h3.parent() ?: return@mapNotNull null
|
||||
val a = block.selectFirst("a[href*='/anime/']")
|
||||
@@ -361,7 +361,7 @@ class AV1Encodes :
|
||||
?: extractBg(
|
||||
doc.selectFirst(
|
||||
".anime-poster, .poster, .anime-hero, [class*='poster'], [class*='hero']",
|
||||
) ?: doc,
|
||||
) ?: doc.body(),
|
||||
)
|
||||
|
||||
description = doc.selectFirst(
|
||||
|
||||
@@ -475,7 +475,7 @@ class MKissa :
|
||||
private fun String.containsAny(keywords: List<String>): Boolean = keywords.any { this.contains(it) }
|
||||
|
||||
private suspend fun fetchSourceUrls(episode: SEpisode): List<SourceUrl> {
|
||||
val encryptionChangedError = Exception("MKissa changed its stream encryption; update the extension")
|
||||
val encryptionChangedError = Throwable("MKissa changed its stream encryption; update the extension")
|
||||
var lastError: Throwable? = null
|
||||
var buildHealed = false
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import org.jsoup.select.Elements
|
||||
|
||||
data class AnimeDescription(
|
||||
val year: String? = null,
|
||||
@@ -347,10 +348,12 @@ class AnimevostSource(override val name: String, override val baseUrl: String) :
|
||||
// Last-resort fallback: any div that directly wraps a /tip/ link.
|
||||
// We require the container to have an <img> child so that bare
|
||||
// navigation/filter links (genre, type) are not mistaken for anime cards.
|
||||
document.select("a[href*='/tip/']")
|
||||
.mapNotNull { it.parent() }
|
||||
.filter { parent -> parent.selectFirst("img") != null }
|
||||
.distinctBy { it.cssSelector() }
|
||||
Elements(
|
||||
document.select("a[href*='/tip/']")
|
||||
.mapNotNull { it.parent() }
|
||||
.filter { parent -> parent.selectFirst("img") != null }
|
||||
.distinctBy { it.cssSelector() },
|
||||
)
|
||||
}
|
||||
|
||||
containers.forEach { container: Element ->
|
||||
|
||||
Reference in New Issue
Block a user