Releases: beetbox/beets
beets 1.3.8
This release has two big new chunks of functionality. Queries now support sorting and user-defined fields can now have types.
If you want to see all your songs in reverse chronological order, just type beet list year-. It couldn't be easier.
Flexible field types mean that some functionality that has previously only worked for built-in fields, like range queries, can now work with plugin- and user-defined fields too. For starters, the /plugins/echonest/ and mpdstats now mark the types of the fields they provide---so you can now say, for example, beet ls liveness:0.5..1.5 for the Echo Nest "liveness" attribute. The types makes it easy to specify field types in your config file.
One upgrade note: if you use the discogs, you will need to upgrade the Discogs client library to use this version. Just type pip install -U discogs-client.
Other new features:
info: Target files can now be specified through library queries (in addition to filenames). The--libraryoption prints library fields instead of tags. Multiple files can be summarized together with the new--summarizeoption.mbcollection: A new option lets you automatically update your collection on import. Thanks to Olin Gay.convert: A newnever_convert_lossy_filesoption can prevent lossy transcoding. Thanks to Simon Kohlmeyer.convert: A new--yescommand-line flag skips the confirmation.
Still more fixes and little improvements:
- Invalid state files don't crash the importer.
lyrics: Only strip featured artists and parenthesized title suffixes if no lyrics for the original artist and title were found.- Fix a crash when reading some files with missing tags.
discogs: Compatibility with the new 2.0 version of the discogs_client Python library. If you were using the old version, you wil need to upgrade to the latest version of the library to use the correspondingly new version of the plugin (e.g., withpip install -U discogs-client). Thanks to Andriy Kohut.- Fix a crash when writing files that can't be read. Thanks to Jocelyn De La Rosa.
- The
statscommand now counts album artists. The album count also more accurately reflects the number of albums in the database. convert: Avoid crashes when tags cannot be written to newly converted files.- Formatting templates with item data no longer confusingly shows album-level data when the two are inconsistent.
- Resuming imports and beginning incremental imports should now be much faster when there is a lot of previously-imported music to skip.
lyrics: Remove<script>tags from scraped lyrics. Thanks to Bombardment.play: Add arelative_toconfig option. Thanks to BrainDamage.- Fix a crash when a MusicBrainz release has zero tracks.
- The
--versionflag now works as an alias for theversioncommand. lastgenre: Remove some unhelpful genres from the default whitelist. Thanks to gwern.importfeeds: A newechooutput mode prints files' paths to standard error. Thanks to robotanarchy.replaygain: Restore some error handling whenmp3gainoutput cannot be parsed. The verbose log now contains the bad tool output in this case.convert: Fix filename extensions when converting automatically.- The
writeplugin event allows plugins to change the tags that are written to a media file. zero: Do not delete database values; only media file tags are affected.
beets 1.3.7
This release of beets fixes all the bugs, and you can be confident that you will never again find any bugs in beets, ever. It also adds support for plain old AIFF files and adds three more plugins, including a nifty one that lets you measure a song's tempo by tapping out the beat on your keyboard. The importer deals more elegantly with duplicates and you can broaden your cover art search to the entire web with Google Image Search.
The big new features are:
- Support for AIFF files. Tags are stored as ID3 frames in one of the file's IFF chunks. Thanks to Evan Purkhiser for contributing support to Mutagen.
- The new
importaddedreads files' modification times to set their "added" date. Thanks to Stig Inge Lea Bjørnsen. - The new
bpmlets you manually measure the tempo of a playing song. Thanks to aroquen. - The new
spotifygenerates playlists for your Spotify account. Thanks to Olin Gay. - A new required configuration option for the importer skips matches that are missing certain data. Thanks to oprietop.
- When the importer detects duplicates, it now shows you some details about the potentially-replaced music so you can make an informed decision. Thanks to Howard Jones.
fetchart: You can now optionally search for cover art on Google Image Search. Thanks to Lemutar.- A new asciify-paths configuration option replaces all non-ASCII characters in paths.
And the multitude of little improvements and fixes:
- Compatibility with the latest version of Mutagen, 1.23.
web: Lyrics now display readably with correct line breaks. Also, the detail view scrolls to reveal all of the lyrics. Thanks to Meet Udeshi.play: Thecommandconfig option can now contain arguments (rather than just an executable). Thanks to Alessandro Ghedini.- Fix an error when using the modify command to remove a flexible attribute. Thanks to Pierre Rust.
info: The command now shows audio properties (e.g., bitrate) in addition to metadata. Thanks Alessandro Ghedini.- Avoid a crash on Windows when writing to files with special characters in their names.
play: Playing albums now generates filenames by default (as opposed to directories) for better compatibility. Theuse_foldersoption restores the old behavior. Thanks to Lucas Duailibe.- Fix an error when importing an empty directory with the
--flatoption. mpdstats: The last song in a playlist is now correctly counted as played. Thanks to Johann Klähn.zero: Prevent accidental nulling of dangerous fields (IDs and paths). Thanks to brunal.- The remove command now shows the paths of files that will be deleted. Thanks again to brunal.
- Don't display changes for fields that are not in the restricted field set. This fixes write showing changes for fields that are not written to the file.
- The write command avoids displaying the item name if there are no changes for it.
- When using both the
convertand thescrub, avoid scrubbing the source file of conversions. (Fix a regression introduced in the previous release.) replaygain: Logging is now quieter during import. Thanks to Yevgeny Bezman.fetchart: When loading art from the filesystem, we now prioritize covers with more keywords in them. This means thatcover-front.jpgwill now be taken beforecover-back.jpgbecause it contains two keywords rather than one. Thanks to Fabrice Laporte.lastgenre: Remove duplicates from canonicalized genre lists. Thanks again to Fabrice Laporte.- The importer now records its progress when skipping albums. This means that incremental imports will no longer try to import albums again after you've chosen to skip them, and erroneous invitations to resume "interrupted" imports should be reduced. Thanks to jcassette.
bucket: You can now customize the definition of alphanumeric "ranges" using regular expressions. And the heuristic for detecting years has been improved. Thanks to sotho.- Already-imported singleton tracks are skipped when resuming an import.
chroma: A newautoconfiguration option disables fingerprinting on import. Thanks to ddettrittus.convert: A new--formatoption to can select the transcoding preset from the command-line.convert: Transcoding presets can now omit their filename extensions (extensions default to the name of the preset).convert: A new--pretendoption lets you preview the commands the plugin will execute without actually taking any action. Thanks to Dietrich Daroch.- Fix a crash when a float-valued tag field only contained a
+or-character. - Fixed a regression in the core that caused the
scrubnot to work inautomode. Thanks to Harry Khanna. - The write command now has a
--forceflag. Thanks again to Harry Khanna. mbsync: Track alignment now works with albums that have multiple copies of the same recording. Thanks to Rui Gonçalves.
beets 1.3.6
This is primarily a bugfix release, but it also brings two new plugins: one for playing music in desktop players and another for organizing your directories into "buckets." It also brings huge performance optimizations to queries—your beet ls commands will now go much faster.
New features:
- The new
playlets you start your desktop music player with the songs that match a query. Thanks to David Hamp-Gonsalves. - The new
bucketprovides a%bucket{}function for path formatting to generate folder names representing ranges of years or initial letter. Thanks to Fabrice Laporte. - Item and album queries are much faster.
ftintitle: A new option lets you remove featured artists entirely instead of moving them to the title. Thanks to SUTJael.
And those all-important bug fixes:
mbsync: Fix a regression in 1.3.5 that broke the plugin entirely.- Shell completion now searches more common paths for its
bash_completiondependency. - Fix encoding-related logging errors in
convertandreplaygain. replaygain: Suppress a deprecation warning emitted by later versions of PyGI.- Fix a crash when reading files whose iTunes SoundCheck tags contain non-ASCII characters.
- The
%if{}template function now appropriately interprets the condition as false when it contains the string "false". Thanks to Ayberk Yilmaz. convert: Fix conversion for files that include a video stream by ignoring it. Thanks to brunal.fetchart: Log an error instead of crashing when tag manipulation fails.convert: Log an error instead of crashing when embedding album art fails.convert: Embed cover art into converted files. Previously they were embedded into the source files.- New plugin event:
before_item_moved. Thanks to Robert Speicher.
beets 1.3.5
This is a short-term release that adds some great new stuff to beets. There's support for tracking and calculating musical keys, the ReplayGain plugin was expanded to work with more music formats via GStreamer, we can now import directly from compressed archives, and the lyrics plugin is more robust.
One note for upgraders and packagers: this version of beets has a new dependency in enum34, which is a backport of the new enum standard library module.
The major new features are:
- Beets can now import zip, tar and rar archives. Just type
beet import music.zipto have beets transparently extract the files to import. replaygain: Added support for calculating ReplayGain values with GStreamer as well the mp3gain program. This enables ReplayGain calculation for any audio format. Thanks to Yevgeny Bezman.lyrics: Lyrics should now be found for more songs. Searching is now sensitive to featured artists and parenthesized title suffixes. When a song has multiple titles, lyrics from all the named songs are now concatenated. Thanks to Fabrice Laporte and Paul Phillips.
In particular, a full complement of features for supporting musical keys are new in this release:
- A new
initial_keyfield is available in the database and files' tags. You can set the field manually using a command likebeet modify initial_key=Am. - The
echonestplugin sets theinitial_keyfield if the data is available. - A new
keyfinderruns a command-line tool to get the key from audio data and store it in theinitial_keyfield.
There are also many bug fixes and little enhancements:
echonest: Truncate files larger than 50MB before uploading for analysis.fetchart: Fix a crash when the server does not specify a content type. Thanks to Lee Reinhardt.convert: The--keep-newflag now works correctly and the library includes the converted item.- The importer now logs a message instead of crashing when errors occur while opening the files to be imported.
embedart: Better error messages in exceptional conditions.- Silenced some confusing error messages when searching for a non-MusicBrainz ID. Using an invalid ID (of any kind—Discogs IDs can be used there too) at the "Enter ID:" importer prompt now just silently returns no results. More info is in the verbose logs.
mbsync: Fix application of album-level metadata. Due to a regression a few releases ago, only track-level metadata was being updated.- On Windows, paths on network shares (UNC paths) no longer cause "invalid filename" errors.
replaygain: Fix crashes when attempting to log errors.- The modify-cmd command can now accept query arguments that contain = signs. An argument is considered a query part when a : appears before any =s. Thanks to mook.
beets 1.3.4
This release brings a hodgepodge of medium-sized conveniences to beets. A new config command manages your configuration, we now have bash completion, and the modify command can delete attributes. There are also some significant performance optimizations to the autotagger's matching logic.
One note for upgraders: if you use the fetchart plugin, it has a new dependency, the requests module.
New stuff:
- Added a
configcommand to manage your configuration. It can show you what you currently have in your config file, point you at where the file should be, or launch your text editor to let you modify the file. Thanks to geigerzaehler. - Beets now ships with a shell command completion script! See completion. Thanks to geigerzaehler.
- The
modifycommand now allows removing flexible attributes. For example,beet modify artist:beatles oldies!deletes theoldiesattribute from matching items. Thanks to brilnius. - Internally, beets has laid the groundwork for supporting multi-valued fields. Thanks to geigerzaehler.
- The importer interface now shows the URL for MusicBrainz matches. Thanks to johtso.
- smartplaylist: Playlists can now be generated from multiple queries (combined with "or" logic). Album-level queries are also now possible and automatic playlist regeneration can now be disabled. Thanks to brilnius.
- echonest: Echo Nest similarity now weights the tempo in better proportion to other metrics. Also, options were added to specify custom thresholds and output formats. Thanks to Adam M.
- Added the
after_writeplugin event. - lastgenre: Separator in genre lists can now be configured. Thanks to brilnius.
- We now only use "primary" aliases for artist names from MusicBrainz. This eliminates some strange naming that could occur when the languages config option was set. Thanks to Filipe Fortes.
- The performance of the autotagger's matching mechanism is vastly improved. This should be noticeable when matching against very large releases such as box sets.
- The
importcommand can now accept individual files as arguments even in non-singleton mode. Files are imported as one-track albums.
Fixes:
- Error messages involving paths no longer escape non-ASCII characters (for legibility).
- Fixed a regression that made it impossible to use the
modifycommand to add new flexible fields. Thanks to brilnius. - echonest: Avoid crashing when the audio analysis fails. Thanks to Pedro Silva.
- duplicates: Fix checksumming command execution for files with quotation marks in their names. Thanks again to Pedro Silva.
- Fix a crash when importing with both of the
group_albumsandincrementaloptions enabled. Thanks to geigerzaehler. - Give a sensible error message when
BEETSDIRpoints to a file. Thanks again to geigerzaehler. - Fix a crash when reading WMA files whose boolean-valued fields contain strings. Thanks to johtso.
- fetchart: The plugin now sends "beets" as the User-Agent when making scraping requests. This helps resolve some blocked requests. The plugin now also depends on the requests Python library.
- The
writecommand now only shows the changes to fields that will actually be written to a file. - duplicates: Spurious reports are now avoided for tracks with missing values (e.g., no MBIDs). Thanks to Pedro Silva.
- The default replace sanitation options now remove leading whitespace by default. Thanks to brilnius.
- importfeeds: Fix crash when importing albums containing
/with them3u_multiformat. - Avoid crashing on Mutagen bugs while writing files' tags.
- convert: Display a useful error message when the FFmpeg executable can't be found.
beets 1.3.3
Version 1.3.3 brings a bunch changes to how item and album fields work internally. Along with laying the groundwork for some great things in the future, this brings a number of improvements to how you interact with beets. Here's what's new with fields in particular:
- Plugin-provided fields can now be used in queries. For example, if you use the
inlineplugin to define a field calledera, you can now filter your library based on that field by typing something likebeet list era:goldenage. - Album-level flexible attributes and plugin-provided attributes can now be used in path formats (and other item-level templates).
- Date-based queries are now possible. Try getting every track you added in February 2014 with
beet ls added:2014-02or in the whole decade withadded:2010... Thanks to Stig Inge Lea Bjørnsen. - The modify-cmd command is now better at parsing and formatting fields. You can assign to boolean fields like
comp, for example, using either the words "true" or "false" or the numerals 1 and 0. Any boolean-esque value is normalized to a real boolean. The update-cmd and write-cmd commands also got smarter at formatting and colorizing changes.
For developers, the short version of the story is that Item and Album objects provide uniform access across fixed, flexible, and computed attributes. You can write item.foo to access the foo field without worrying about where the data comes from.
Unrelated new stuff:
- The importer has a new interactive option (G for "Group albums"), command-line flag (
--group-albums), and config option (group_albums) that lets you split apart albums that are mixed together in a single directory. Thanks to geigerzaehler. - A new
--configcommand-line option lets you specify an additional configuration file. This option combines config settings with your default config file. (As part of this change, theBEETSDIRenvironment variable no longer combines---it replaces your default config file.) Thanks again to geigerzaehler. ihate: The plugin's configuration interface was overhauled. Its configuration is now much simpler---it uses beets queries instead of an ad-hoc per-field configuration. This is backwards-incompatible---if you use this plugin, you will need to update your configuration. Thanks to BrainDamage.
Other little fixes:
echonest: Tempo (BPM) is now always stored as an integer. Thanks to Heinz Wiesinger.- Fix Python 2.6 compatibility in some logging statements in
chromaandlastgenre. - Prevent some crashes when things go really wrong when writing file metadata at the end of the import process.
- New plugin events:
item_removed(thanks to Romuald Conty) anditem_copied(thanks to Stig Inge Lea Bjørnsen). - The
pluginpathconfig option can now point to the directory containing plugin code. (Previously, it awkwardly needed to point at a directory containing abeetsplugdirectory, which would then contain your code. This is preserved as an option for backwards compatibility.) This change should also work around a long-standing issue when usingpluginpathwhen beets is installed using pip. Many thanks to geigerzaehler. web: The/item/and/album/API endpoints now produce full details about albums and items, not just lists of IDs. Thanks to geigerzaehler.- Fix a potential crash when using image resizing with the
fetchartorembedartwithout ImageMagick installed. - Also, when invoking
convertfor image resizing fails, we now log an error instead of crashing. fetchart: Thebeet fetchartcommand can now associate local images with albums (unless--forceis provided). Thanks to brilnius.fetchart: Command output is now colorized. Thanks again to brilnius.- The modify-cmd command avoids writing files and committing to the database when nothing has changed. Thanks once more to brilnius.
- The importer now uses the album artist field when guessing existing metadata for albums (rather than just the track artist field). Thanks to geigerzaehler.
fromfilename: Fix a crash when a filename contained only a track number (e.g.,02.mp3).convert: Transcoding should now work on Windows.duplicates: Themoveandcopydestination arguments are now treated as directories. Thanks to Pedro Silva.- The modify-cmd command now skips confirmation and prints a message if no changes are necessary. Thanks to brilnius.
fetchart: When using theremote_priorityconfig option, local image files are no longer completely ignored.echonest: Fix an issue causing the plugin to appear twice in the output of thebeet versioncommand.lastgenre: Fix an occasional crash when no tag weight was returned by Last.fm.mpdstats: Restore thelast_playedfield. Thanks to Johann Klähn.- The modify-cmd command's output now clearly shows when a file has been deleted.
- Album art in files with Vorbis Comments is now marked with the "front cover" type. Thanks to Jason Lefley.
beets 1.3.2
This update brings new plugins for fetching acoustic metrics and listening statistics, many more options for the duplicate detection plugin, and flexible options for fetching multiple genres.
The "core" of beets gained a new built-in command: beet write updates the metadata tags for files, bringing them back into sync with your database. Thanks to Heinz Wiesinger.
We added some plugins and overhauled some existing ones:
- The new
echonestplugin can fetch a wide range of acoustic attributes from The Echo Nest, including the "speechiness" and "liveness" of each track. The new plugin supersedes an older version (echonest_tempo) that only fetched the BPM field. Thanks to Pedro Silva and Peter Schnebel. - The
duplicatesplugin got a number of new features, thanks to Pedro Silva:- The
keysoption lets you specify the fields used detect duplicates. - You can now use checksumming (via an external command) to find duplicates instead of metadata via the
checksumoption. - The plugin can perform actions on the duplicates it find. The new
copy,move,delete,delete_file, andtagoptions perform those actions.
- The
- The new
mpdstatsplugin collects statistics about your listening habits from MPD. Thanks to Peter Schnebel and Johann Klähn. lastgenre: The newmultipleoption has been replaced with thecountoption, which lets you limit the number of genres added to your music. (No more thousand-character genre fields!) Also, themin_weightfield filters out nonsense tags to make your genres more relevant. Thanks to Peter Schnebel and rashley60.lyrics: A new--forceoption optionally re-downloads lyrics even when files already have them. Thanks to Bitdemon.
As usual, there are also innumerable little fixes and improvements:
- When writing ID3 tags for ReplayGain normalization, tags are written with both upper-case and lower-case TXXX frame descriptions. Previous versions of beets used only the upper-case style, which seems to be more standard, but some players (namely, Quod Libet and foobar2000) seem to only use lower-case names.
missing: Avoid a possible error when an album'stracktotalfield is missing.ftintitle: Fix an error when the sort artist is missing.echonest_tempo: The plugin should now match songs more reliably (i.e., fewer "no tempo found" messages). Thanks to Peter Schnebel.convert: Fix an "Item has no library" error when using theautoconfig option.convert: Fix an issue where files of the wrong format would have their transcoding skipped (and files with the right format would be needlessly transcoded). Thanks to Jakob Schnitzer.- Fix an issue that caused the id3v23 option to work only occasionally.
- Also fix using id3v23 in conjunction with the
scrubandembedartplugins. Thanks to Chris Cogburn. ihate: Fix an error when importing singletons. Thanks to Mathijs de Bruin.- The clutter option can now be a whitespace-separated list in addition to a YAML list.
- Values for the replace option can now be empty (i.e., null is equivalent to the empty string).
lastgenre: Fix a conflict between canonicalization and multiple genres.- When a match has a year but not a month or day, the autotagger now "zeros out" the month and day fields after applying the year.
- For plugin developers: added an
optparsecallback utility function for performing actions based on arguments. Thanks to Pedro Silva. scrub: Fix scrubbing of MPEG-4 files. Thanks to Yevgeny Bezman.
beets 1.3.1
This release boasts a host of new little features, many of them contributed by beets' amazing and prolific community. It adds support for Opus files, transcoding to any format, and two new plugins: one that guesses metadata for "blank" files based on their filenames and one that moves featured artists into the title field.
Here's the new stuff:
- Add Opus audio support. Thanks to Rowan Lewis.
convert: You can now transcode files to any audio format, rather than just MP3. Thanks again to Rowan Lewis.- The new
fromfilenameplugin guesses tags from the filenames during import when metadata tags themselves are missing. Thanks to Jan-Erik Dahlin. - The
ftintitle, by @Verrus, is now distributed with beets. It helps you rewrite tags to move "featured" artists from the artist field to the title field. - The MusicBrainz data source now uses track artists over recording artists. This leads to better metadata when tagging classical music. Thanks to Henrique Ferreiro.
lastgenre: You can now get multiple genres per album or track using themultipleconfig option. Thanks to rashley60 on GitHub.- A new id3v23 config option makes beets write MP3 files' tags using the older ID3v2.3 metadata standard. Use this if you want your tags to be visible to Windows and some older players.
And some fixes:
fetchart: Better error message when the image file has an unrecognized type.mbcollection: Detect, log, and skip invalid MusicBrainz IDs (instead of failing with an API error).info: Fail gracefully when used erroneously with a directory.echonest_tempo: Fix an issue where the plugin could use the tempo from the wrong song when the API did not contain the requested song.- Fix a crash when a file's metadata included a very large number (one wider than 64 bits). These huge numbers are now replaced with zeroes in the database.
- When a track on a MusicBrainz release has a different length from the underlying recording's length, the track length is now used instead.
- With per_disc_numbering enabled, the
tracktotalfield is now set correctly (i.e., to the number of tracks on the disc). scrub: Thescrubcommand now restores album art in addition to other (database-backed) tags.mpdupdate: Domain sockets can now begin with a tilde (which is correctly expanded to$HOME) as well as a slash. Thanks to Johann Klähn.lastgenre: Fix a regression that could cause new genres found during import not to be persisted.- Fixed a crash when imported album art was also marked as "clutter" where the art would be deleted before it could be moved into place. This led to a "image.jpg not found during copy" error. Now clutter is removed (and directories pruned) much later in the process, after the
import_task_fileshook. missing: Fix an error when printing missing track names. Thanks to Pedro Silva.- Fix an occasional KeyError in the update-cmd command introduced in 1.3.0.
scrub: Avoid preserving certain non-standard ID3 tags such as NCON.
beets 1.3.0
Albums and items now have flexible attributes. This means that, when you want to store information about your music in the beets database, you're no longer constrained to the set of fields it supports out of the box (title, artist, track, etc.). Instead, you can use any field name you can think of and treat it just like the built-in fields.
For example, you can use the modify command to set a new field on a track:
$ beet modify mood=sexy artist:miguel
and then query your music based on that field:
$ beet ls mood:sunny
or use templates to see the value of the field:
$ beet ls -f '$title: $mood'
While this feature is nifty when used directly with the usual command-line suspects, it's especially useful for plugin authors and for future beets features. Stay tuned for great things built on this flexible attribute infrastructure.
One side effect of this change: queries that include unknown fields will now match nothing instead of everything. So if you type beet ls fieldThatDoesNotExist:foo, beets will now return no results, whereas previous versions would spit out a warning and then list your entire library.
There's more detail than you could ever need on the beets blog.
beets 1.2.2
This is a bugfix release. We're in the midst of preparing for a large change in beets 1.3, so 1.2.2 resolves some issues that came up over the last few weeks. Stay tuned!
The improvements in this release are:
- A new plugin event,
item_moved, is sent when files are moved on disk. Thanks to dsedivec. lyrics: More improvements to the Google backend by Fabrice Laporte.bpd: Fix for a crash when searching, thanks to Simon Chopin.- Regular expression queries (and other query types) over paths now work. (Previously, special query types were ignored for the
pathfield.) fetchart: Look for images in the Cover Art Archive for the release group in addition to the specific release. Thanks to Filipe Fortes.- Fix a race in the importer that could cause files to be deleted before they were imported. This happened when importing one album, importing a duplicate album, and then asking for the first album to be replaced with the second. The situation could only arise when importing music from the library directory and when the two albums are imported close in time.