mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-21 06:52:18 +02:00
_saveCoverArt and _saveLyrics repeated the same SAF/local publish skeleton: render into a temp dir and publish it to the download tree with createSafFileFromPath (or write next to the audio file), clean the temp dir, then report the outcome. Move that skeleton into _publishSidecarFile with parameters for the temp prefix, extension, mime type, success message and whether a snackbar hides the current one. Each caller keeps its own try/catch, base name, lyrics progress snackbar and the render step. The cover render returns null after its no-source snackbar so the helper stops at the same point as before (without deleting the temp dir, as before). Await order, mounted checks, messages and cleanup placement are unchanged.