mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-21 20:00:49 +01:00
Starting a song from a granted Android folder looked for the .mlrc file, the .lrc file and cover.mp4 with three separate native calls, each resolving the song's parent again and listing the whole folder to find one name. Big flat folders paid that three times on every song start. One native call now resolves the parent once, reads the song's name once and finds every wanted name in a single listing, returning uri, size and modification time for each file that exists. A small Dart lookup shares that answer between the lyrics sidecar reads and the motion cover lookup for a few seconds, so one song start lists the folder once while a later start of the same song asks again. Writing a sidecar or a tag change of the song forgets the shared answer. Sidecar contents are read by document uri only for files that exist, with the same 8 MB cap. Name rules are unchanged and now live in a pure helper with JVM tests.