Skip to content

Implement ReplayGain metadata support and editing capabilities.#1670

Merged
theovilardo merged 1 commit into
masterfrom
fix/snapshot-album-art-palette
Apr 6, 2026
Merged

Implement ReplayGain metadata support and editing capabilities.#1670
theovilardo merged 1 commit into
masterfrom
fix/snapshot-album-art-palette

Conversation

@theovilardo

Copy link
Copy Markdown
Collaborator

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.

### 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.
@theovilardo theovilardo merged commit 48d4f24 into master Apr 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant