From 39a16c68b0f153c80c09121f453e522ecdfb1a0c Mon Sep 17 00:00:00 2001 From: jmir1 Date: Fri, 4 Mar 2022 00:37:09 +0100 Subject: [PATCH] normalize line endings --- .gitattributes | 1 + gradlew.bat | 178 +++--- src/en/genoanime/AndroidManifest.xml | 2 +- src/en/genoanime/build.gradle | 24 +- src/en/gogoanime/build.gradle | 24 +- .../animeextension/en/gogoanime/GogoAnime.kt | 548 +++++++++--------- .../en/gogoanime/extractors/DoodExtractor.kt | 78 +-- .../animeextension/en/nineanime/JSONUtil.java | 176 +++--- .../animeextension/en/zoro/JSONUtil.java | 176 +++--- src/id/otakudesu/AndroidManifest.xml | 2 +- src/id/otakudesu/build.gradle | 24 +- 11 files changed, 617 insertions(+), 616 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..176a458f9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/gradlew.bat b/gradlew.bat index ac1b06f93..107acd32c 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,89 +1,89 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/en/genoanime/AndroidManifest.xml b/src/en/genoanime/AndroidManifest.xml index 8b54e3957..acb4de356 100644 --- a/src/en/genoanime/AndroidManifest.xml +++ b/src/en/genoanime/AndroidManifest.xml @@ -1,2 +1,2 @@ - + \ No newline at end of file diff --git a/src/en/genoanime/build.gradle b/src/en/genoanime/build.gradle index e5e4397b5..cfed46319 100644 --- a/src/en/genoanime/build.gradle +++ b/src/en/genoanime/build.gradle @@ -1,12 +1,12 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -ext { - extName = 'GenoAnime' - pkgNameSuffix = 'en.genoanime' - extClass = '.GenoAnime' - extVersionCode = 8 - libVersion = '12' -} - -apply from: "$rootDir/common.gradle" +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' + +ext { + extName = 'GenoAnime' + pkgNameSuffix = 'en.genoanime' + extClass = '.GenoAnime' + extVersionCode = 8 + libVersion = '12' +} + +apply from: "$rootDir/common.gradle" diff --git a/src/en/gogoanime/build.gradle b/src/en/gogoanime/build.gradle index d0025b538..79f0b7f71 100644 --- a/src/en/gogoanime/build.gradle +++ b/src/en/gogoanime/build.gradle @@ -1,12 +1,12 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -ext { - extName = 'Gogoanime' - pkgNameSuffix = 'en.gogoanime' - extClass = '.GogoAnime' - extVersionCode = 30 - libVersion = '12' -} - -apply from: "$rootDir/common.gradle" +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' + +ext { + extName = 'Gogoanime' + pkgNameSuffix = 'en.gogoanime' + extClass = '.GogoAnime' + extVersionCode = 30 + libVersion = '12' +} + +apply from: "$rootDir/common.gradle" diff --git a/src/en/gogoanime/src/eu/kanade/tachiyomi/animeextension/en/gogoanime/GogoAnime.kt b/src/en/gogoanime/src/eu/kanade/tachiyomi/animeextension/en/gogoanime/GogoAnime.kt index e26db1930..5b3cc894e 100644 --- a/src/en/gogoanime/src/eu/kanade/tachiyomi/animeextension/en/gogoanime/GogoAnime.kt +++ b/src/en/gogoanime/src/eu/kanade/tachiyomi/animeextension/en/gogoanime/GogoAnime.kt @@ -1,274 +1,274 @@ -package eu.kanade.tachiyomi.animeextension.en.gogoanime - -import android.app.Application -import android.content.SharedPreferences -import androidx.preference.ListPreference -import androidx.preference.PreferenceScreen -import eu.kanade.tachiyomi.animeextension.en.gogoanime.extractors.DoodExtractor -import eu.kanade.tachiyomi.animeextension.en.gogoanime.extractors.GogoCdnExtractor -import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource -import eu.kanade.tachiyomi.animesource.model.AnimeFilter -import eu.kanade.tachiyomi.animesource.model.AnimeFilterList -import eu.kanade.tachiyomi.animesource.model.SAnime -import eu.kanade.tachiyomi.animesource.model.SEpisode -import eu.kanade.tachiyomi.animesource.model.Video -import eu.kanade.tachiyomi.animesource.online.ParsedAnimeHttpSource -import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.util.asJsoup -import kotlinx.serialization.ExperimentalSerializationApi -import kotlinx.serialization.json.Json -import okhttp3.OkHttpClient -import okhttp3.Request -import okhttp3.Response -import org.jsoup.nodes.Document -import org.jsoup.nodes.Element -import uy.kohesive.injekt.Injekt -import uy.kohesive.injekt.api.get -import uy.kohesive.injekt.injectLazy -import java.lang.Exception - -@ExperimentalSerializationApi -class GogoAnime : ConfigurableAnimeSource, ParsedAnimeHttpSource() { - - override val name = "Gogoanime" - - override val baseUrl = "https://gogoanime.fi" - - override val lang = "en" - - override val supportsLatest = true - - override val client: OkHttpClient = network.cloudflareClient - - private val json: Json by injectLazy() - - private val preferences: SharedPreferences by lazy { - Injekt.get().getSharedPreferences("source_$id", 0x0000) - } - - override fun popularAnimeSelector(): String = "div.img a" - - override fun popularAnimeRequest(page: Int): Request = GET("$baseUrl/popular.html?page=$page") - - override fun popularAnimeFromElement(element: Element): SAnime { - val anime = SAnime.create() - anime.setUrlWithoutDomain(element.attr("href")) - anime.thumbnail_url = element.select("img").first().attr("src") - anime.title = element.attr("title") - return anime - } - - override fun popularAnimeNextPageSelector(): String = "ul.pagination-list li:last-child:not(.selected)" - - override fun episodeListSelector() = "ul#episode_page li a" - - override fun episodeListParse(response: Response): List { - val document = response.asJsoup() - val totalEpisodes = document.select(episodeListSelector()).last().attr("ep_end") - val id = document.select("input#movie_id").attr("value") - return episodesRequest(totalEpisodes, id) - } - - private fun episodesRequest(totalEpisodes: String, id: String): List { - val request = GET("https://ajax.gogo-load.com/ajax/load-list-episode?ep_start=0&ep_end=$totalEpisodes&id=$id", headers) - val epResponse = client.newCall(request).execute() - val document = epResponse.asJsoup() - return document.select("a").map { episodeFromElement(it) } - } - - override fun episodeFromElement(element: Element): SEpisode { - val episode = SEpisode.create() - episode.setUrlWithoutDomain(baseUrl + element.attr("href").substringAfter(" ")) - val ep = element.selectFirst("div.name").ownText().substringAfter(" ") - episode.episode_number = ep.toFloat() - episode.name = "Episode $ep" - episode.date_upload = System.currentTimeMillis() - return episode - } - - override fun videoListParse(response: Response): List