From 034b21294ff21aa91c5d51853643659d72d1d91f Mon Sep 17 00:00:00 2001 From: Sven Jacobs Date: Fri, 29 Sep 2023 07:43:09 +0200 Subject: [PATCH] fix: Add trg parameter to Netflix sanitizer --- .../app/leon/core/domain/sanitizer/netflix/NetflixSanitizer.kt | 2 +- .../leon/core/domain/sanitizer/netflix/NetflixSanitizerTest.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core-domain/src/main/kotlin/com/svenjacobs/app/leon/core/domain/sanitizer/netflix/NetflixSanitizer.kt b/core-domain/src/main/kotlin/com/svenjacobs/app/leon/core/domain/sanitizer/netflix/NetflixSanitizer.kt index 2ba98516..6e5350e2 100644 --- a/core-domain/src/main/kotlin/com/svenjacobs/app/leon/core/domain/sanitizer/netflix/NetflixSanitizer.kt +++ b/core-domain/src/main/kotlin/com/svenjacobs/app/leon/core/domain/sanitizer/netflix/NetflixSanitizer.kt @@ -27,7 +27,7 @@ import com.svenjacobs.app.leon.core.domain.sanitizer.Sanitizer import com.svenjacobs.app.leon.core.domain.sanitizer.SanitizerId class NetflixSanitizer : RegexSanitizer( - regex = RegexFactory.ofParameter("s|t|trkid|vlang|clip|netflixsource|fromApp"), + regex = RegexFactory.ofParameter("s|t|trkid|vlang|clip|netflixsource|fromApp|trg"), ) { override val id = SanitizerId("netflix") diff --git a/core-domain/src/test/kotlin/com/svenjacobs/app/leon/core/domain/sanitizer/netflix/NetflixSanitizerTest.kt b/core-domain/src/test/kotlin/com/svenjacobs/app/leon/core/domain/sanitizer/netflix/NetflixSanitizerTest.kt index 1905abb2..d7e52539 100644 --- a/core-domain/src/test/kotlin/com/svenjacobs/app/leon/core/domain/sanitizer/netflix/NetflixSanitizerTest.kt +++ b/core-domain/src/test/kotlin/com/svenjacobs/app/leon/core/domain/sanitizer/netflix/NetflixSanitizerTest.kt @@ -29,7 +29,8 @@ class NetflixSanitizerTest : WordSpec( "remove various Netflix parameters" { val result = sanitizer( - "https://www.netflix.com/de/title/81040344?s=a&trkid=13747225&t=more&vlang=de&clip=81499054", + "https://www.netflix.com/de/title/81040344?s=a&trkid=13747225&t=more&vl" + + "ang=de&clip=81499054&trg=trg", ) result shouldBe "https://www.netflix.com/de/title/81040344"