Modern Apps git

← Modern-Apps.git

youpipe: make sponsorblock/dearrow mirrors overridable for tests

Commit
e130b09ab59f86795a5f485cb839ceec4aa2b4f0
Author
Vayun Mathur <[email protected]>
When
2026-11-06 18:38 UTC (29 days ago)
Parents
61f6c1b
private const -> internal var with identical defaults, so tests can point
them at a closed port to exercise the best-effort fallbacks. No behavior
change in production.

(cherry picked from commit 44d1e319d10befaa8974b8bce97e8995dc027aba)

Diff

youpipe/src/main/java/com/vayunmathur/youpipe/util/Extractor.kt
diff --git a/youpipe/src/main/java/com/vayunmathur/youpipe/util/Extractor.kt b/youpipe/src/main/java/com/vayunmathur/youpipe/util/Extractor.ktindex 89c1251c94..925c47df34 100644--- a/youpipe/src/main/java/com/vayunmathur/youpipe/util/Extractor.kt+++ b/youpipe/src/main/java/com/vayunmathur/youpipe/util/Extractor.kt@@ -184,9 +184,12 @@ data class DeArrowBranding(  * in `location_share_server/src/handlers/dearrow.rs`, inspired by  * ajayyy/DeArrowThumbnailCache but written from scratch), with fallback proxy  * to dearrow-thumb.ajay.app.+ *+ * `internal var` (not const) so tests can point it at a closed port to+ * exercise the best-effort fallbacks; production keeps the default below.  */-private const val SPONSORBLOCK_MIRROR = "https://api.maproj.org"-private const val DEARROW_THUMB_MIRROR = "https://api.maproj.org/api/dearrow/thumbnail"+internal var SPONSORBLOCK_MIRROR = "https://api.maproj.org"+internal var DEARROW_THUMB_MIRROR = "https://api.maproj.org/api/dearrow/thumbnail"  suspend fun getDeArrowBranding(videoId: Long): DeArrowBranding? {     val idString = decodeVideoID(videoId)