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

Fix audio.tags nonetype bug #74

Merged
merged 4 commits into from
Feb 6, 2022
Merged

Fix audio.tags nonetype bug #74

merged 4 commits into from
Feb 6, 2022

Conversation

Cephian
Copy link
Collaborator

@Cephian Cephian commented Feb 2, 2022

Closes #73. During Busty's 3, a certain mp3 file caused busty to hang forever. The reason was because in the get_cover_art() function, the audio variable tested True for isinstance(audio, ID3FileType) but audio.tags was None. From what I can tell, this is a bug in mutagen itself, as the documentation seems to suggest that this field should always be of type Tags. This PR checks that attributes of MutagenFile are not None before using them.

Copy link
Owner

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be a feature rather than a bug: https://github.com/quodlibet/mutagen/blob/30f373fa6d56e1afa17d48a0c6f3e111267fbd32/mutagen/id3/_file.py#L410. Many mutagen.FileType objects look to set tags to None, including ID3.

This appears to be more a need to mention this edge case in the documentation: quodlibet/mutagen#552

main.py Show resolved Hide resolved
main.py Show resolved Hide resolved
@Cephian Cephian merged commit d43f08d into main Feb 6, 2022
@Cephian Cephian deleted the mutagen_nonetype_audiotag branch February 6, 2022 01:42
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.

Busty hangs when playing certain files
2 participants