mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-14 05:17:13 +02:00
Review feedback: the previous shape remembered only the first unnumbered candidate and fell through to a generic error if os.Open failed on it, even though other matching unnumbered files in imgFiles could have succeeded. The pre-PR code was more resilient because it looped and continued on open failure. fromExternalFile now collects every viable unnumbered candidate into a slice during the scan, then tries them in order after the loop, mirroring the pre-PR retry-on-open-failure behavior. Numbered matches still return immediately on first success and skip the candidate list entirely — an open failure on a numbered match means no other file has that number anyway. Also: - globMetaChars doc comment now notes that '\' escape is intentionally excluded (filepath.Match supports it but treating it as a metachar here would misalign extractDiscNumber's literal-prefix extraction with no benefit for realistic config patterns). - The 'cover.jpg doesn't match disc*.*' Entry in the extractDiscNumber table is renamed to 'cover.jpg with disc*.* (no prefix match)' to reflect that the test now exercises the HasPrefix defensive guard, not the removed internal filepath.Match check. Regression test added: a single-folder album with a deleted first candidate file resolves to the second candidate. |
||
|---|---|---|
| .. | ||
| animation.go | ||
| animation_test.go | ||
| artwork.go | ||
| artwork_internal_test.go | ||
| artwork_suite_test.go | ||
| artwork_test.go | ||
| benchmark_decode_test.go | ||
| benchmark_e2e_test.go | ||
| benchmark_encode_test.go | ||
| benchmark_helpers_test.go | ||
| benchmark_pipeline_test.go | ||
| benchmark_tag_test.go | ||
| cache_warmer.go | ||
| cache_warmer_test.go | ||
| image_cache.go | ||
| reader_album.go | ||
| reader_album_test.go | ||
| reader_artist.go | ||
| reader_artist_test.go | ||
| reader_disc.go | ||
| reader_disc_test.go | ||
| reader_mediafile.go | ||
| reader_playlist.go | ||
| reader_radio.go | ||
| reader_radio_test.go | ||
| reader_resized.go | ||
| reader_resized_test.go | ||
| sources.go | ||
| wire_providers.go | ||