Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flac: support files with multiple VORBIS_COMMENT blocks. Fixes #377 #378

Merged
merged 1 commit into from Mar 17, 2019

Conversation

@lazka
Copy link
Member

lazka commented Mar 16, 2019

While the flac spec states that "There may be only one VORBIS_COMMENT block in a stream"
metaflac and other programs don't fail when they parse such a file and just use the first
block (same for VLC and Totem).

Instead of raising when loading a file with multiple blocks just use the first one for the
tags interface and leave the other blocks as is, including writing it back as is.

The only other change is in delete() where we delete all VORBIS_COMMENT blocks, even the
ones not exposed. This makes sure that reloading a file that had its tags deleted doesn't
exposed the other tag block suddenly.

Fixes #377

While the flac spec states that "There may be only one VORBIS_COMMENT block in a stream"
metaflac and other programs don't fail when they parse such a file and just use the first
block (same for VLC and Totem).

Instead of raising when loading a file with multiple blocks just use the first one for the
tags interface and leave the other blocks as is, including writing it back as is.

The only other change is in delete() where we delete all VORBIS_COMMENT blocks, even the
ones not exposed. This makes sure that reloading a file that had its tags deleted doesn't
exposed the other tag block suddenly.
@lazka lazka force-pushed the flac-handle-multiple-vcomment-blocks branch from 686e199 to fabb4be Mar 17, 2019
@lazka lazka merged commit e393df5 into master Mar 17, 2019
3 checks passed
3 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
quodlibet.mutagen #20190317.2 succeeded
Details
@lazka lazka deleted the flac-handle-multiple-vcomment-blocks branch Jun 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.