mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-21 20:00:49 +01:00
Android's sqflite reads each result row through a cursor window of about 2 MB, so a saved queue whose media_json passes it (roughly 4,000 to 6,000 songs) could not be read back: cold start, Android Auto start and Resume did not restore it, the Home mixes hint failed, and Library cover pruning was skipped while such a session existed. Readers now select the text only when it fits 512 KB, as one read as before. Longer text is read in one transaction as 512 KB pieces of substr(CAST(text AS BLOB)), joined, and decoded (UTF-8 or the database's UTF-16) together with its JSON on another isolate. This covers the active session, the Resume archive and the cover reference scan. The stored data is unchanged, so every build still reads and writes it.