Skip to content

Commit

Permalink
wave: consider RIFF type WAVE for file type score
Browse files Browse the repository at this point in the history
  • Loading branch information
phw committed Nov 18, 2019
1 parent 999199f commit 6f2a94d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mutagen/wave.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ class WAVE(FileType):
def score(filename, fileobj, header):
filename = filename.lower()

return (header.startswith(b"RIFF") * 2 + endswith(filename, b".wav") +
endswith(filename, b".wave"))
return (header.startswith(b"RIFF") + (header[8:12] == b'WAVE')
+ endswith(filename, b".wav") + endswith(filename, b".wave"))

def add_tags(self):
"""Add an empty ID3 tag to the file."""
Expand Down

0 comments on commit 6f2a94d

Please sign in to comment.