diff --git a/src/main/kotlin/fr/shikkanime/entities/enums/ConfigPropertyKey.kt b/src/main/kotlin/fr/shikkanime/entities/enums/ConfigPropertyKey.kt index 621964de..1129ea80 100644 --- a/src/main/kotlin/fr/shikkanime/entities/enums/ConfigPropertyKey.kt +++ b/src/main/kotlin/fr/shikkanime/entities/enums/ConfigPropertyKey.kt @@ -2,57 +2,50 @@ package fr.shikkanime.entities.enums enum class ConfigPropertyKey(val key: String) { SIMULCAST_RANGE("simulcast_range"), - DISCORD_TOKEN("discord_token"), - SEO_DESCRIPTION("seo_description"), - SOCIAL_NETWORK_EPISODES_SIZE_LIMIT("social_network_episodes_size_limit"), - GOOGLE_SITE_VERIFICATION_ID("google_site_verification_id"), - - // Twitter API - TWITTER_CONSUMER_KEY("twitter_consumer_key"), - TWITTER_CONSUMER_SECRET("twitter_consumer_secret"), - TWITTER_ACCESS_TOKEN("twitter_access_token"), - TWITTER_ACCESS_TOKEN_SECRET("twitter_access_token_secret"), - TWITTER_FIRST_MESSAGE("twitter_first_message"), - TWITTER_SECOND_MESSAGE("twitter_second_message"), - - // Threads API - THREADS_APP_ID("threads_app_id"), - THREADS_APP_SECRET("threads_app_secret"), - THREADS_ACCESS_TOKEN("threads_access_token"), - THREADS_FIRST_MESSAGE("threads_first_message"), - THREADS_SECOND_MESSAGE("threads_second_message"), - - // Bsky API + SIMULCAST_RANGE_DELAY("simulcast_range_delay"), + ADMIN_EMAIL("admin_email"), + ADDITIONAL_HEAD_TAGS("additional_head_tags"), + ANIMATION_DITIGAL_NETWORK_SIMULCAST_DETECTION_REGEX("animation_digital_network_simulcast_detection_regex"), + ANIME_EPISODES_SIZE_LIMIT("anime_episodes_size_limit"), + AUTHORIZED_DOMAINS("authorized_domains"), + BOT_ADDITIONAL_REGEX("bot_additional_regex"), + BSKY_FIRST_MESSAGE("bsky_first_message"), BSKY_IDENTIFIER("bsky_identifier"), BSKY_PASSWORD("bsky_password"), - BSKY_SESSION_TIMEOUT("bsky_session_timeout"), - BSKY_FIRST_MESSAGE("bsky_first_message"), BSKY_SECOND_MESSAGE("bsky_second_message"), - - SIMULCAST_RANGE_DELAY("simulcast_range_delay"), + BSKY_SESSION_TIMEOUT("bsky_session_timeout"), + CHECK_PREVIOUS_AND_NEXT_EPISODES("check_previous_and_next_episodes"), + CHECK_SIMULCAST("check_simulcast"), CRUNCHYROLL_FETCH_API_SIZE("crunchyroll_fetch_api_size"), - ANIMATION_DITIGAL_NETWORK_SIMULCAST_DETECTION_REGEX("animation_digital_network_simulcast_detection_regex"), - ANIME_EPISODES_SIZE_LIMIT("anime_episodes_size_limit"), + DISABLE_BOT_DETECTION("disable_bot_detection"), + DISCORD_TOKEN("discord_token"), DISNEY_PLUS_AUTHORIZATION("disney_plus_authorization"), DISNEY_PLUS_REFRESH_TOKEN("disney_plus_refresh_token"), - LAST_FETCH_OLD_EPISODES("last_fetch_old_episodes"), - FETCH_OLD_EPISODES_RANGE("fetch_old_episodes_range"), - FETCH_OLD_EPISODES_LIMIT("fetch_old_episodes_limit"), - ADMIN_EMAIL("admin_email"), EMAIL_HOST("email_host"), + EMAIL_PASSWORD("email_password"), EMAIL_PORT("email_port"), EMAIL_USERNAME("email_username"), - EMAIL_PASSWORD("email_password"), - USE_SECURITY_HEADERS("use_security_headers"), - UPDATE_EPISODE_DELAY("update_episode_delay"), - UPDATE_EPISODE_SIZE("update_episode_size"), + FETCH_OLD_EPISODES_LIMIT("fetch_old_episodes_limit"), + FETCH_OLD_EPISODES_RANGE("fetch_old_episodes_range"), + GOOGLE_SITE_VERIFICATION_ID("google_site_verification_id"), + LAST_FETCH_OLD_EPISODES("last_fetch_old_episodes"), + PREVIOUS_NEXT_EPISODES_DEPTH("previous_next_episodes_depth"), + SEO_DESCRIPTION("seo_description"), + SOCIAL_NETWORK_EPISODES_SIZE_LIMIT("social_network_episodes_size_limit"), + THREADS_ACCESS_TOKEN("threads_access_token"), + THREADS_APP_ID("threads_app_id"), + THREADS_APP_SECRET("threads_app_secret"), + THREADS_FIRST_MESSAGE("threads_first_message"), + THREADS_SECOND_MESSAGE("threads_second_message"), + TWITTER_ACCESS_TOKEN("twitter_access_token"), + TWITTER_ACCESS_TOKEN_SECRET("twitter_access_token_secret"), + TWITTER_CONSUMER_KEY("twitter_consumer_key"), + TWITTER_CONSUMER_SECRET("twitter_consumer_secret"), + TWITTER_FIRST_MESSAGE("twitter_first_message"), + TWITTER_SECOND_MESSAGE("twitter_second_message"), UPDATE_ANIME_DELAY("update_anime_delay"), UPDATE_ANIME_SIZE("update_anime_size"), - CHECK_PREVIOUS_AND_NEXT_EPISODES("check_previous_and_next_episodes"), - PREVIOUS_NEXT_EPISODES_DEPTH("previous_next_episodes_depth"), - - AUTHORIZED_DOMAINS("authorized_domains"), - ADDITIONAL_HEAD_TAGS("additional_head_tags"), - BOT_ADDITIONAL_REGEX("bot_additional_regex"), - DISABLE_BOT_DETECTION("disable_bot_detection"), + UPDATE_EPISODE_DELAY("update_episode_delay"), + UPDATE_EPISODE_SIZE("update_episode_size"), + USE_SECURITY_HEADERS("use_security_headers"), } \ No newline at end of file diff --git a/src/main/kotlin/fr/shikkanime/platforms/AnimationDigitalNetworkPlatform.kt b/src/main/kotlin/fr/shikkanime/platforms/AnimationDigitalNetworkPlatform.kt index b23eb86f..dc925dad 100644 --- a/src/main/kotlin/fr/shikkanime/platforms/AnimationDigitalNetworkPlatform.kt +++ b/src/main/kotlin/fr/shikkanime/platforms/AnimationDigitalNetworkPlatform.kt @@ -46,7 +46,7 @@ class AnimationDigitalNetworkPlatform : api.forEach { try { - list.addAll(convertEpisode(countryCode, it, zonedDateTime)) + list.addAll(convertEpisode(countryCode, it, zonedDateTime, needSimulcast = configCacheService.getValueAsBoolean(ConfigPropertyKey.CHECK_SIMULCAST, true))) } catch (_: AnimeException) { // Ignore } catch (_: NotSimulcastedMediaException) { diff --git a/src/main/kotlin/fr/shikkanime/platforms/CrunchyrollPlatform.kt b/src/main/kotlin/fr/shikkanime/platforms/CrunchyrollPlatform.kt index 69c4f849..ce335dd7 100644 --- a/src/main/kotlin/fr/shikkanime/platforms/CrunchyrollPlatform.kt +++ b/src/main/kotlin/fr/shikkanime/platforms/CrunchyrollPlatform.kt @@ -69,7 +69,7 @@ class CrunchyrollPlatform : AbstractPlatform + + + + + + + SELECT COUNT(*) + FROM config + WHERE property_key = 'check_simulcast' + + + + + + + + + \ 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 71885a69..68d9c908 100644 --- a/src/main/resources/db/changelog/db.changelog-master.xml +++ b/src/main/resources/db/changelog/db.changelog-master.xml @@ -83,4 +83,5 @@ + \ No newline at end of file