mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-08-20 09:57:15 +02:00
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:
@@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user