From e42b2ea897b749e525112061db1219364a401261 Mon Sep 17 00:00:00 2001 From: AbdullahM0hamed <25087116+AbdullahM0hamed@users.noreply.github.com> Date: Sat, 14 Nov 2020 17:47:30 +0000 Subject: [PATCH 1/4] appveyor --- appveyor.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..4db6f2daa --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,16 @@ +environment: + matrix: + - ANDROID_HOME: "C:\\android-sdk-windows" +install: + - appveyor DownloadFile https://dl.google.com/android/repository/sdk-tools-windows-3859397.zip + - 7z x sdk-tools-windows-3859397.zip -oC:\android-sdk-windows > nul + - yes | C:\android-sdk-windows\tools\bin\sdkmanager.bat --licenses +build_script: + - cd src + - ls | grep -v "all" | xargs rm -rf + - cd all + - ls | grep -v "emerald" | xargs rm -rf + - cd ../.. + - gradlew.bat assemble +artifacts: + - path: src/*/*/build/outputs/apk/debug/*.apk From 450c58a2990c265b3bfb027b6d3e1870a879c549 Mon Sep 17 00:00:00 2001 From: AbdullahM0hamed <25087116+AbdullahM0hamed@users.noreply.github.com> Date: Sat, 14 Nov 2020 17:57:18 +0000 Subject: [PATCH 2/4] deduplicate emerald search results --- .../kanade/tachiyomi/extension/all/emerald/Emerald.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/all/emerald/src/eu/kanade/tachiyomi/extension/all/emerald/Emerald.kt b/src/all/emerald/src/eu/kanade/tachiyomi/extension/all/emerald/Emerald.kt index 581b1f7a4..6a05e4d21 100644 --- a/src/all/emerald/src/eu/kanade/tachiyomi/extension/all/emerald/Emerald.kt +++ b/src/all/emerald/src/eu/kanade/tachiyomi/extension/all/emerald/Emerald.kt @@ -7,10 +7,12 @@ import eu.kanade.tachiyomi.source.model.FilterList import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga +import eu.kanade.tachiyomi.source.model.MangasPage import eu.kanade.tachiyomi.source.online.ParsedHttpSource import okhttp3.HttpUrl import okhttp3.OkHttpClient import okhttp3.Request +import okhttp3.Response import org.json.JSONArray import org.json.JSONObject import org.jsoup.nodes.Document @@ -153,6 +155,15 @@ open class Emerald( override fun searchMangaNextPageSelector() = latestUpdatesNextPageSelector() + private val searchMangaTitles = HashSet() + + override fun searchMangaParse(response: Response): MangasPage { + val mp = super.searchMangaParse(response) + val manga = mp.mangas.distinctBy { it.title.toLowerCase() }.filterNot { searchMangaTitles.contains(it.title.toLowerCase()) } + searchMangaTitles.addAll(manga.map { it.title.toLowerCase() }) + return MangasPage(manga, mp.hasNextPage) + } + override fun mangaDetailsRequest(manga: SManga): Request { if (manga.url.startsWith("http")) { return GET(manga.url, headers) From 20b18794947a525c365bf337df2506553f11c0ac Mon Sep 17 00:00:00 2001 From: AbdullahM0hamed <25087116+AbdullahM0hamed@users.noreply.github.com> Date: Sat, 14 Nov 2020 18:50:36 +0000 Subject: [PATCH 3/4] rm appveyor --- appveyor.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 4db6f2daa..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,16 +0,0 @@ -environment: - matrix: - - ANDROID_HOME: "C:\\android-sdk-windows" -install: - - appveyor DownloadFile https://dl.google.com/android/repository/sdk-tools-windows-3859397.zip - - 7z x sdk-tools-windows-3859397.zip -oC:\android-sdk-windows > nul - - yes | C:\android-sdk-windows\tools\bin\sdkmanager.bat --licenses -build_script: - - cd src - - ls | grep -v "all" | xargs rm -rf - - cd all - - ls | grep -v "emerald" | xargs rm -rf - - cd ../.. - - gradlew.bat assemble -artifacts: - - path: src/*/*/build/outputs/apk/debug/*.apk From 6e9af5d399250c9ceeb2ff8898e9e0dc16dcb242 Mon Sep 17 00:00:00 2001 From: AbdullahM0hamed <25087116+AbdullahM0hamed@users.noreply.github.com> Date: Sat, 14 Nov 2020 18:52:34 +0000 Subject: [PATCH 4/4] update build.gradle --- src/all/emerald/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/all/emerald/build.gradle b/src/all/emerald/build.gradle index 869023515..511c7bf07 100644 --- a/src/all/emerald/build.gradle +++ b/src/all/emerald/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Emerald' pkgNameSuffix = 'all.emerald' extClass = '.EmeraldFactory' - extVersionCode = 6 + extVersionCode = 7 libVersion = '1.2' }