fix(diag): Video-IDs ohne Ziffern und Titel/Namen in JSON-Zeilen entfernen

Gleiche Regel wie PC und Server (playtube-jam/src/diag.js).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-14 00:02:47 +01:00
co-authored by Claude Opus 5.5
parent 94485dc326
commit e3c534c569
2 changed files with 23 additions and 6 deletions
@@ -23,6 +23,16 @@ class DiagReportTest {
assertEquals("a b", DiagReport.sanitize("a\u0000b"))
}
@Test
fun removesIdsWithoutDigitsAndJsonTitles() {
assertEquals("jam: lade [video]", DiagReport.sanitize("jam: lade JZYXtUJcTws"))
assertEquals(
"Player: {\"artist\":\"[entfernt]\",\"id\":\"[video]\",\"title\":\"[entfernt]\",\"paused\":true}",
DiagReport.sanitize("Player: {\"artist\":\"Band\",\"id\":\"Rlg9P5i1bkQ\",\"title\":\"Mein Song\",\"paused\":true}"),
)
assertEquals("Verbindunge ServerError PlaytubeApp", DiagReport.sanitize("Verbindunge ServerError PlaytubeApp"))
}
@Test
fun recognizesVideoIds() {
assertTrue(DiagReport.looksLikeVideoId("dQw4w9WgXcQ"))