diff --git a/.github/workflows/batch_close_issues.yml b/.github/workflows/batch_close_issues.yml index 2e5ac860..dda22407 100644 --- a/.github/workflows/batch_close_issues.yml +++ b/.github/workflows/batch_close_issues.yml @@ -10,9 +10,9 @@ on: jobs: stale: - runs-on: ubuntu-latest + runs-on: docker steps: - - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9 + - uses: https://github.com/actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} # Close everything older than ~6 months diff --git a/.github/workflows/build_pull_request.yml b/.github/workflows/build_pull_request.yml index c5e88fe3..426ecb5d 100644 --- a/.github/workflows/build_pull_request.yml +++ b/.github/workflows/build_pull_request.yml @@ -18,15 +18,15 @@ env: jobs: prepare: name: Prepare job - runs-on: ubuntu-latest + runs-on: docker outputs: individualMatrix: ${{ steps.generate-matrices.outputs.individualMatrix }} steps: - name: Clone repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + uses: https://github.com/actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - name: Validate Gradle Wrapper - uses: gradle/wrapper-validation-action@a494d935f4b56874c4a5a87d19af7afcf3a163d0 # v2 + uses: https://github.com/gradle/wrapper-validation-action@a494d935f4b56874c4a5a87d19af7afcf3a163d0 # v2 - name: Get number of modules run: | @@ -37,7 +37,7 @@ jobs: - id: generate-matrices name: Create output matrices - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 + uses: https://github.com/actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 with: script: | const numIndividualModules = process.env.NUM_INDIVIDUAL_MODULES; @@ -52,21 +52,26 @@ jobs: build_individual: name: Build individual modules needs: prepare - runs-on: ubuntu-latest + runs-on: docker strategy: matrix: ${{ fromJSON(needs.prepare.outputs.individualMatrix) }} steps: - name: Checkout PR - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + uses: https://github.com/actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - name: Set up JDK - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 + uses: https://github.com/actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 with: java-version: 17 distribution: temurin + + - name: Set up Android SDK + uses: https://github.com/android-actions/setup-android@00854ea68c109d98c75d956347303bf7c45b0277 # v3 + with: + packages: "build-tools;34.0.0" - name: Set up Gradle - uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3 + uses: https://github.com/gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3 with: cache-read-only: true diff --git a/.github/workflows/build_push.yml b/.github/workflows/build_push.yml index fce227e8..97cef149 100644 --- a/.github/workflows/build_push.yml +++ b/.github/workflows/build_push.yml @@ -21,15 +21,22 @@ env: jobs: prepare: name: Prepare job - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 outputs: individualMatrix: ${{ steps.generate-matrices.outputs.individualMatrix }} steps: - name: Clone repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + uses: https://github.com/actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: ref: main token: ${{ secrets.BOT_PAT }} + + - name: Get number of modules + run: | + set -x + projects=(src/*/*) + export CI_CHUNK_NUM=${#projects[@]} + echo "NUM_INDIVIDUAL_MODULES=${#projects[@]}" >> $GITHUB_ENV # Temporary pause because of leak of tj-actions/changed-files # - name: Find lib changes @@ -42,7 +49,7 @@ jobs: # safe_output: false - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@v6 # v6.1.0 + uses: https://github.com/crazy-max/ghaction-import-gpg@v6 # v6.1.0 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} @@ -55,20 +62,10 @@ jobs: # run: | # chmod +x ./.github/scripts/bump-versions.py # ./.github/scripts/bump-versions.py ${{ steps.modified-libs.outputs.all_changed_files }} - - - name: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@v4 - - - name: Get number of modules - run: | - set -x - projects=(src/*/*) - - echo "NUM_INDIVIDUAL_MODULES=${#projects[@]}" >> $GITHUB_ENV - + - id: generate-matrices name: Create output matrices - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 + uses: https://github.com/actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 with: script: | const numIndividualModules = process.env.NUM_INDIVIDUAL_MODULES; @@ -83,27 +80,32 @@ jobs: build_individual: name: Build individual modules needs: prepare - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: ${{ fromJSON(needs.prepare.outputs.individualMatrix) }} steps: - name: Checkout main branch - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + uses: https://github.com/actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: ref: main - name: Set up JDK - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 + uses: https://github.com/actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 with: java-version: 17 distribution: temurin + + - name: Set up Android SDK + uses: https://github.com/android-actions/setup-android@00854ea68c109d98c75d956347303bf7c45b0277 # v3 + with: + packages: "" - name: Prepare signing key run: | echo ${{ secrets.SIGNING_KEY }} | base64 -d > signingkey.jks - name: Set up Gradle - uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3 + uses: https://github.com/gradle/actions/setup-gradle@245c8a24de79c0dbeabaf19ebcbbd3b2c36f278d # v4 - name: Build extensions (chunk ${{ matrix.chunk }}) env: @@ -114,7 +116,7 @@ jobs: run: chmod +x ./gradlew && ./gradlew -p src assembleRelease - name: Upload APKs (chunk ${{ matrix.chunk }}) - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4 + uses: https://code.forgejo.org/forgejo/upload-artifact@16871d9e8cfcf27ff31822cac382bbb5450f1e1e # v4-patch if: "github.repository == 'Kohi-den/extensions-source'" with: name: "individual-apks-${{ matrix.chunk }}" @@ -129,25 +131,34 @@ jobs: needs: - build_individual if: "github.repository == 'Kohi-den/extensions-source'" - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: + - name: Setup rsync + run: | + sudo apt-get update && sudo apt install rsync -y + - name: Download APK artifacts - uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4 + uses: https://code.forgejo.org/forgejo/download-artifact@d8d0a99033603453ad2255e58720b460a0555e1e # v4-patch with: path: ~/apk-artifacts - + - name: Set up JDK - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 + uses: https://github.com/actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 with: java-version: 17 distribution: temurin - + + - name: Set up Android SDK + uses: https://github.com/android-actions/setup-android@00854ea68c109d98c75d956347303bf7c45b0277 # v3 + with: + packages: "build-tools;34.0.0" + - name: Checkout main branch - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + uses: https://github.com/actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: ref: main path: main - + - name: Create repo artifacts run: | cd main @@ -155,10 +166,10 @@ jobs: INSPECTOR_LINK="$(curl -s "https://api.github.com/repos/aniyomiorg/aniyomi-extensions-inspector/releases/latest" | jq -r '.assets[0].browser_download_url')" curl -L "$INSPECTOR_LINK" -o ./Inspector.jar java -jar ./Inspector.jar "repo/apk" "output.json" "tmp" - python ./.github/scripts/create-repo.py + python ./.github/scripts/create-repo.py - name: Checkout repo branch - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + uses: https://github.com/actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: repository: Kohi-den/extensions token: ${{ secrets.BOT_PAT }} @@ -170,9 +181,9 @@ jobs: rsync -a --delete --exclude .git --exclude .gitignore main/repo/ repo --exclude README.md --exclude repo.json - name: Deploy repo - uses: EndBug/add-and-commit@v9 + uses: https://github.com/EndBug/add-and-commit@v9 with: message: "Update extensions repo" cwd: "./repo" - committer_name: Kohi-den-Bot - committer_email: 177773202+Kohi-den-Bot@users.noreply.github.com + committer_name: Kohi-den-bot + committer_email: kohi-den-bot@noreply.localhost diff --git a/.github/workflows/issue_moderator.yml b/.github/workflows/issue_moderator.yml index 52695c98..5389be15 100644 --- a/.github/workflows/issue_moderator.yml +++ b/.github/workflows/issue_moderator.yml @@ -8,10 +8,10 @@ on: jobs: autoclose: - runs-on: ubuntu-latest + runs-on: docker steps: - name: Moderate issues - uses: aniyomiorg/issue-moderator-action@v2 + uses: https://github.com/aniyomiorg/issue-moderator-action@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} duplicate-label: Duplicate diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 9736e440..f1e94756 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -10,11 +10,11 @@ on: jobs: lock: - runs-on: ubuntu-latest + runs-on: docker permissions: issues: write steps: - - uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5 + - uses: https://github.com/dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5 with: github-token: ${{ github.token }} issue-inactive-days: '2' diff --git a/README.md b/README.md index 9ca309a5..e5093f38 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,16 @@ +## Donation + +Support this project by helping keep the servers up + +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/T6T3124BZN) + ## Guide just paste this into your anime repo ``` -https://raw.githubusercontent.com/Kohi-den/extensions/main/index.min.json +https://kohiden.xyz/Kohi-den/extensions/raw/branch/main/index.min.json ``` -If your interested in installing just the apks they can be found [Here](https://github.com/Kohi-den/extensions) +If your interested in installing just the apks they can be found [Here](https://kohiden.xyz/Kohi-den/extensions/src/branch/main/apk) ## Support Server diff --git a/lib-multisrc/dooplay/build.gradle.kts b/lib-multisrc/dooplay/build.gradle.kts index 9dce2478..e2f11e9c 100644 --- a/lib-multisrc/dooplay/build.gradle.kts +++ b/lib-multisrc/dooplay/build.gradle.kts @@ -2,4 +2,4 @@ plugins { id("lib-multisrc") } -baseVersionCode = 2 +baseVersionCode = 3 diff --git a/lib-multisrc/dooplay/src/eu/kanade/tachiyomi/multisrc/dooplay/DooPlay.kt b/lib-multisrc/dooplay/src/eu/kanade/tachiyomi/multisrc/dooplay/DooPlay.kt index 7756075c..f15f184e 100644 --- a/lib-multisrc/dooplay/src/eu/kanade/tachiyomi/multisrc/dooplay/DooPlay.kt +++ b/lib-multisrc/dooplay/src/eu/kanade/tachiyomi/multisrc/dooplay/DooPlay.kt @@ -49,13 +49,13 @@ abstract class DooPlay( const val PREFIX_SEARCH = "path:" } - protected open val prefQualityDefault = "720p" + protected open val prefQualityDefault = "1080p" protected open val prefQualityKey = "preferred_quality" protected open val prefQualityTitle = when (lang) { "pt-BR" -> "Qualidade preferida" else -> "Preferred quality" } - protected open val prefQualityValues = arrayOf("480p", "720p") + protected open val prefQualityValues = arrayOf("360p", "480p", "720p", "1080p") protected open val prefQualityEntries = prefQualityValues protected open val videoSortPrefKey = prefQualityKey diff --git a/lib-multisrc/zorotheme/build.gradle.kts b/lib-multisrc/zorotheme/build.gradle.kts index 00f303c9..04988524 100644 --- a/lib-multisrc/zorotheme/build.gradle.kts +++ b/lib-multisrc/zorotheme/build.gradle.kts @@ -2,7 +2,7 @@ plugins { id("lib-multisrc") } -baseVersionCode = 5 +baseVersionCode = 6 dependencies { api(project(":lib:megacloud-extractor")) diff --git a/lib/buzzheavier-extractor/build.gradle.kts b/lib/buzzheavier-extractor/build.gradle.kts new file mode 100644 index 00000000..c26cbc8a --- /dev/null +++ b/lib/buzzheavier-extractor/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + id("lib-android") +} diff --git a/lib/buzzheavier-extractor/src/main/java/eu/kanade/tachiyomi/lib/buzzheavierextractor/BuzzheavierExtractor.kt b/lib/buzzheavier-extractor/src/main/java/eu/kanade/tachiyomi/lib/buzzheavierextractor/BuzzheavierExtractor.kt new file mode 100644 index 00000000..f03661f6 --- /dev/null +++ b/lib/buzzheavier-extractor/src/main/java/eu/kanade/tachiyomi/lib/buzzheavierextractor/BuzzheavierExtractor.kt @@ -0,0 +1,82 @@ +package eu.kanade.tachiyomi.lib.buzzheavierextractor + +import eu.kanade.tachiyomi.animesource.model.Video +import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.util.asJsoup +import eu.kanade.tachiyomi.util.parseAs +import java.io.IOException +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.Serializable +import okhttp3.Headers +import okhttp3.HttpUrl.Companion.toHttpUrl +import okhttp3.OkHttpClient +import okhttp3.Request +import okhttp3.Response + +class BuzzheavierExtractor( + private val client: OkHttpClient, + private val headers: Headers, +) { + + companion object { + private val SIZE_REGEX = Regex("""Size\s*-\s*([0-9.]+\s*[GMK]B)""") + } + + @OptIn(ExperimentalSerializationApi::class) + fun videosFromUrl(url: String, prefix: String = "Buzzheavier - ", proxyUrl: String? = null): List