Banners: download those in the server's files, larger and slower ones

Not every banner arrived:

- Banners kept in the server's own files are linked as ts3image://
  (TeamSpeak 5 and 6: ts3image://<host>?port=…&channel=…&path=…&filename=…,
  the file browser's ts3file:// link with its scheme changed; TeamSpeak 3:
  ts3image://<name>?channel=…&path=…). Only http(s) was fetched, so these
  never were. They now come through the voice connection's file transfer
  (files::server_image), cached under the server and the address.
- A web download had 16 MiB at most and 30 seconds in all, while up to
  eight run at once: a large animated banner, or several on a slow link,
  failed and failed again on every retry. Pictures may now be 64 MiB and
  go to disk as they arrive instead of into memory; a download fails when
  nothing arrives for 20 s or when, after its first 30 s, it averages less
  than 32 KiB/s. Accept names the formats the UI decodes.
- Pictures over file transfer had 30 seconds too; now 30 s plus their
  size at 32 KiB/s, and at most 64 MiB.

The voice protocol's MAX_DECOMPRESSED_SIZE goes back to 2 MiB: it bounds
compressed commands (the channel list), not pictures, and QuickLZ reserves
the size a packet declares, so 1 GiB let any server make the client
allocate a gigabyte with one small packet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEpqsPES27Eacue91u3d2Q
This commit is contained in:
Claude committed 2026-10-04 16:37:02 +00:00
1 parent 3f177a77aa
commit 86c30b6f8f
8 files changed
+333 -58

No files matched your search

+2 -2
View File
@@ -1125,11 +1125,11 @@ pub static CACHE_MAX_MB: Key<u64> = Key::new(
|| 256,
);
/// Download the avatars, icons and web banners of servers we are on.
/// Download the avatars, icons and banners of servers we are on.
pub static CACHE_FETCH_IMAGES: Key<bool> = Key::new(
"cache.fetch_images",
Kind::Bool,
"Download avatars, icons and web banners of the servers we are on.",
"Download avatars, icons and banners of the servers we are on.",
|| true,
);