From be9349707c6503d12774a629c70303714d749702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaquim=20St=C3=A4hli?= Date: Wed, 18 Dec 2024 08:52:06 +0100 Subject: [PATCH] StartWith instead of contains --- .../pillarbox/core/business/integrationlayer/service/IlHost.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/service/IlHost.kt b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/service/IlHost.kt index d2b0ab610..795b7fbb3 100644 --- a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/service/IlHost.kt +++ b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/service/IlHost.kt @@ -39,7 +39,7 @@ enum class IlHost(val baseHostUrl: String) { * @return The matching [IlHost] or `null` if none was found. */ fun parse(url: String): IlHost? { - return entries.find { url.contains(it.baseHostUrl) } + return entries.find { url.startsWith(it.baseHostUrl) } } } }