Plexamp Lite 1.14.1: read-ahead no longer cut off ("Unexpected end of stream")

Two causes, both fixed:
- Plex keeps one file stream per device and cuts the one in progress when another starts, so the read-ahead
  and the player cut each other off. Whole-file fetches (read-ahead, downloads, download-first) now ask for
  the file as a download (?download=1), which Plex leaves out of that rule; the plain address follows for
  servers that refuse downloads.
- Http.abort closed the socket of a response already read to the end, whose connection was back in the pool
  and could be carrying the read-ahead. abort now leaves finished responses alone (test/PoolAbortTest.java).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
XoséandClaude Opus 5.5 committed 2026-11-01 19:09:53 +01:00
1 parent 13f29e26c4
commit a37711afc0
10 files changed
+160 -23

No files matched your search

+6 -1
View File
@@ -63,7 +63,10 @@ clock has been reset to before 2024 the certificate date check is skipped rather
Bluetooth share one radio, and a lighter stream keeps the speaker from stuttering.
* Seeking in a transcoded track restarts the transcode at the new position.
* **Read-ahead:** while a track plays, the next two in the queue are fetched whole in the background
(one at a time) and then played from the file; without an SD card only the next one is kept. Android 2.x's player keeps only a few seconds of stream buffer, so on weak
(one at a time) and then played from the file; without an SD card only the next one is kept. Plex keeps one
file stream per device and cuts the one in progress when another starts, so whole-file fetches (read-ahead,
downloads, *Download tracks before playing*) ask for the file as a download (`?download=1`), which Plex leaves
out of that rule; otherwise the read-ahead and the player cut each other off. Android 2.x's player keeps only a few seconds of stream buffer, so on weak
Wi-Fi shared with a Bluetooth speaker it used to go silent for seconds at a time.
* If a stream fails, Plexamp Lite re-picks the connection and resumes; if it fails again it downloads
the whole track first and plays from the SD card. "Download tracks before playing" forces that
@@ -156,6 +159,8 @@ Tests (desktop JVM, no device):
* `test/QueueTest.java`: shuffle/unshuffle, repeat modes, play next, remove, move, clear.
* `test/LyricsTest.java`: LRC (several stamps a line, offsets, word stamps) and plain-text lyrics
(`javac -d /tmp/lt src/com/minamp/util/Lrc.java test/LyricsTest.java && java -cp /tmp/lt LyricsTest`).
* `test/PoolAbortTest.java` (`test/run_pool_abort.sh`): aborting a response that's already finished leaves
its pooled connection, now carrying another request, alone.
* `test/PreferHomeTest.java` + `test/identity_server.py`: after being away, the home address wins
again as soon as it answers.
* `test/NetTest.java`: the bundled TLS + HTTP client against real servers; `test/HandshakeProfile.java`