Skip to content

v1.2.2 — file safety fixes

Choose a tag to compare

@formeo formeo released this 12 Oct 10:59
· 9 commits to main since this release
6907f1e

A safety release. If you run music-recognize on a real collection, upgrade. With default flags, 1.2.1 renamed every recognized file and deleted non-MP3 originals.

⚠️ Behavior change

  • --convert is now off by default. With --convert, the original file is kept; add --delete-source to remove it after a successful conversion.
    Previously every WAV/FLAC/M4A/OGG/OPUS file was transcoded to MP3 320k and the original was deleted, even when recognition later failed.
  • Python API: process_directory(convert_formats=False) is the new default, and there is a new delete_source argument.
  • If Shazam returns no album, the album stays empty: no Unknown Album tag, no Unknown Album folder with --organize.

🐛 Fixes

  • Recognized files were renamed to name (1).mp3 on every run, even without --rename. A second run now changes nothing on disk.
  • --rename kept .mp3 from the template for every format, so a FLAC file became Artist - Title.mp3. Files now keep their real extension, and old templates ending in .mp3 still work.
  • The genre tag contained Open in Apple Music instead of the actual genre.
  • A cache hit crashed with TypeError, which broke the --dry-run → real run workflow.
  • Tag writing for non-MP3 files now logs a clear "not supported yet" warning instead of an error. Those files are still recognized, renamed and organized.
  • The package failed to import on Python 3.13+ (audioop was removed from the standard library). audioop-lts is now installed automatically there.
  • The version comes from a single source; --version and __version__ now match the package.

🧹 Maintenance

  • Removed api.py, which imported a module that no longer exists.
  • CI: tests on Python 3.10–3.13; the pylint workflow checks errors in src/ and is green again.
  • Tests run against the installed package; added 14 ffmpeg-based regression tests.
  • Added CHANGELOG.md.

What's Changed

  • Fix file-safety bugs: self-rename, default source deletion, wrong extension (1.2.2) by @formeo in #9

Full Changelog: v1.2.1...v1.2.2