mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-11 11:57:12 +02:00
Resized animated GIF covers were converted to animated WebP by ffmpeg inside the image request, bound to its 10s timeout. On slow CPUs large GIFs never finished: ffmpeg was killed, nothing was cached, and every request repeated the work. With ffmpeg 5.1 the conversion also failed mid-stream when reading the GIF from a pipe, after the stream was already handed to the client, so there was no fallback. Requests now get a static stand-in right away, served with no-store and no validators, while the conversion runs in the background. A single process-wide slot bounds these conversions, since they outlive the request throttle; when it is busy nothing is queued and a later request retries. The result, or a static fallback if ffmpeg fails, is cached under the same key. ffmpeg output is now buffered so mid-stream failures fall back to a static resize. The file cache gains cache.Transient for loader results that must be served but not stored. Without an available cache, conversion stays inline. |
||
|---|---|---|
| .. | ||
| benchmark_test.go | ||
| cache_suite_test.go | ||
| cached_http_client.go | ||
| cached_http_client_test.go | ||
| file_caches.go | ||
| file_caches_test.go | ||
| file_haunter.go | ||
| file_haunter_test.go | ||
| simple_cache.go | ||
| simple_cache_test.go | ||
| spread_fs.go | ||
| spread_fs_test.go | ||
| spread_fs_unix.go | ||
| spread_fs_windows.go | ||