From 3bf6bb4fbc98b914f53e2cb4a109e6c8f8454dc5 Mon Sep 17 00:00:00 2001 From: Ziedelth Date: Wed, 18 Sep 2024 16:18:02 +0200 Subject: [PATCH] fix: crunchyroll call old episodes before their release date --- .../kotlin/fr/shikkanime/platforms/CrunchyrollPlatform.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/fr/shikkanime/platforms/CrunchyrollPlatform.kt b/src/main/kotlin/fr/shikkanime/platforms/CrunchyrollPlatform.kt index ce8052ea..6f9cd410 100644 --- a/src/main/kotlin/fr/shikkanime/platforms/CrunchyrollPlatform.kt +++ b/src/main/kotlin/fr/shikkanime/platforms/CrunchyrollPlatform.kt @@ -152,12 +152,12 @@ class CrunchyrollPlatform : alreadyFetched: List ): List { val list = mutableListOf() - val lastWeek = zonedDateTime.minusWeeks(1).toLocalDate() + val lastWeek = zonedDateTime.minusWeeks(1) episodeVariantService.findAllIdentifierByDateRangeWithoutNextEpisode( countryCode, - lastWeek.atStartOfDay(Constant.utcZoneId), - lastWeek.atEndOfTheDay(Constant.utcZoneId), + lastWeek.toLocalDate().atStartOfDay(Constant.utcZoneId), + lastWeek.plusSeconds(1).withUTC(), getPlatform() ).forEach { identifier -> val crunchyrollId = getCrunchyrollId(identifier) ?: run {