Minamp 1.3

- Fix NoSuchMethodError on Android 2.x: Dalvik before 4.0 can't link Object
  methods (toString/equals/...) called through an interface. Patch the bundled
  Bouncy Castle (tools/patch_bc_dalvik.py) and our own CertVerifier, and make
  build.sh fail if tools/scan_dalvik.py finds any such call
- Treat a manually entered private address (10.x, 172.16-31.x, 192.168.x,
  .local) as home, so LAN servers that allow access without sign-in work
- Send Plex client headers on media requests (files and transcodes)
- Explain a 503 on a file as the server being unable to open it (drive or
  folder not available)
- Connection log: home/away, token presence, Plex's file check and a direct
  file request in the streaming test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xockoandClaude Opus 5.5 committed 2026-10-14 20:56:27 +02:00
1 parent a4b875ef34
commit 58d21b6d68
14 files changed
+218 -13

No files matched your search

+19 -1
View File
@@ -251,12 +251,30 @@ public final class Library {
return server.url(base + "?" + q);
}
/** Whether the server can actually read a track's file (Plex's checkFiles), for diagnostics. */
public String checkPart(Item t) {
try {
Json.Obj mc = server.get("/library/metadata/" + t.ratingKey + "?checkFiles=1");
Json.Arr md = mc == null ? null : mc.optArr("Metadata");
Json.Obj m = md == null ? null : md.optObj(0);
Json.Arr media = m == null ? null : m.optArr("Media");
Json.Obj me = media == null ? null : media.optObj(0);
Json.Arr parts = me == null ? null : me.optArr("Part");
Json.Obj p = parts == null ? null : parts.optObj(0);
if (p == null) return "no file information returned";
return "exists=" + p.optString("exists", "?") + " accessible=" + p.optString("accessible", "?")
+ " file=" + p.optString("file", "?");
} catch (Exception e) {
return com.minamp.net.Threads.describe(e);
}
}
/** Ask the server what it would do with a transcode request (for the diagnostics screen). */
public String decision(Item t, int kbps, int variant) {
try {
String url = transcodeUrl(t, kbps, 0, "minamp-check-" + System.currentTimeMillis(), variant);
url = url.replace("/start.mp3?", "/decision?").replace("/universal/start?", "/universal/decision?");
com.minamp.net.Http.Response r = com.minamp.net.Http.get(url, Plex.headers(null), 20000);
com.minamp.net.Http.Response r = com.minamp.net.Http.get(url, server.mediaHeaders(), 20000);
String body = r.readString();
if (r.code != 200) return "HTTP " + r.code + (Plex.snippet(body).length() > 0 ? ": " + Plex.snippet(body) : "");
Json.Obj mc = Json.parseObj(body).optObj("MediaContainer");