Modern Apps git

← Modern-Apps.git

youpipe: updated extractor

Commit
7bb19a932c7f7dedee82a51fae1b12d6a875259e
Author
Vayun Mathur <[email protected]>
When
2026-07-24 23:06 UTC (4 months ago)
Parents
5cb9594

Diff

SUPPLY_CHAIN_RISKS.md
diff --git a/SUPPLY_CHAIN_RISKS.md b/SUPPLY_CHAIN_RISKS.mdindex dddc513e66..498ea65823 100644--- a/SUPPLY_CHAIN_RISKS.md+++ b/SUPPLY_CHAIN_RISKS.md@@ -38,7 +38,7 @@ These servers provide data/functionality that is NOT intrinsically tied to a sin |---|---|---|---|---|---| | `weather` | **Open-Meteo Stack (FOSS, keyless)** | `https://api.open-meteo.com/v1/forecast`, `geocoding-api.open-meteo.com/v1/search`, `air-quality-api.open-meteo.com/v1/air-quality`, `map-tiles.open-meteo.com/data_spatial/<model>/latest.json` + `.om` tiles `.../YYYY/MM/DD/HHMMZ/...om` decoded by `libweather_om.so` (vendored C/Rust in `third_party/om-file-format-sys`) | Weather data is commodity; Open-Meteo is one FOSS provider among many. API is keyless and opensource, self-hostable | Forecast, city search, air-quality, weather map shading fails. `WeatherCacheStore` mitigates partially | Self-host Open-Meteo `om-file-format` + DWD ICON model, or swap to PirateWeather, OpenWeather, NOAA GFS direct | | `maps` ratings + live traffic | **Google Places + traffic via self-hosted proxy (transitive)** | `https://api.vayunmathur.com/maps/traffic` (live traffic tiles, `OfflineRouter.kt`), `place_match`, `place_rating` wrapping Google Places (`Reviews.kt`) | Ratings/traffic proxy holds secret; Google is upstream. **Routing is fully offline** via `offlinerouter.so` (C++ `maps/src/main/cpp/`, `OfflineRouter.findRouteNative`) + bundled pmtiles `world_z0-6.pmtiles` + `admin0.fgb/admin1.fgb` + GTFS — no online routing endpoint is called | Place ratings + live-traffic overlay fail; turn-by-turn routing continues fully offline with pre-downloaded zones | Ratings could be OSM/Wikidata; self-host a traffic source. (Online routing already removed in favor of the offline router) |-| `youpipe` extras | **SponsorBlock / DeArrow (community)** | `https://sponsor.ajay.app/api/skipSegments?videoID=`, `/api/branding?videoID=`, `https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=` | Crowdsourced, best-effort extras, not core YouTube | Sponsor skips + DeArrow thumbnails/branding missing, degrades gracefully | Self-host SponsorBlock mirror, or disable feature flag |+| `youpipe` extras | **SponsorBlock / DeArrow (community)** — data APIs now self-hosted | Segment + branding data served from `https://api.vayunmathur.com/api/skipSegments` and `/api/branding` (a local mirror of the SponsorBlock DB, no runtime call to ajay.app). The DeArrow rendered thumbnail frame still uses `https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=` (needs the actual video; not mirrorable from the DB dump) | Crowdsourced, best-effort extras, not core YouTube | Sponsor skips + DeArrow titles/branding continue from the local mirror even if ajay.app is down; only custom thumbnail *images* depend on upstream | ✅ **Partially implemented** — SponsorBlock + DeArrow **data** mirrored into `sponsorblock.db` (`location_share_server/sb_build.sh` rsyncs the public DB dumps; served by `handlers/sponsorblock.rs`). Remaining third-party hop is the DeArrow thumbnail *frame* renderer (would require self-hosting `DeArrowThumbnailCache`: yt-dlp + ffmpeg) | | `maps` / `travel` / `photos` / `weather` | **MapLibre rendering + Wikidata enrichment** | `org.maplibre.compose:maplibre-compose:0.13.0` → `libmaplibre.so`, `https://www.wikidata.org/w/rest.php/wikibase/v1/entities/items/{id}` | Map renderer is FOSS community project (vs Mapbox), Wikidata is enrichment only | Map rendering would need fork/mirror if MapLibre artifacts gone; Wikidata fail is graceful null | Vendor MapLibre AAR, or switch to OpenGL self-render; Wikidata can be removed |  `health` food search hits `api.vayunmathur.com/api/food` — a **self-hosted nutrition DB** (not a third-party proxy), so it is excluded from the risk list per Assumptions.
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 35d791c2cc..7f7bd476de 100644--- a/youpipe/src/main/java/com/vayunmathur/youpipe/util/Extractor.kt+++ b/youpipe/src/main/java/com/vayunmathur/youpipe/util/Extractor.kt@@ -154,10 +154,19 @@ data class DeArrowBranding(     val videoDuration: Double? = null, ) +/**+ * SponsorBlock + DeArrow data APIs are mirrored on the self-hosted proxy+ * (see location_share_server `sb_build.sh` + handlers/sponsorblock.rs), served+ * from a local copy of the SponsorBlock database. The DeArrow *rendered+ * thumbnail frame* is not mirrored (it needs the actual video), so+ * [trustedThumbnailUrl] still points at dearrow-thumb.ajay.app directly.+ */+private const val SPONSORBLOCK_MIRROR = "https://api.vayunmathur.com"+ suspend fun getDeArrowBranding(videoId: Long): DeArrowBranding? {     val idString = decodeVideoID(videoId)     return try {-        NetworkClient.getJson<DeArrowBranding>("https://sponsor.ajay.app/api/branding?videoID=$idString")+        NetworkClient.getJson<DeArrowBranding>("$SPONSORBLOCK_MIRROR/api/branding?videoID=$idString")     } catch (e: Exception) {         null     }@@ -181,7 +190,7 @@ fun DeArrowBranding.trustedThumbnailUrl(videoId: Long): String? { suspend fun getSponsorSegments(videoId: Long): List<SponsorSegment> {     val idString = decodeVideoID(videoId)     return try {-        NetworkClient.getJson("https://sponsor.ajay.app/api/skipSegments?videoID=$idString")+        NetworkClient.getJson("$SPONSORBLOCK_MIRROR/api/skipSegments?videoID=$idString")     } catch (e: Exception) {         emptyList()     }