From 66612f5164fe33b13c1457c6fde23e70ca9a954a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 10:06:21 +0000 Subject: [PATCH 1/2] Bump com.fasterxml.jackson.dataformat:jackson-dataformat-xml Bumps [com.fasterxml.jackson.dataformat:jackson-dataformat-xml](https://github.com/FasterXML/jackson-dataformat-xml) from 2.16.2 to 2.17.0. - [Commits](https://github.com/FasterXML/jackson-dataformat-xml/compare/jackson-dataformat-xml-2.16.2...jackson-dataformat-xml-2.17.0) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-xml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 3b976631..941bb9fc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ val guiceVersion = "7.0.0" val liquibaseCoreVersion = "4.26.0" val quartzVersion = "2.5.0-rc1" val guavaVersion = "33.0.0-jre" -val jacksonVersion = "2.16.2" +val jacksonVersion = "2.17.0" val playwrightVersion = "1.42.0" val jsoupVersion = "1.17.2" val gsonVersion = "2.10.1" From 78a8a1c0f1b8230003bd8c200bb6bdc468a3bba6 Mon Sep 17 00:00:00 2001 From: Ziedelth Date: Thu, 14 Mar 2024 10:36:03 +0100 Subject: [PATCH 2/2] Add configurable fetch size for Crunchyroll API and update database schema --- .../entities/enums/ConfigPropertyKey.kt | 1 + .../platforms/CrunchyrollPlatform.kt | 6 ++++- .../db/changelog/2024/03/05-changelog.xml | 24 +++++++++++++++++++ .../db/changelog/db.changelog-master.xml | 1 + 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/db/changelog/2024/03/05-changelog.xml diff --git a/src/main/kotlin/fr/shikkanime/entities/enums/ConfigPropertyKey.kt b/src/main/kotlin/fr/shikkanime/entities/enums/ConfigPropertyKey.kt index 208b3be3..988268d1 100644 --- a/src/main/kotlin/fr/shikkanime/entities/enums/ConfigPropertyKey.kt +++ b/src/main/kotlin/fr/shikkanime/entities/enums/ConfigPropertyKey.kt @@ -27,4 +27,5 @@ enum class ConfigPropertyKey(val key: String) { ANALYTICS_DOMAIN("analytics_domain"), ANALYTICS_API("analytics_api"), ANALYTICS_SCRIPT("analytics_script"), + CRUNCHYROLL_FETCH_API_SIZE("crunchyroll_fetch_api_size"), } \ No newline at end of file diff --git a/src/main/kotlin/fr/shikkanime/platforms/CrunchyrollPlatform.kt b/src/main/kotlin/fr/shikkanime/platforms/CrunchyrollPlatform.kt index 160188b6..52733c9b 100644 --- a/src/main/kotlin/fr/shikkanime/platforms/CrunchyrollPlatform.kt +++ b/src/main/kotlin/fr/shikkanime/platforms/CrunchyrollPlatform.kt @@ -211,7 +211,11 @@ class CrunchyrollPlatform : AbstractPlatform { return if (configCacheService.getValueAsBoolean(ConfigPropertyKey.USE_CRUNCHYROLL_API)) { - CrunchyrollWrapper.getBrowse(key.locale, identifiers[key]!!.first) + CrunchyrollWrapper.getBrowse( + key.locale, + identifiers[key]!!.first, + size = configCacheService.getValueAsInt(ConfigPropertyKey.CRUNCHYROLL_FETCH_API_SIZE, 25) + ) } else { val url = "https://www.crunchyroll.com/rss/anime?lang=${key.locale.replace("-", "")}" val response = HttpRequest().get(url) diff --git a/src/main/resources/db/changelog/2024/03/05-changelog.xml b/src/main/resources/db/changelog/2024/03/05-changelog.xml new file mode 100644 index 00000000..2b3b4dc6 --- /dev/null +++ b/src/main/resources/db/changelog/2024/03/05-changelog.xml @@ -0,0 +1,24 @@ + + + + + + + + SELECT COUNT(*) + FROM config + WHERE property_key = 'crunchyroll_fetch_api_size' + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db/changelog/db.changelog-master.xml b/src/main/resources/db/changelog/db.changelog-master.xml index b0c0c05c..fba7c78b 100644 --- a/src/main/resources/db/changelog/db.changelog-master.xml +++ b/src/main/resources/db/changelog/db.changelog-master.xml @@ -34,4 +34,5 @@ + \ No newline at end of file