Implement ReplayGain metadata support and editing capabilities.#1670
Merged
Conversation
### Metadata & Discovery
- **ReplayGain Support**: Enhanced `AudioMetadataReader` to extract track and album gain values from common tags (`REPLAYGAIN_TRACK_GAIN`, `R128_TRACK_GAIN`, etc.) across different file formats.
- **Tag Parsing**: Implemented robust parsing logic for ReplayGain values to handle various formats (e.g., handling commas, "dB" suffixes, and unit normalization).
### Metadata Editing
- **Enhanced `SongMetadataEditor`**: Added support for writing ReplayGain tags.
- Implemented format-specific logic for ID3v2 (TXXX frames), FLAC/Vorbis (Vorbis Comments), and MP4 (Reverse DNS fields).
- Added "Keep", "Clear", and "Set" update modes to ensure precise tag management during edits.
- **UI Integration**:
- **EditSongSheet**: Introduced new input fields for Track and Album ReplayGain (dB).
- **Validation**: Added validation and normalization for decimal gain inputs in the edit flow.
- **ViewModel Updates**: Refactored `PlayerViewModel` and `MetadataEditStateHolder` to propagate ReplayGain updates through the metadata editing pipeline.
### UI & Screen Improvements
- **Component Synchronization**: Updated `SongInfoBottomSheet` and all major screens (`Library`, `ArtistDetail`, `AlbumDetail`, `Search`, etc.) to support the extended `onEditSong` signature.
- **Embedded Metadata**: Improved `EditSongSheet` to proactively read embedded metadata from files when database entries are incomplete.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Metadata & Discovery
AudioMetadataReaderto extract track and album gain values from common tags (REPLAYGAIN_TRACK_GAIN,R128_TRACK_GAIN, etc.) across different file formats.Metadata Editing
SongMetadataEditor: Added support for writing ReplayGain tags.PlayerViewModelandMetadataEditStateHolderto propagate ReplayGain updates through the metadata editing pipeline.UI & Screen Improvements
SongInfoBottomSheetand all major screens (Library,ArtistDetail,AlbumDetail,Search, etc.) to support the extendedonEditSongsignature.EditSongSheetto proactively read embedded metadata from files when database entries are incomplete.