This commit is contained in:
thumb2086 2026-02-27 14:18:23 -03:00 committed by GitHub
commit 8b7d28254f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View File

@ -239,7 +239,11 @@ class DownloadManagerNotifier extends Notifier<List<DownloadTask>> {
return;
}
if (container.getFileExtension() == "weba") return;
// Skip metadata writing for weba and flac to prevent file corruption
// FLAC files have strict header requirements and writing metadata after
// download can corrupt the sync code and make files unplayable
final extension = container.getFileExtension();
if (extension == "weba" || extension == "flac") return;
final imageBytes = await ServiceUtils.downloadImage(
(task.track.album.images).asUrlString(

View File

@ -247,7 +247,11 @@ class ServerPlaybackRoutes {
await trackPartialCacheFile.rename(trackCacheFile.path);
if (track.qualityPreset!.getFileExtension() == "weba") return;
// Skip metadata writing for weba and flac to prevent file corruption
// FLAC files have strict header requirements and writing metadata after
// download can corrupt the sync code and make files unplayable
final extension = track.qualityPreset!.getFileExtension();
if (extension == "weba" || extension == "flac") return;
final imageBytes = await ServiceUtils.downloadImage(
track.query.album.images.asUrlString(