From 26593a7e2e137fc0f8dd9efe3bd566b0e992e469 Mon Sep 17 00:00:00 2001 From: Brock Grassy Date: Fri, 10 Jan 2025 22:56:09 -0500 Subject: [PATCH 1/7] Change missing plugin to allow for filtering albums by release type --- beetsplug/missing.py | 25 ++++- docs/changelog.rst | 24 ++++- docs/plugins/missing.rst | 20 +++- test/plugins/test_missing.py | 201 +++++++++++++++++++++++++++++++++++ 4 files changed, 263 insertions(+), 7 deletions(-) create mode 100644 test/plugins/test_missing.py diff --git a/beetsplug/missing.py b/beetsplug/missing.py index cbdda4599..0c93bc1bc 100644 --- a/beetsplug/missing.py +++ b/beetsplug/missing.py @@ -19,7 +19,7 @@ from collections import defaultdict from collections.abc import Iterator import musicbrainzngs -from musicbrainzngs.musicbrainz import MusicBrainzError +from musicbrainzngs.musicbrainz import VALID_RELEASE_TYPES, MusicBrainzError from beets import config, metadata_plugins from beets.dbcore import types @@ -100,6 +100,7 @@ class MissingPlugin(BeetsPlugin): "count": False, "total": False, "album": False, + "release_type": ["album"], } ) @@ -127,6 +128,15 @@ class MissingPlugin(BeetsPlugin): action="store_true", help="show missing albums for artist instead of tracks", ) + self._command.parser.add_option( + "--release-type", + dest="release_type", + action="append", + help=( + "select release types for missing albums for artist " + f"from ({', '.join(VALID_RELEASE_TYPES)})" + ), + ) self._command.parser.add_format_option() def commands(self): @@ -151,7 +161,7 @@ class MissingPlugin(BeetsPlugin): fmt = config["format_album" if count else "format_item"].get() if total: - print(sum([_missing_count(a) for a in albums])) + self._log.info(str(sum([_missing_count(a) for a in albums]))) return # Default format string for count mode. @@ -161,11 +171,11 @@ class MissingPlugin(BeetsPlugin): for album in albums: if count: if _missing_count(album): - print_(format(album, fmt)) + self._log.info(format(album, fmt)) else: for item in self._missing(album): - print_(format(item, fmt)) + self._log.info(format(item, fmt)) def _missing_albums(self, lib: Library, query: list[str]) -> None: """Print a listing of albums missing from each artist in the library @@ -186,10 +196,15 @@ class MissingPlugin(BeetsPlugin): album_ids_by_artist[artist].add(album) total_missing = 0 + release_type = self.config["release_type"].get() or ["album"] calculating_total = self.config["total"].get() for (artist, artist_id), album_ids in album_ids_by_artist.items(): try: - resp = musicbrainzngs.browse_release_groups(artist=artist_id) + resp = musicbrainzngs.browse_release_groups( + artist=artist_id, + release_type=release_type, + ) + release_groups = resp["release-group-list"] except MusicBrainzError as err: self._log.info( "Couldn't fetch info for artist '{}' ({}) - '{}'", diff --git a/docs/changelog.rst b/docs/changelog.rst index 19026eafe..6a513bef0 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -54,6 +54,10 @@ Bug fixes: endpoints. Previously, due to single-quotes (ie. string literal) in the SQL query, the query eg. `GET /item/values/albumartist` would return the literal "albumartist" instead of a list of unique album artists. +* :doc:`plugins/missing`: When running in missing album mode, allows users to specify + MusicBrainz release types that they want to show using the ``--release-type`` + flag. The default behavior is also changed to just show releases of type + ``album``. :bug:`2661` For plugin developers: @@ -435,7 +439,25 @@ Other changes: wrong (outdated) commit. Now the tag is created in the same workflow step right after committing the version update. :bug:`5539` - :doc:`/plugins/smartplaylist`: URL-encode additional item ``fields`` within - generated EXTM3U playlists instead of JSON-encoding them. + generated EXTM3U playlists inst + # build dict mapping artist to list of all albums + for artist, albums in albums_by_artist.items(): + if artist[1] is None or artist[1] == "": + albs_no_mbid = ["'" + a["album"] + "'" for a in albums] + self._log.info( + "No musicbrainz ID for artist '{}' found in album(s) {}; " + "skipping", + artist[0], + ", ".join(albs_no_mbid), + ) + continue + + try: + resp = musicbrainzngs.browse_release_groups( + artist=artist[1], + release_type=release_type, + ) +ead of JSON-encoding them. - typehints: ``./beets/importer.py`` file now has improved typehints. - typehints: ``./beets/plugins.py`` file now includes typehints. - :doc:`plugins/ftintitle`: Optimize the plugin by avoiding unnecessary writes diff --git a/docs/plugins/missing.rst b/docs/plugins/missing.rst index 10842933c..ea5a5b3b3 100644 --- a/docs/plugins/missing.rst +++ b/docs/plugins/missing.rst @@ -26,12 +26,18 @@ library: -c, --count count missing tracks per album -t, --total count totals across the entire library -a, --album show missing albums for artist instead of tracks for album + --release-type show only missing albums of specified release type. + You can provide this argument multiple times to + specify multiple release types to filter to. If not + provided, defaults to just the "album" release type. …or by editing the corresponding configuration options. .. warning:: - Option ``-c`` is ignored when used with ``-a``. + Option ``-c`` is ignored when used with ``-a``, and ``--release-type`` is + ignored when not used with ``-a``. Valid release types can be shown by running + ``beet missing -h``. Configuration ------------- @@ -109,6 +115,18 @@ Print out a count of the total number of missing tracks: beet missing -t +List all missing albums of release type "compilation" in your collection:: + +:: + + beet missing -a --release-type compilation + +List all missing albums of release type "compilation" and album in your collection:: + +:: + + beet missing -a --release-type compilation --release-type album + Call this plugin from other beet commands: :: diff --git a/test/plugins/test_missing.py b/test/plugins/test_missing.py new file mode 100644 index 000000000..b07c356fa --- /dev/null +++ b/test/plugins/test_missing.py @@ -0,0 +1,201 @@ +# This file is part of beets. +# Copyright 2016, Stig Inge Lea Bjornsen. +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. + + +"""Tests for the `missing` plugin.""" + +import itertools +from unittest.mock import patch + +import pytest + +from beets.autotag.hooks import AlbumInfo, TrackInfo +from beets.library import Item +from beets.test.helper import PluginMixin, TestHelper, capture_log + + +def mock_browse_release_groups( + artist: str, + release_type: list[str], +): + """Helper to mock getting an artist's release groups of multiple release types.""" + release_groups = [ + {"id": "album_id", "title": "title", "release_type": "album"}, + {"id": "album2_id", "title": "title 2", "release_type": "album"}, + { + "id": "compilation_id", + "title": "compilation", + "release_type": "compilation", + }, + ] + + return { + "release-group-list": [ + x for x in release_groups if x["release_type"] in release_type + ] + } + + +class TestMissingPlugin(PluginMixin, TestHelper): + # The minimum mtime of the files to be imported + plugin = "missing" + + def setup_method(self, method): + """Setup pristine beets config and items for testing.""" + self.setup_beets() + self.album_items = [ + Item( + album="album", + mb_albumid="81ae60d4-5b75-38df-903a-db2cfa51c2c6", + mb_releasegroupid="album_id", + mb_trackid="track_1", + mb_albumartistid="artist_id", + albumartist="artist", + tracktotal=3, + ), + Item( + album="album", + mb_albumid="81ae60d4-5b75-38df-903a-db2cfa51c2c6", + mb_releasegroupid="album_id", + mb_albumartistid="artist_id", + albumartist="artist", + tracktotal=3, + ), + Item( + album="album", + mb_albumid="81ae60d4-5b75-38df-903a-db2cfa51c2c6", + mb_releasegroupid="album_id", + mb_trackid="track_3", + mb_albumartistid="artist_id", + albumartist="artist", + tracktotal=3, + ), + ] + + def teardown_method(self, method): + """Clean all beets data.""" + self.teardown_beets() + + @pytest.mark.parametrize( + "total,count", + list(itertools.product((True, False), repeat=2)), + ) + @patch("beets.autotag.hooks.album_for_mbid") + def test_missing_tracks(self, album_for_mbid, total, count): + """Test getting missing tracks works with expected logs.""" + self.lib.add_album(self.album_items[:2]) + + album_for_mbid.return_value = AlbumInfo( + album_id="album_id", + album="album", + tracks=[ + TrackInfo(track_id=album_item.mb_trackid) + for album_item in self.album_items + ], + ) + + with capture_log() as logs: + command = ["missing"] + if total: + command.append("-t") + if count: + command.append("-c") + self.run_command(*command) + + if not total and not count: + assert ( + f"missing: track {self.album_items[-1].mb_trackid} in album album_id" + ) in logs + + if not total and count: + assert "missing: artist - album: 1" in logs + + assert ("missing: 1" in logs) == total + + def test_missing_albums(self): + """Test getting missing albums works with expected logs.""" + with patch( + "musicbrainzngs.browse_release_groups", + wraps=mock_browse_release_groups, + ): + self.lib.add_album(self.album_items) + + with capture_log() as logs: + command = ["missing", "-a"] + self.run_command(*command) + + assert "missing: artist - compilation" not in logs + assert "missing: artist - title" not in logs + assert "missing: artist - title 2" in logs + + def test_missing_albums_compilation(self): + """Test getting missing albums works for a specific release type.""" + with patch( + "musicbrainzngs.browse_release_groups", + wraps=mock_browse_release_groups, + ): + self.lib.add_album(self.album_items) + + with capture_log() as logs: + command = ["missing", "-a", "--release-type", "compilation"] + self.run_command(*command) + + assert "missing: artist - compilation" in logs + assert "missing: artist - title" not in logs + assert "missing: artist - title 2" not in logs + + def test_missing_albums_all(self): + """Test getting missing albums works for all release types.""" + with patch( + "musicbrainzngs.browse_release_groups", + wraps=mock_browse_release_groups, + ): + self.lib.add_album(self.album_items) + + with capture_log() as logs: + command = [ + "missing", + "-a", + "--release-type", + "compilation", + "--release-type", + "album", + ] + self.run_command(*command) + + assert "missing: artist - compilation" in logs + assert "missing: artist - title" not in logs + assert "missing: artist - title 2" in logs + + def test_missing_albums_total(self): + """Test getting missing albums works with the total flag.""" + with patch( + "musicbrainzngs.browse_release_groups", + wraps=mock_browse_release_groups, + ): + self.lib.add_album(self.album_items) + + with capture_log() as logs: + command = [ + "missing", + "-a", + "-t", + ] + self.run_command(*command) + + assert "missing: 1" in logs + # Specific missing logs omitted if total provided + assert "missing: artist - compilation" not in logs + assert "missing: artist - title" not in logs + assert "missing: artist - title 2" not in logs From 589d2310f5db41a88d697a4b5f51a805d81e7c0f Mon Sep 17 00:00:00 2001 From: Brock Grassy Date: Fri, 10 Jan 2025 23:04:22 -0500 Subject: [PATCH 2/7] Add more descriptive argparse help string --- beetsplug/missing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/beetsplug/missing.py b/beetsplug/missing.py index 0c93bc1bc..a2034bf72 100644 --- a/beetsplug/missing.py +++ b/beetsplug/missing.py @@ -126,7 +126,10 @@ class MissingPlugin(BeetsPlugin): "--album", dest="album", action="store_true", - help="show missing albums for artist instead of tracks", + help=( + "show missing release for artist instead of tracks. Defaults " + "to only releases of type 'album'" + ) ) self._command.parser.add_option( "--release-type", From b0d0052685f6b17de67fe1516223163233769141 Mon Sep 17 00:00:00 2001 From: Brock Grassy Date: Sat, 11 Jan 2025 20:55:37 -0500 Subject: [PATCH 3/7] Fix formatting --- beetsplug/missing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/missing.py b/beetsplug/missing.py index a2034bf72..57535404f 100644 --- a/beetsplug/missing.py +++ b/beetsplug/missing.py @@ -129,7 +129,7 @@ class MissingPlugin(BeetsPlugin): help=( "show missing release for artist instead of tracks. Defaults " "to only releases of type 'album'" - ) + ), ) self._command.parser.add_option( "--release-type", From cd3e72a03dc1cde63c7877be255bc07d92aa0053 Mon Sep 17 00:00:00 2001 From: Brock Grassy Date: Fri, 28 Nov 2025 10:53:06 -0500 Subject: [PATCH 4/7] Finish rebase --- beetsplug/missing.py | 7 +++---- docs/changelog.rst | 20 +------------------- docs/plugins/missing.rst | 2 +- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/beetsplug/missing.py b/beetsplug/missing.py index 57535404f..f2192be7a 100644 --- a/beetsplug/missing.py +++ b/beetsplug/missing.py @@ -164,7 +164,7 @@ class MissingPlugin(BeetsPlugin): fmt = config["format_album" if count else "format_item"].get() if total: - self._log.info(str(sum([_missing_count(a) for a in albums]))) + print(sum([_missing_count(a) for a in albums])) return # Default format string for count mode. @@ -174,11 +174,11 @@ class MissingPlugin(BeetsPlugin): for album in albums: if count: if _missing_count(album): - self._log.info(format(album, fmt)) + print_(format(album, fmt)) else: for item in self._missing(album): - self._log.info(format(item, fmt)) + print_(format(item, fmt)) def _missing_albums(self, lib: Library, query: list[str]) -> None: """Print a listing of albums missing from each artist in the library @@ -207,7 +207,6 @@ class MissingPlugin(BeetsPlugin): artist=artist_id, release_type=release_type, ) - release_groups = resp["release-group-list"] except MusicBrainzError as err: self._log.info( "Couldn't fetch info for artist '{}' ({}) - '{}'", diff --git a/docs/changelog.rst b/docs/changelog.rst index 6a513bef0..c523bfa41 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -439,25 +439,7 @@ Other changes: wrong (outdated) commit. Now the tag is created in the same workflow step right after committing the version update. :bug:`5539` - :doc:`/plugins/smartplaylist`: URL-encode additional item ``fields`` within - generated EXTM3U playlists inst - # build dict mapping artist to list of all albums - for artist, albums in albums_by_artist.items(): - if artist[1] is None or artist[1] == "": - albs_no_mbid = ["'" + a["album"] + "'" for a in albums] - self._log.info( - "No musicbrainz ID for artist '{}' found in album(s) {}; " - "skipping", - artist[0], - ", ".join(albs_no_mbid), - ) - continue - - try: - resp = musicbrainzngs.browse_release_groups( - artist=artist[1], - release_type=release_type, - ) -ead of JSON-encoding them. + generated EXTM3U playlists instead of JSON-encoding them. - typehints: ``./beets/importer.py`` file now has improved typehints. - typehints: ``./beets/plugins.py`` file now includes typehints. - :doc:`plugins/ftintitle`: Optimize the plugin by avoiding unnecessary writes diff --git a/docs/plugins/missing.rst b/docs/plugins/missing.rst index ea5a5b3b3..f18656c8c 100644 --- a/docs/plugins/missing.rst +++ b/docs/plugins/missing.rst @@ -124,7 +124,7 @@ List all missing albums of release type "compilation" in your collection:: List all missing albums of release type "compilation" and album in your collection:: :: - + beet missing -a --release-type compilation --release-type album Call this plugin from other beet commands: From 1079b1300d0b91895c5611dde4026fb37bc7d818 Mon Sep 17 00:00:00 2001 From: Brock Grassy Date: Fri, 28 Nov 2025 11:08:33 -0500 Subject: [PATCH 5/7] Fix tests --- beetsplug/missing.py | 2 +- test/plugins/test_missing.py | 91 ++++++++++++++++++++---------------- 2 files changed, 51 insertions(+), 42 deletions(-) diff --git a/beetsplug/missing.py b/beetsplug/missing.py index f2192be7a..a6f1a5b63 100644 --- a/beetsplug/missing.py +++ b/beetsplug/missing.py @@ -196,7 +196,7 @@ class MissingPlugin(BeetsPlugin): # reporting the same set of missing albums. Instead, we should # group by `mb_albumartistid` field only. artist = (album["albumartist"], album["mb_albumartistid"]) - album_ids_by_artist[artist].add(album) + album_ids_by_artist[artist].add(album["mb_releasegroupid"]) total_missing = 0 release_type = self.config["release_type"].get() or ["album"] diff --git a/test/plugins/test_missing.py b/test/plugins/test_missing.py index b07c356fa..e89ba82b9 100644 --- a/test/plugins/test_missing.py +++ b/test/plugins/test_missing.py @@ -22,7 +22,7 @@ import pytest from beets.autotag.hooks import AlbumInfo, TrackInfo from beets.library import Item -from beets.test.helper import PluginMixin, TestHelper, capture_log +from beets.test.helper import PluginMixin, TestHelper, capture_log, capture_stdout def mock_browse_release_groups( @@ -60,7 +60,7 @@ class TestMissingPlugin(PluginMixin, TestHelper): mb_albumid="81ae60d4-5b75-38df-903a-db2cfa51c2c6", mb_releasegroupid="album_id", mb_trackid="track_1", - mb_albumartistid="artist_id", + mb_albumartistid="f59c5520-ba9f-4df7-aa9f-90b46ef857da", albumartist="artist", tracktotal=3, ), @@ -68,7 +68,7 @@ class TestMissingPlugin(PluginMixin, TestHelper): album="album", mb_albumid="81ae60d4-5b75-38df-903a-db2cfa51c2c6", mb_releasegroupid="album_id", - mb_albumartistid="artist_id", + mb_albumartistid="f59c5520-ba9f-4df7-aa9f-90b46ef857da", albumartist="artist", tracktotal=3, ), @@ -77,7 +77,7 @@ class TestMissingPlugin(PluginMixin, TestHelper): mb_albumid="81ae60d4-5b75-38df-903a-db2cfa51c2c6", mb_releasegroupid="album_id", mb_trackid="track_3", - mb_albumartistid="artist_id", + mb_albumartistid="f59c5520-ba9f-4df7-aa9f-90b46ef857da", albumartist="artist", tracktotal=3, ), @@ -91,12 +91,12 @@ class TestMissingPlugin(PluginMixin, TestHelper): "total,count", list(itertools.product((True, False), repeat=2)), ) - @patch("beets.autotag.hooks.album_for_mbid") - def test_missing_tracks(self, album_for_mbid, total, count): + @patch("beets.metadata_plugins.album_for_id") + def test_missing_tracks(self, album_for_id, total, count): """Test getting missing tracks works with expected logs.""" self.lib.add_album(self.album_items[:2]) - album_for_mbid.return_value = AlbumInfo( + album_for_id.return_value = AlbumInfo( album_id="album_id", album="album", tracks=[ @@ -105,39 +105,45 @@ class TestMissingPlugin(PluginMixin, TestHelper): ], ) - with capture_log() as logs: - command = ["missing"] - if total: - command.append("-t") - if count: - command.append("-c") - self.run_command(*command) + command = ["missing"] + if total: + command.append("-t") + if count: + command.append("-c") - if not total and not count: - assert ( - f"missing: track {self.album_items[-1].mb_trackid} in album album_id" - ) in logs - - if not total and count: - assert "missing: artist - album: 1" in logs - - assert ("missing: 1" in logs) == total + if total: + with capture_stdout() as output: + self.run_command(*command) + assert output.getvalue().strip() == "1" + elif count: + with capture_stdout() as output: + self.run_command(*command) + assert "artist - album: 1" in output.getvalue() + else: + with capture_log() as logs: + self.run_command(*command) + # The log message includes the "missing:" prefix in current master + assert any( + f"track {self.album_items[-1].mb_trackid} in album album_id" in log + for log in logs + ) def test_missing_albums(self): - """Test getting missing albums works with expected logs.""" + """Test getting missing albums works with expected output.""" with patch( "musicbrainzngs.browse_release_groups", wraps=mock_browse_release_groups, ): self.lib.add_album(self.album_items) - with capture_log() as logs: + with capture_stdout() as output: command = ["missing", "-a"] self.run_command(*command) - assert "missing: artist - compilation" not in logs - assert "missing: artist - title" not in logs - assert "missing: artist - title 2" in logs + output_str = output.getvalue() + assert "artist - compilation" not in output_str + assert "artist - title\n" not in output_str + assert "artist - title 2" in output_str def test_missing_albums_compilation(self): """Test getting missing albums works for a specific release type.""" @@ -147,13 +153,14 @@ class TestMissingPlugin(PluginMixin, TestHelper): ): self.lib.add_album(self.album_items) - with capture_log() as logs: + with capture_stdout() as output: command = ["missing", "-a", "--release-type", "compilation"] self.run_command(*command) - assert "missing: artist - compilation" in logs - assert "missing: artist - title" not in logs - assert "missing: artist - title 2" not in logs + output_str = output.getvalue() + assert "artist - compilation" in output_str + assert "artist - title" not in output_str + assert "artist - title 2" not in output_str def test_missing_albums_all(self): """Test getting missing albums works for all release types.""" @@ -163,7 +170,7 @@ class TestMissingPlugin(PluginMixin, TestHelper): ): self.lib.add_album(self.album_items) - with capture_log() as logs: + with capture_stdout() as output: command = [ "missing", "-a", @@ -174,9 +181,10 @@ class TestMissingPlugin(PluginMixin, TestHelper): ] self.run_command(*command) - assert "missing: artist - compilation" in logs - assert "missing: artist - title" not in logs - assert "missing: artist - title 2" in logs + output_str = output.getvalue() + assert "artist - compilation" in output_str + assert "artist - title\n" not in output_str + assert "artist - title 2" in output_str def test_missing_albums_total(self): """Test getting missing albums works with the total flag.""" @@ -186,7 +194,7 @@ class TestMissingPlugin(PluginMixin, TestHelper): ): self.lib.add_album(self.album_items) - with capture_log() as logs: + with capture_stdout() as output: command = [ "missing", "-a", @@ -194,8 +202,9 @@ class TestMissingPlugin(PluginMixin, TestHelper): ] self.run_command(*command) - assert "missing: 1" in logs + output_str = output.getvalue().strip() + assert output_str == "1" # Specific missing logs omitted if total provided - assert "missing: artist - compilation" not in logs - assert "missing: artist - title" not in logs - assert "missing: artist - title 2" not in logs + assert "artist - compilation" not in output_str + assert "artist - title" not in output_str + assert "artist - title 2" not in output_str From 44abfc902b796f9d00fd77f3076e79c656db6f54 Mon Sep 17 00:00:00 2001 From: Brock Grassy Date: Fri, 28 Nov 2025 11:26:24 -0500 Subject: [PATCH 6/7] Fix lint --- docs/changelog.rst | 2 +- test/plugins/test_missing.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index c523bfa41..e7dc0f17f 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -54,7 +54,7 @@ Bug fixes: endpoints. Previously, due to single-quotes (ie. string literal) in the SQL query, the query eg. `GET /item/values/albumartist` would return the literal "albumartist" instead of a list of unique album artists. -* :doc:`plugins/missing`: When running in missing album mode, allows users to specify +- :doc:`plugins/missing`: When running in missing album mode, allows users to specify MusicBrainz release types that they want to show using the ``--release-type`` flag. The default behavior is also changed to just show releases of type ``album``. :bug:`2661` diff --git a/test/plugins/test_missing.py b/test/plugins/test_missing.py index e89ba82b9..842c2c1bb 100644 --- a/test/plugins/test_missing.py +++ b/test/plugins/test_missing.py @@ -22,7 +22,12 @@ import pytest from beets.autotag.hooks import AlbumInfo, TrackInfo from beets.library import Item -from beets.test.helper import PluginMixin, TestHelper, capture_log, capture_stdout +from beets.test.helper import ( + PluginMixin, + TestHelper, + capture_log, + capture_stdout, +) def mock_browse_release_groups( @@ -124,7 +129,8 @@ class TestMissingPlugin(PluginMixin, TestHelper): self.run_command(*command) # The log message includes the "missing:" prefix in current master assert any( - f"track {self.album_items[-1].mb_trackid} in album album_id" in log + f"track {self.album_items[-1].mb_trackid} in album album_id" + in log for log in logs ) From 757aaef5cee15c56a1dc4df2ba0eb89d4ef7428c Mon Sep 17 00:00:00 2001 From: Brock Grassy Date: Fri, 28 Nov 2025 11:37:28 -0500 Subject: [PATCH 7/7] reformat failing docs --- docs/changelog.rst | 338 +++++++++++++++++++++++---------------- docs/plugins/missing.rst | 40 +++-- 2 files changed, 227 insertions(+), 151 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index e7dc0f17f..3931703e3 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,11 +1,13 @@ -Changelog -========= +########### + Changelog +########### Changelog goes here! Please add your entry to the bottom of one of the lists below! -Unreleased ----------- +************ + Unreleased +************ Beets now requires Python 3.10 or later since support for EOL Python 3.9 has been dropped. @@ -54,10 +56,10 @@ Bug fixes: endpoints. Previously, due to single-quotes (ie. string literal) in the SQL query, the query eg. `GET /item/values/albumartist` would return the literal "albumartist" instead of a list of unique album artists. -- :doc:`plugins/missing`: When running in missing album mode, allows users to specify - MusicBrainz release types that they want to show using the ``--release-type`` - flag. The default behavior is also changed to just show releases of type - ``album``. :bug:`2661` +- :doc:`plugins/missing`: When running in missing album mode, allows users to + specify MusicBrainz release types that they want to show using the + ``--release-type`` flag. The default behavior is also changed to just show + releases of type ``album``. :bug:`2661` For plugin developers: @@ -80,8 +82,9 @@ Other changes: - :doc:`plugins/bpd`: Raise ImportError instead of ValueError when GStreamer is unavailable, enabling ``importorskip`` usage in pytest setup. -2.5.1 (October 14, 2025) ------------------------- +************************** + 2.5.1 (October 14, 2025) +************************** New features: @@ -114,8 +117,9 @@ Other changes: automatically. Applied it to :doc:`plugins/deezer`, :doc:`plugins/discogs`, :doc:`plugins/musicbrainz` and :doc:`plugins/spotify` plugins documentation. -2.5.0 (October 11, 2025) ------------------------- +************************** + 2.5.0 (October 11, 2025) +************************** New features: @@ -198,8 +202,9 @@ For developers and plugin authors: - Metadata source plugins are now registered globally when instantiated, which makes their handling slightly more efficient. -2.4.0 (September 13, 2025) --------------------------- +**************************** + 2.4.0 (September 13, 2025) +**************************** New features: @@ -342,8 +347,9 @@ Other changes: - UI: Use ``text_diff_added`` and ``text_diff_removed`` colors in **all** diff comparisons, including case differences. -2.3.1 (May 14, 2025) --------------------- +********************** + 2.3.1 (May 14, 2025) +********************** Bug fixes: @@ -356,8 +362,9 @@ For packagers: - Force ``poetry`` version below 2 to avoid it mangling file modification times in ``sdist`` package. :bug:`5770` -2.3.0 (May 07, 2025) --------------------- +********************** + 2.3.0 (May 07, 2025) +********************** Beets now requires Python 3.9 or later since support for EOL Python 3.8 has been dropped. @@ -446,8 +453,9 @@ Other changes: to the database. - Database models are now serializable with pickle. -2.2.0 (December 02, 2024) -------------------------- +*************************** + 2.2.0 (December 02, 2024) +*************************** New features: @@ -472,8 +480,9 @@ Other changes: .. _contribute: https://github.com/beetbox/beets/contribute -2.1.0 (November 22, 2024) -------------------------- +*************************** + 2.1.0 (November 22, 2024) +*************************** New features: @@ -563,8 +572,9 @@ Other changes: calculate the bpm. Previously this import was being done immediately, so every ``beet`` invocation was being delayed by a couple of seconds. :bug:`5185` -2.0.0 (May 30, 2024) --------------------- +********************** + 2.0.0 (May 30, 2024) +********************** With this release, beets now requires Python 3.7 or later (it removes support for Python 3.6). @@ -875,8 +885,9 @@ Other changes: - :doc:`/faq`: :ref:`src`: Removed some long lines. - Refactor the test cases to avoid test smells. -1.6.0 (November 27, 2021) -------------------------- +*************************** + 1.6.0 (November 27, 2021) +*************************** This release is our first experiment with time-based releases! We are aiming to publish a new release of beets every 3 months. We therefore have a healthy but @@ -956,8 +967,9 @@ Here are some notes for packagers: Thus, the optional dependency on ``gmusicapi`` does not exist anymore. :bug:`4089` -1.5.0 (August 19, 2021) ------------------------ +************************* + 1.5.0 (August 19, 2021) +************************* This long overdue release of beets includes far too many exciting and useful features than could ever be satisfactorily enumerated. As a technical detail, it @@ -1347,8 +1359,9 @@ For packagers: .. _works: https://musicbrainz.org/doc/Work -1.4.9 (May 30, 2019) --------------------- +********************** + 1.4.9 (May 30, 2019) +********************** This small update is part of our attempt to release new versions more often! There are a few important fixes, and we're clearing the deck for a change to @@ -1378,8 +1391,9 @@ Here's a note for packagers: .. _no_color: https://no-color.org -1.4.8 (May 16, 2019) --------------------- +********************** + 1.4.8 (May 16, 2019) +********************** This release is far too long in coming, but it's a good one. There is the usual torrent of new features and a ridiculously long line of fixes, but there are @@ -1606,8 +1620,9 @@ And some messages for packagers: - The optional :pypi:`python-itunes` dependency has been removed. - Python versions 3.7 and 3.8 are now supported. -1.4.7 (May 29, 2018) --------------------- +********************** + 1.4.7 (May 29, 2018) +********************** This new release includes lots of new features in the importer and the metadata source backends that it uses. We've changed how the beets importer handles @@ -1730,8 +1745,9 @@ There are a couple of changes for developers: all cases, most notably when using the ``mbsync`` plugin. This was a regression since version 1.4.1. :bug:`2921` -1.4.6 (December 21, 2017) -------------------------- +*************************** + 1.4.6 (December 21, 2017) +*************************** The highlight of this release is "album merging," an oft-requested option in the importer to add new tracks to an existing album you already have in your @@ -1835,8 +1851,9 @@ There are some changes for developers: describing the file operation instead of multiple Boolean flags. There is a new numerated type describing how to move, copy, or link files. :bug:`2682` -1.4.5 (June 20, 2017) ---------------------- +*********************** + 1.4.5 (June 20, 2017) +*********************** Version 1.4.5 adds some oft-requested features. When you're importing files, you can now manually set fields on the new music. Date queries have gotten much more @@ -1877,8 +1894,9 @@ There are also some bug fixes: - More informative error messages are displayed when the file format is not recognized. :bug:`2599` -1.4.4 (June 10, 2017) ---------------------- +*********************** + 1.4.4 (June 10, 2017) +*********************** This release built up a longer-than-normal list of nifty new features. We now support DSF audio files and the importer can hard-link your files, for example. @@ -1997,8 +2015,9 @@ We removed backends from two metadata plugins because of bitrot: .. _python-itunes: https://github.com/ocelma/python-itunes -1.4.3 (January 9, 2017) ------------------------ +************************* + 1.4.3 (January 9, 2017) +************************* Happy new year! This new version includes a cornucopia of new features from contributors, including new tags related to classical music and a new @@ -2063,8 +2082,9 @@ For plugin developers: when providing new importer prompt choices (see to consider. For example, you might provide an alternative strategy for picking between the available alternatives or for looking up a release on MusicBrainz. -1.4.2 (December 16, 2016) -------------------------- +*************************** + 1.4.2 (December 16, 2016) +*************************** This is just a little bug fix release. With 1.4.2, we're also confident enough to recommend that anyone who's interested give Python 3 a try: bugs may still @@ -2087,8 +2107,9 @@ Also, we've removed some special handling for logging in the :doc:`/plugins/discogs` that we believe was unnecessary. If spurious log messages appear in this version, please let us know by filing a bug. -1.4.1 (November 25, 2016) -------------------------- +*************************** + 1.4.1 (November 25, 2016) +*************************** Version 1.4 has **alpha-level** Python 3 support. Thanks to the heroic efforts of :user:`jrobeson`, beets should run both under Python 2.7, as before, and now @@ -2182,8 +2203,9 @@ you typed ``beet version``. This has been corrected. .. _six: https://pypi.org/project/six/ -1.3.19 (June 25, 2016) ----------------------- +************************ + 1.3.19 (June 25, 2016) +************************ This is primarily a bug fix release: it cleans up a couple of regressions that appeared in the last version. But it also features the triumphant return of the @@ -2233,8 +2255,9 @@ And other fixes: versions, the plugin would use a ``.jpg`` extension for all images. :bug:`2053` -1.3.18 (May 31, 2016) ---------------------- +*********************** + 1.3.18 (May 31, 2016) +*********************** This update adds a new :doc:`/plugins/hook` that lets you integrate beets with command-line tools and an :doc:`/plugins/export` that can dump data from the @@ -2314,8 +2337,9 @@ Fixes: - :doc:`/plugins/acousticbrainz`: AcousticBrainz lookups are now done over HTTPS. Thanks to :user:`Freso`. :bug:`2007` -1.3.17 (February 7, 2016) -------------------------- +*************************** + 1.3.17 (February 7, 2016) +*************************** This release introduces one new plugin to fetch audio information from the AcousticBrainz_ project and another plugin to make it easier to submit your @@ -2393,8 +2417,9 @@ Fixes: .. _beets.io: https://beets.io/ -1.3.16 (December 28, 2015) --------------------------- +**************************** + 1.3.16 (December 28, 2015) +**************************** The big news in this release is a new :doc:`interactive editor plugin `. It's really nifty: you can now change your music's metadata by @@ -2506,8 +2531,9 @@ Fixes: .. _emby: https://emby.media -1.3.15 (October 17, 2015) -------------------------- +*************************** + 1.3.15 (October 17, 2015) +*************************** This release adds a new plugin for checking file quality and a new source for lyrics. The larger features are: @@ -2569,8 +2595,9 @@ This release has plenty of fixes: - Fixed unit of file size to powers of two (MiB, GiB, etc.) instead of powers of ten (MB, GB, etc.). :bug:`1623` -1.3.14 (August 2, 2015) ------------------------ +************************* + 1.3.14 (August 2, 2015) +************************* This is mainly a bugfix release, but we also have a nifty new plugin for ipfs_ and a bunch of new configuration options. @@ -2665,8 +2692,9 @@ Fixes: .. _python bug: https://bugs.python.org/issue16512 -1.3.13 (April 24, 2015) ------------------------ +************************* + 1.3.13 (April 24, 2015) +************************* This is a tiny bug-fix release. It copes with a dependency upgrade that broke beets. There are just two fixes: @@ -2677,8 +2705,9 @@ beets. There are just two fixes: album art is no longer embedded on import in order to leave files untouched---in effect, ``auto`` is implicitly disabled. :bug:`1427` -1.3.12 (April 18, 2015) ------------------------ +************************* + 1.3.12 (April 18, 2015) +************************* This little update makes queries more powerful, sorts music more intelligently, and removes a performance bottleneck. There's an experimental new plugin for @@ -2736,8 +2765,9 @@ Little fixes and improvements: .. _jellyfish: https://github.com/sunlightlabs/jellyfish -1.3.11 (April 5, 2015) ----------------------- +************************ + 1.3.11 (April 5, 2015) +************************ In this release, we refactored the logging system to be more flexible and more useful. There are more granular levels of verbosity, the output from plugins @@ -2927,8 +2957,9 @@ For developers: .. _bs1770gain: http://bs1770gain.sourceforge.net -1.3.10 (January 5, 2015) ------------------------- +************************** + 1.3.10 (January 5, 2015) +************************** This version adds a healthy helping of new features and fixes a critical MPEG-4--related bug. There are more lyrics sources, there new plugins for @@ -3011,8 +3042,9 @@ As usual, there are loads of little fixes and improvements: .. _plex: https://plex.tv/ -1.3.9 (November 17, 2014) -------------------------- +*************************** + 1.3.9 (November 17, 2014) +*************************** This release adds two new standard plugins to beets: one for synchronizing Last.fm listening data and one for integrating with Linux desktops. And at long @@ -3118,8 +3150,9 @@ And countless little improvements and fixes: - Importing an archive will no longer leave temporary files behind in ``/tmp``. Thanks to :user:`multikatt`. :bug:`1067`, :bug:`1091` -1.3.8 (September 17, 2014) --------------------------- +**************************** + 1.3.8 (September 17, 2014) +**************************** This release has two big new chunks of functionality. Queries now support **sorting** and user-defined fields can now have **types**. @@ -3195,8 +3228,9 @@ Still more fixes and little improvements: .. _discogs_client: https://github.com/discogs/discogs_client -1.3.7 (August 22, 2014) ------------------------ +************************* + 1.3.7 (August 22, 2014) +************************* 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 @@ -3295,8 +3329,9 @@ And the multitude of little improvements and fixes: - :doc:`/plugins/mbsync`: Track alignment now works with albums that have multiple copies of the same recording. Thanks to Rui Gonçalves. -1.3.6 (May 10, 2014) --------------------- +********************** + 1.3.6 (May 10, 2014) +********************** 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 @@ -3338,8 +3373,9 @@ And those all-important bug fixes: were embedded into the source files. - New plugin event: ``before_item_moved``. Thanks to Robert Speicher. -1.3.5 (April 15, 2014) ----------------------- +************************ + 1.3.5 (April 15, 2014) +************************ 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 @@ -3400,8 +3436,9 @@ There are also many bug fixes and little enhancements: .. _enum34: https://pypi.python.org/pypi/enum34 -1.3.4 (April 5, 2014) ---------------------- +*********************** + 1.3.4 (April 5, 2014) +*********************** This release brings a hodgepodge of medium-sized conveniences to beets. A new :ref:`config-cmd` command manages your configuration, we now have :ref:`bash @@ -3478,8 +3515,9 @@ Fixes: .. _requests: https://requests.readthedocs.io/en/master/ -1.3.3 (February 26, 2014) -------------------------- +*************************** + 1.3.3 (February 26, 2014) +*************************** 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 @@ -3575,8 +3613,9 @@ Other little fixes: - Album art in files with Vorbis Comments is now marked with the "front cover" type. Thanks to Jason Lefley. -1.3.2 (December 22, 2013) -------------------------- +*************************** + 1.3.2 (December 22, 2013) +*************************** This update brings new plugins for fetching acoustic metrics and listening statistics, many more options for the duplicate detection plugin, and flexible @@ -3650,8 +3689,9 @@ As usual, there are also innumerable little fixes and improvements: .. _mpd: https://www.musicpd.org/ -1.3.1 (October 12, 2013) ------------------------- +************************** + 1.3.1 (October 12, 2013) +************************** 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, @@ -3716,8 +3756,9 @@ And some fixes: .. _opus: https://www.opus-codec.org/ -1.3.0 (September 11, 2013) --------------------------- +**************************** + 1.3.0 (September 11, 2013) +**************************** 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 @@ -3758,8 +3799,9 @@ There's more detail than you could ever need `on the beets blog`_. .. _on the beets blog: https://beets.io/blog/flexattr.html -1.2.2 (August 27, 2013) ------------------------ +************************* + 1.2.2 (August 27, 2013) +************************* 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. @@ -3782,8 +3824,9 @@ The improvements in this release are: situation could only arise when importing music from the library directory and when the two albums are imported close in time. -1.2.1 (June 22, 2013) ---------------------- +*********************** + 1.2.1 (June 22, 2013) +*********************** This release introduces a major internal change in the way that similarity scores are handled. It means that the importer interface can now show you @@ -3832,8 +3875,9 @@ And some little enhancements and bug fixes: - :doc:`/plugins/random`: Fix compatibility with Python 2.6. Thanks to Matthias Drochner. -1.2.0 (June 5, 2013) --------------------- +********************** + 1.2.0 (June 5, 2013) +********************** There's a *lot* of new stuff in this release: new data sources for the autotagger, new plugins to look for problems in your library, tracking the date @@ -3946,8 +3990,9 @@ And a batch of fixes: .. _discogs: https://discogs.com/ -1.1.0 (April 29, 2013) ----------------------- +************************ + 1.1.0 (April 29, 2013) +************************ This final release of 1.1 brings a little polish to the betas that introduced the new configuration system. The album art and lyrics plugins also got a little @@ -3993,8 +4038,9 @@ will automatically migrate your configuration to the new system. .. _tomahawk: https://github.com/tomahawk-player/tomahawk -1.1b3 (March 16, 2013) ----------------------- +************************ + 1.1b3 (March 16, 2013) +************************ This third beta of beets 1.1 brings a hodgepodge of little new features (and internal overhauls that will make improvements easier in the future). There are @@ -4062,8 +4108,9 @@ Other stuff: - :doc:`/plugins/chroma`: Catch Acoustid Web service errors when submitting fingerprints. -1.1b2 (February 16, 2013) -------------------------- +*************************** + 1.1b2 (February 16, 2013) +*************************** The second beta of beets 1.1 uses the fancy new configuration infrastructure to add many, many new config options. The import process is more flexible; @@ -4165,8 +4212,9 @@ Other new stuff: .. _itunes sound check: https://support.apple.com/kb/HT2425 -1.1b1 (January 29, 2013) ------------------------- +************************** + 1.1b1 (January 29, 2013) +************************** This release entirely revamps beets' configuration system. The configuration file is now a YAML_ document and is located, along with other support files, in @@ -4199,8 +4247,9 @@ It also adds some new features: - :doc:`/plugins/importfeeds`: Added a new configuration option that controls the base for relative paths used in m3u files. Thanks to Philippe Mongeau. -1.0.0 (January 29, 2013) ------------------------- +************************** + 1.0.0 (January 29, 2013) +************************** After fifteen betas and two release candidates, beets has finally hit one-point-oh. Congratulations to everybody involved. This version of beets will @@ -4214,8 +4263,9 @@ ongoing in the betas of version 1.1. when analyzing non-ASCII filenames. - Silence a spurious warning from version 0.04.12 of the Unidecode module. -1.0rc2 (December 31, 2012) --------------------------- +**************************** + 1.0rc2 (December 31, 2012) +**************************** This second release candidate follows quickly after rc1 and fixes a few small bugs found since that release. There were a couple of regressions and some bugs @@ -4228,8 +4278,9 @@ in a newly added plugin. not available from some sources. - Fix a regression on Windows that caused all relative paths to be "not found". -1.0rc1 (December 17, 2012) --------------------------- +**************************** + 1.0rc1 (December 17, 2012) +**************************** The first release candidate for beets 1.0 includes a deluge of new features contributed by beets users. The vast majority of the credit for this release @@ -4338,8 +4389,9 @@ today on features for version 1.1. .. _tomahawk resolver: https://beets.io/blog/tomahawk-resolver.html -1.0b15 (July 26, 2012) ----------------------- +************************ + 1.0b15 (July 26, 2012) +************************ The fifteenth (!) beta of beets is compendium of small fixes and features, most of which represent long-standing requests. The improvements include matching @@ -4447,8 +4499,9 @@ fetching cover art for your music, enable this plugin after upgrading to beets .. _artist credits: https://wiki.musicbrainz.org/Artist_Credit -1.0b14 (May 12, 2012) ---------------------- +*********************** + 1.0b14 (May 12, 2012) +*********************** The centerpiece of this beets release is the graceful handling of similarly-named albums. It's now possible to import two albums with the same @@ -4533,8 +4586,9 @@ release. .. _pyacoustid: https://github.com/beetbox/pyacoustid -1.0b13 (March 16, 2012) ------------------------ +************************* + 1.0b13 (March 16, 2012) +************************* Beets 1.0b13 consists of a plethora of small but important fixes and refinements. A lyrics plugin is now included with beets; new audio properties @@ -4604,8 +4658,9 @@ to come in the next couple of releases. .. _colorama: https://pypi.python.org/pypi/colorama -1.0b12 (January 16, 2012) -------------------------- +*************************** + 1.0b12 (January 16, 2012) +*************************** This release focuses on making beets' path formatting vastly more powerful. It adds a function syntax for transforming text. Via a new plugin, arbitrary Python @@ -4656,8 +4711,9 @@ filenames that would otherwise conflict. Three new plugins (``inline``, - Removed the ``--path-format`` global flag for ``beet``. - Removed the ``lastid`` plugin, which was deprecated in the previous version. -1.0b11 (December 12, 2011) --------------------------- +**************************** + 1.0b11 (December 12, 2011) +**************************** This version of beets focuses on transitioning the autotagger to the new version of the MusicBrainz database (called NGS). This transition brings with it a @@ -4727,8 +4783,9 @@ release: one for assigning genres and another for ReplayGain analysis. .. _simon chopin: https://github.com/laarmen -1.0b10 (September 22, 2011) ---------------------------- +***************************** + 1.0b10 (September 22, 2011) +***************************** This version of beets focuses on making it easier to manage your metadata *after* you've imported it. A bumper crop of new commands has been added: a @@ -4778,8 +4835,9 @@ plugin. - Fix Unicode encoding of album artist, album type, and label. - Fix crash when "copying" an art file that's already in place. -1.0b9 (July 9, 2011) --------------------- +********************** + 1.0b9 (July 9, 2011) +********************** This release focuses on a large number of small fixes and improvements that turn beets into a well-oiled, music-devouring machine. See the full release notes, @@ -4854,8 +4912,9 @@ below, for a plethora of new features. .. _xargs: https://en.wikipedia.org/wiki/xargs -1.0b8 (April 28, 2011) ----------------------- +************************ + 1.0b8 (April 28, 2011) +************************ This release of beets brings two significant new features. First, beets now has first-class support for "singleton" tracks. Previously, it was only really meant @@ -4905,8 +4964,9 @@ that functionality. - Fix adding individual tracks in BPD. - Fix crash when ``~/.beetsconfig`` does not exist. -1.0b7 (April 5, 2011) ---------------------- +*********************** + 1.0b7 (April 5, 2011) +*********************** Beta 7's focus is on better support for "various artists" releases. These albums can be treated differently via the new ``[paths]`` config section and the @@ -4964,8 +5024,9 @@ new configuration options and the ability to clean up empty directory subtrees. .. _as specified by musicbrainz: https://wiki.musicbrainz.org/ReleaseType -1.0b6 (January 20, 2011) ------------------------- +************************** + 1.0b6 (January 20, 2011) +************************** This version consists primarily of bug fixes and other small improvements. It's in preparation for a more feature-ful release in beta 7. The most important @@ -5006,8 +5067,9 @@ issue involves correct ordering of autotagged albums. .. _upstream bug: https://github.com/quodlibet/mutagen/issues/7 -1.0b5 (September 28, 2010) --------------------------- +**************************** + 1.0b5 (September 28, 2010) +**************************** This version of beets focuses on increasing the accuracy of the autotagger. The main addition is an included plugin that uses acoustic fingerprinting to match @@ -5055,8 +5117,9 @@ are also rolled into this release. .. _!!!: https://musicbrainz.org/artist/f26c72d3-e52c-467b-b651-679c73d8e1a7.html -1.0b4 (August 9, 2010) ----------------------- +************************ + 1.0b4 (August 9, 2010) +************************ This thrilling new release of beets focuses on making the tagger more usable in a variety of ways. First and foremost, it should now be much faster: the tagger @@ -5128,8 +5191,9 @@ Here's the detailed list of changes: - The tagger should now be a little more reluctant to reorder tracks that already have indices. -1.0b3 (July 22, 2010) ---------------------- +*********************** + 1.0b3 (July 22, 2010) +*********************** This release features two major additions to the autotagger's functionality: album art fetching and MusicBrainz ID tags. It also contains some important @@ -5196,8 +5260,9 @@ when accessed through FUSE. Check it out! .. _beetfs: https://github.com/jbaiter/beetfs -1.0b2 (July 7, 2010) --------------------- +********************** + 1.0b2 (July 7, 2010) +********************** This release focuses on high-priority fixes and conspicuously missing features. Highlights include support for two new audio formats (Monkey's Audio and Ogg @@ -5224,7 +5289,8 @@ Vorbis) and an option to log untaggable albums during import. .. _a hand-rolled solution: https://gist.github.com/462717 -1.0b1 (June 17, 2010) ---------------------- +*********************** + 1.0b1 (June 17, 2010) +*********************** Initial release. diff --git a/docs/plugins/missing.rst b/docs/plugins/missing.rst index f18656c8c..ea4811574 100644 --- a/docs/plugins/missing.rst +++ b/docs/plugins/missing.rst @@ -1,12 +1,14 @@ -Missing Plugin -============== +################ + Missing Plugin +################ This plugin adds a new command, ``missing`` or ``miss``, which finds and lists missing tracks for albums in your collection. Each album requires one network call to album data source. -Usage ------ +******* + Usage +******* Add the ``missing`` plugin to your configuration (see :ref:`using-plugins`). The ``beet missing`` command fetches album information from the origin data source @@ -36,11 +38,12 @@ library: .. warning:: Option ``-c`` is ignored when used with ``-a``, and ``--release-type`` is - ignored when not used with ``-a``. Valid release types can be shown by running - ``beet missing -h``. + ignored when not used with ``-a``. Valid release types can be shown by + running ``beet missing -h``. -Configuration -------------- +*************** + Configuration +*************** To configure the plugin, make a ``missing:`` section in your configuration file. The available options are: @@ -51,7 +54,7 @@ The available options are: ``no``. Formatting -~~~~~~~~~~ +========== - This plugin uses global formatting options from the main configuration; see :ref:`format_item` and :ref:`format_album`: @@ -69,14 +72,16 @@ Here's an example count: no total: no -Template Fields ---------------- +***************** + Template Fields +***************** With this plugin enabled, the ``$missing`` template field expands to the number of tracks missing from each album. -Examples --------- +********** + Examples +********** List all missing tracks in your collection: @@ -115,16 +120,21 @@ Print out a count of the total number of missing tracks: beet missing -t -List all missing albums of release type "compilation" in your collection:: +List all missing albums of release type "compilation" in your collection: :: + :: + beet missing -a --release-type compilation -List all missing albums of release type "compilation" and album in your collection:: +List all missing albums of release type "compilation" and album in your +collection: :: + :: + beet missing -a --release-type compilation --release-type album Call this plugin from other beet commands: