mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-21 20:00:49 +01:00
The daily cover check downloaded every stale Subsonic cover in full and compared it with the cached file byte by byte, although the Link desktop (and many servers) send an ETag and answer If-None-Match with 304. The first rescan of a day fetched all 500 album covers of a Link library at original size. The ETag of a downloaded cover is now kept beside it in <cover>.etag together with the image length. A stale check sends If-None-Match; a 304 keeps the path and touches the modification time, like an unchanged download did, without reading a body. A 200 follows the existing rules (same bytes keep the path, changed bytes get a new path behind .current) and stores the new ETag. A forced refresh, a validator for other bytes, older caches and servers without ETags behave as before. The validator survives restarts. The Library cover prune (Dart and Rust) keeps it with a referenced Subsonic cover, as it keeps the .current pointer, and the song metadata cover cache still keeps 32 covers, each with its ETag, instead of counting ETags as covers. Older builds ignore the files and their prune removes them.