TIKA-4780: Map ID3 TCOP and Vorbis COPYRIGHT to xmpDM:copyright#2940
Open
dschmidt wants to merge 1 commit into
Open
TIKA-4780: Map ID3 TCOP and Vorbis COPYRIGHT to xmpDM:copyright#2940dschmidt wants to merge 1 commit into
dschmidt wants to merge 1 commit into
Conversation
The MP4 parser already maps the cprt atom to xmpDM:copyright, but the copyright message was dropped for the other audio formats. MP3: handle the ID3v2 TCOP frame (TCR in ID3v2.2) following the same pattern as the composer mapping; ID3v1 has no copyright field. The ID3v2.3 and ID3v2.4 test fixtures gain a TCOP frame. Ogg family (Vorbis/Opus/Speex/FLAC): map the copyright comment in the shared OggAudioParser.extractComments. xmpDM:copyright is single-valued, so the first comment is mapped; like the vendor comment, the raw values all stay available under the generic vorbis:copyright name, making this purely additive.
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.
JIRA: https://issues.apache.org/jira/browse/TIKA-4780
The MP4 parser already maps the cprt atom to
xmpDM:copyright; the otheraudio formats dropped the copyright message.
TCOPframe (TCRin ID3v2.2), following thesame pattern as the composer mapping. ID3v1 has no copyright field.
COPYRIGHTcomment inthe shared
OggAudioParser.extractComments.On multiple values: Vorbis comments may legally repeat a key (e.g. separate
"P"- and "C"-line notices), but
xmpDM:copyrightis a single-valued Textproperty, so the first comment is mapped, matching the first-value
convention of the surrounding mappings. Like the vendor comment, the raw
values all remain available under the generic
vorbis:copyrightname, sothe change is purely additive and nothing is dropped.
Testing: the ID3v2.3 and ID3v2.4 fixtures gain a 25-byte
TCOPframe(appended to the tag, audio bytes untouched); assertions added to
Mp3ParserTest, and a newOggAudioParserTestcovers the shared commentmapping including the multiple-comments case.