From a5ecc77663b806c75478c2af4e14f70a86db4b29 Mon Sep 17 00:00:00 2001 From: Diego Moreda Date: Wed, 9 Dec 2015 16:30:20 +0100 Subject: [PATCH] Add documentation for M:SS length --- beets/library.py | 3 +-- docs/changelog.rst | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/beets/library.py b/beets/library.py index ed6b39280..f8d226dbe 100644 --- a/beets/library.py +++ b/beets/library.py @@ -200,7 +200,6 @@ class DurationType(types.Float): query = dbcore.query.DurationQuery def format(self, value): - # TODO: decide if documenting format_raw_length if not beets.config['format_raw_length'].get(bool): return beets.ui.human_seconds_short(value or 0.0) else: @@ -211,7 +210,7 @@ class DurationType(types.Float): # Try to format back hh:ss to seconds. return util.raw_seconds_short(string) except ValueError: - # Fall back to a plain float.. + # Fall back to a plain float. try: return float(string) except ValueError: diff --git a/docs/changelog.rst b/docs/changelog.rst index a78bfb727..003319267 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -26,6 +26,11 @@ New: singles compilation, "1." See :ref:`not_query`. :bug:`819` :bug:`1728` * :doc:`/plugins/info`: The plugin now accepts the ``-f/--format`` option for customizing how items are displayed. :bug:`1737` +* Track length is now displayed as ``M:SS`` by default, instead of displaying + the raw number of seconds. Queries on track length also accept this format: + for example, ``beet list length:5:30..`` will find all your tracks that have + a duration over 5 minutes and 30 seconds. You can toggle this setting off + via the ``format_raw_length`` configuration option. :bug:`1749` For developers: