From acd5c6404f8b0cc8a7a62bd6c97cfff9f5b48dc2 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 8 Nov 2016 16:23:57 -0800 Subject: [PATCH] missing plugin, modify "missing" attribute by modifying album_types, making it of type INTEGER. also changelog for above. --- beetsplug/missing.py | 7 ++++++- docs/changelog.rst | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/beetsplug/missing.py b/beetsplug/missing.py index b99a70d9e..a09c855cb 100644 --- a/beetsplug/missing.py +++ b/beetsplug/missing.py @@ -22,7 +22,7 @@ from beets.library import Item from beets.plugins import BeetsPlugin from beets.ui import decargs, print_, Subcommand from beets import config - +from beets.dbcore import types def _missing_count(album): """Return number of missing items in `album`. @@ -81,6 +81,11 @@ def _item(track_info, album_info, album_id): class MissingPlugin(BeetsPlugin): """List missing tracks """ + + album_types = { + 'missing': types.INTEGER, + } + def __init__(self): super(MissingPlugin, self).__init__() diff --git a/docs/changelog.rst b/docs/changelog.rst index 7c03e230d..dd012285b 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -84,6 +84,8 @@ And there are a few bug fixes too: single track, two-sided mediums are treated as single discs, and tracks have ``media``, ``medium_total`` and ``medium`` set correctly. :bug:`2222` :bug:`2228`. +* :doc:`/plugins/missing`: ``missing`` is now treated as an integer, allowing + the use of (for example) ranges in queries. The last release, 1.3.19, also erroneously reported its version as "1.3.18" when you typed ``beet version``. This has been corrected.