fix: metadata enrichment bug and upgrade go-flac to v2

- Fix metadata enrichment bug where failed downloads poison connection pool
  - Create separate metadataTransport for Deezer API calls
  - Add immediate connection cleanup after download failures
- Fix Samsung One UI local library scan with MediaStore fallback
- Fix 'In Library' tracks still showing as downloadable
- Upgrade go-flac packages to v2 (flacpicture v2.0.2, flacvorbis v2.0.2, go-flac v2.0.4)
- Update CHANGELOG.md v3.5.2
This commit is contained in:
zarzet
2026-02-08 12:01:08 +07:00
parent 79a6c8cdc0
commit 5256d6197b
14 changed files with 352 additions and 76 deletions
@@ -3444,6 +3444,14 @@ class DownloadQueueNotifier extends Notifier<DownloadQueueState> {
errorType: errorType,
);
_failedInSession++;
// Immediately cleanup connections after failure to prevent
// poisoned connection pool from affecting subsequent downloads
try {
await PlatformBridge.cleanupConnections();
} catch (e) {
_log.e('Post-failure connection cleanup failed: $e');
}
}
_downloadCount++;
@@ -3485,6 +3493,13 @@ class DownloadQueueNotifier extends Notifier<DownloadQueueState> {
errorType: errorType,
);
_failedInSession++;
// Immediately cleanup connections after exception
try {
await PlatformBridge.cleanupConnections();
} catch (cleanupErr) {
_log.e('Post-exception connection cleanup failed: $cleanupErr');
}
}
}
}
+1 -1
View File
@@ -631,7 +631,7 @@ class _AlbumTrackItem extends ConsumerWidget {
final isCompleted = queueItem?.status == DownloadStatus.completed;
final progress = queueItem?.progress ?? 0.0;
final showAsDownloaded = isCompleted || (!isQueued && isInHistory);
final showAsDownloaded = isCompleted || (!isQueued && isInHistory) || isInLocalLibrary;
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
+1 -1
View File
@@ -955,7 +955,7 @@ if (hasValidImage)
final isCompleted = queueItem?.status == DownloadStatus.completed;
final progress = queueItem?.progress ?? 0.0;
final showAsDownloaded = isCompleted || (!isQueued && isInHistory);
final showAsDownloaded = isCompleted || (!isQueued && isInHistory) || isInLocalLibrary;
return InkWell(
onTap: () => _handlePopularTrackTap(track, isQueued: isQueued, isInHistory: isInHistory, isInLocalLibrary: isInLocalLibrary),
+1 -1
View File
@@ -2466,7 +2466,7 @@ class _TrackItemWithStatus extends ConsumerWidget {
final isCompleted = queueItem?.status == DownloadStatus.completed;
final progress = queueItem?.progress ?? 0.0;
final showAsDownloaded = isCompleted || (!isQueued && isInHistory);
final showAsDownloaded = isCompleted || (!isQueued && isInHistory) || isInLocalLibrary;
return Column(
mainAxisSize: MainAxisSize.min,
+1 -1
View File
@@ -457,7 +457,7 @@ class _PlaylistTrackItem extends ConsumerWidget {
final isCompleted = queueItem?.status == DownloadStatus.completed;
final progress = queueItem?.progress ?? 0.0;
final showAsDownloaded = isCompleted || (!isQueued && isInHistory);
final showAsDownloaded = isCompleted || (!isQueued && isInHistory) || isInLocalLibrary;
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),