artcom-net / mp3-tagger

ID3 data editor
MIT License
35 stars 16 forks source link

MP3OpenFileError('File must be MP3 format') #5

Open hsmett opened 5 years ago

hsmett commented 5 years ago

When reading files, the following check is done:

if self.path.endswith('.mp3'):

Which is a problem if you which to handle badly named files sur as ".MP3".

Would turn it into a case insensitive check, ie

if self.path.lower().endswith('.mp3'):

or even maybe

_, extension = os.path.splitext(self.path)
if extension.lower() == ".mp3":

Thank you!