feat(metadata): write source URL into dedicated tag (#605)#863
Open
SnitchTeam wants to merge 1 commit into
Open
feat(metadata): write source URL into dedicated tag (#605)#863SnitchTeam wants to merge 1 commit into
SnitchTeam wants to merge 1 commit into
Conversation
Adds the originating URL to a dedicated metadata tag in addition to the existing COMMENT fallback: Vorbis SOURCE for FLAC, ID3 WOAS + TXXX/SOURCE for MP3, and 'source' for M4A. Improves compatibility with library managers like MusicBrainz Picard and Beets. Closes spotbye#605
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.
Summary
Adds the originating source URL of each download to a dedicated metadata tag in addition to the existing
COMMENTfallback, so library managers (MusicBrainz Picard, Beets, foobar2000, etc.) can read where the file came from.Changes
SOURCEtag whenmetadata.URLis non-empty.WOAS(Official audio source webpage) URL frame, plus aTXXXuser-defined frame with descriptionSOURCEfor maximum tagger compatibility (Picard/Beets).-metadata source=<url>to ffmpeg.The existing
COMMENT/COMM/commentfallback behavior (URL written into the comment when no explicit comment is set) is preserved, so users relying on it are not affected. The new source tag is only written whenmetadata.URLis non-empty.Notes
bogem/id3v2library does not expose a typed URL link frame, soWOASis written viaAddFrame("WOAS", id3v2.UnknownFrame{Body: []byte(url)}), which produces a spec-compliant URL link frame body (raw URL bytes, no encoding byte).backend/metadata.go).Test
go build ./...✅go vet ./backend/...✅Closes #605