mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-02 22:26:52 +02:00
fix(download): verify ReplayGain tags independently of metadata embedding
This commit is contained in:
1 parent
2538cdffe1
commit
fb08110797
2 files changed
+9
-6
No files matched your search
@@ -453,6 +453,10 @@ extension _DownloadQueueEmbedding on DownloadQueueNotifier {
|
||||
_log.d(
|
||||
'Metadata embedding disabled, skipping $format metadata/cover embed',
|
||||
);
|
||||
if (settings.embedReplayGain) {
|
||||
final rg = await ReplayGainService.scanAndApplyToFile(filePath);
|
||||
if (rg != null) _storeTrackReplayGainForAlbum(track, filePath, rg);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -827,12 +831,10 @@ extension _DownloadQueueEmbedding on DownloadQueueNotifier {
|
||||
|
||||
if (settings.embedReplayGain) {
|
||||
try {
|
||||
final rgResult = await FFmpegService.scanReplayGain(filePath);
|
||||
final rgResult = await ReplayGainService.scanAndApplyToFile(
|
||||
filePath,
|
||||
);
|
||||
if (rgResult != null) {
|
||||
await PlatformBridge.editFileMetadata(filePath, {
|
||||
'replaygain_track_gain': rgResult.trackGain,
|
||||
'replaygain_track_peak': rgResult.trackPeak,
|
||||
});
|
||||
_log.d(
|
||||
'ReplayGain for $format: gain=${rgResult.trackGain}, peak=${rgResult.trackPeak}',
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user