mirror of
https://github.com/afkarxyz/SpotiFLAC.git
synced 2026-04-26 15:45:54 +03:00
[PR #445] [CLOSED] feat: Add genre fetching and file metadata embedding via MusicBrainz API #547
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SpotiFLAC#547
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/afkarxyz/SpotiFLAC/pull/445
Author: @Nox-code
Created: 2/3/2026
Status: ❌ Closed
Base:
main← Head:feature/genre-fetching📝 Commits (2)
af19d65feat: Add genre fetching and file metadata embedding via MusicBrainz API5886ad3Delete GEMINI.md📊 Changes
14 files changed (+315 additions, -36 deletions)
View changed files
📝
app.go(+11 -9)📝
backend/amazon.go(+4 -3)📝
backend/metadata.go(+14 -0)📝
backend/qobuz.go(+2 -1)📝
backend/spotfetch.go(+34 -0)📝
backend/spotify_metadata.go(+190 -8)📝
backend/tidal.go(+6 -4)📝
frontend/src/App.tsx(+1 -0)📝
frontend/src/components/SettingsPage.tsx(+12 -0)📝
frontend/src/hooks/useDownload.ts(+23 -7)📝
frontend/src/hooks/useMetadata.ts(+5 -2)📝
frontend/src/lib/api.ts(+2 -1)📝
frontend/src/lib/settings.ts(+9 -1)📝
frontend/src/types/api.ts(+2 -0)📄 Description
Description
This PR adds the ability to automatically fetch and embed genre metadata for downloaded tracks. Since Spotify's internal API does not reliably provide genre information for individual tracks, this implementation integrates with the MusicBrainz API to perform accurate lookups.
Key Changes
Genre Fetching (MusicBrainz Integration)
fetchGenreFromMusicBrainzfunction in the backend.Artist - Track) for better accuracy.Metadata Embedding
backend/metadata.goto support embedding theGenretag across all supported formats:GENREVorbis comment.TCONframe.genreatom via FFmpeg.ExtractFullMetadataFromFilesupport for the genre field to ensure consistency.User Settings
Codebase Updates
DownloadRequestandTrackMetadatastructures in both backend and frontend to carry thegenrefield.Tidal,Amazon,Qobuz) to accept and pass the genre to the metadata embedder.FilterTrackto ensure artist IDs are correctly extracted when primary extraction is unavailable.Testing
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.