Skip to content

Commit

Permalink
Fix bug where "FLAC" alone wouldn't be replaced
Browse files Browse the repository at this point in the history
  • Loading branch information
somewacko committed Jun 30, 2017
1 parent 9a37a2f commit 948acfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion whatmp3.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def main():

for codec in codecs:
outdir = os.path.basename(flacdir)
flacre_str = '(16|24)((-| )*(bit|44|48|96)* *)*FLAC(16|24| )*((16|24)*(-| )*(bit|44|48|96)*)*'
flacre_str = '((16|24)+(-| )*(bit|44|48|96)* *)*FLAC *((16|24)+(-| )*(bit|44|48|96)*)*'
flacre = re.compile(flacre_str, re.IGNORECASE)
if flacre.search(outdir):
outdir = flacre.sub(codec, outdir)
Expand Down

0 comments on commit 948acfe

Please sign in to comment.