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

Problem comparing strings with mp4.MP4FreeForm #218

Closed
lazka opened this issue Apr 6, 2015 · 2 comments
Closed

Problem comparing strings with mp4.MP4FreeForm #218

lazka opened this issue Apr 6, 2015 · 2 comments
Labels
bug

Comments

@lazka
Copy link
Member

@lazka lazka commented Apr 6, 2015

Originally reported by: alphapapa (Bitbucket: alphapapa, GitHub: alphapapa)


#!python

>>> import mutagen

>>> t = 'one,two'
>>> m = mutagen.mp4.MP4FreeForm('one,two')

>>> m == t
True
>>> m != t
False

>>> m = mutagen.mp4.MP4FreeForm('one,two-three')

>>> m == t
False
>>> m != t
False

>>> t = 'one,two-three'

>>> m == t
False
>>> m != t
False

As you can see, when a hyphen is in the string, the comparisons seem to always return False, no matter what.


@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Aug 20, 2015

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


mp4: fix MP4FreeForm.eq and MP4Cover.eq when comparing with bytes. Fixes #218

bytes.eq doesn't like subclasses, so do it manually

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Sep 7, 2015

Original comment by alphapapa (Bitbucket: alphapapa, GitHub: alphapapa):


Thank you!

@lazka lazka added major bug labels Apr 7, 2016
@lazka lazka closed this Apr 7, 2016
lazka added a commit that referenced this issue Apr 7, 2016
…ytes. Fixes #218

bytes.__eq__ doesn't like subclasses, so do it manually
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.