Skip to content

Commit 80958d7

Browse files
committed
Add another variant of the proxer stream url to the checking regex
1 parent 1b1db53 commit 80958d7

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

library/src/main/kotlin/me/proxer/library/util/ProxerUrls.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import okhttp3.HttpUrl
1414
*/
1515
object ProxerUrls {
1616

17-
private val PROXER_STREAM_FILE_HOST_PATTERN = Regex("s[0-9]+(-psc?|\\.stream)\\.proxer\\.me")
17+
private val PROXER_STREAM_FILE_HOST_PATTERN = Regex("s[0-9]+(?:(?:.|-)psc?|\\.stream)\\.proxer\\.me")
1818
private val PROXER_MANGA_HOST_PATTERN = Regex("manga[0-9]+\\.proxer\\.me")
1919

2020
/**

library/src/test/kotlin/me/proxer/library/util/ProxerUrlsTest.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,11 @@ class ProxerUrlsTest {
229229
assertThat(ProxerUrls.hasProxerHost(HttpUrl.get("https://s39-ps.proxer.me/files/test.mp4"))).isTrue()
230230
}
231231

232+
@Test
233+
fun testHasDotSeparatedProxerHostFileStream() {
234+
assertThat(ProxerUrls.hasProxerHost(HttpUrl.get("https://s39.ps.proxer.me/files/test.mp4"))).isTrue()
235+
}
236+
232237
@Test
233238
fun testHasNewProxerHostFileStream() {
234239
assertThat(ProxerUrls.hasProxerHost(HttpUrl.get("https://s39-psc.proxer.me/files/test.mp4"))).isTrue()

0 commit comments

Comments
 (0)