mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 12:02:41 +01:00
Document the %sunique template
This commit is contained in:
parent
f641df0748
commit
6aa9804c24
3 changed files with 33 additions and 0 deletions
|
|
@ -35,6 +35,8 @@ New features:
|
|||
* :ref:`import-options`: Add support for re-running the importer on paths in
|
||||
log files that were created with the ``-l`` (or ``--logfile``) argument.
|
||||
:bug:`4379` :bug:`4387`
|
||||
* Add :ref:`%sunique{} <sunique>` template to disambiguate between singletons.
|
||||
:bug:`4438`
|
||||
|
||||
Bug fixes:
|
||||
|
||||
|
|
|
|||
|
|
@ -326,6 +326,23 @@ The defaults look like this::
|
|||
|
||||
See :ref:`aunique` for more details.
|
||||
|
||||
.. _config-sunique:
|
||||
|
||||
sunique
|
||||
~~~~~~~
|
||||
|
||||
These options are used to generate a string that is guaranteed to be unique
|
||||
among all singletons in the library who share the same set of keys.
|
||||
|
||||
The defaults look like this::
|
||||
|
||||
sunique:
|
||||
keys: artist title
|
||||
disambiguators: year trackdisambig
|
||||
bracket: '[]'
|
||||
|
||||
See :ref:`sunique` for more details.
|
||||
|
||||
|
||||
.. _terminal_encoding:
|
||||
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@ These functions are built in to beets:
|
|||
option.
|
||||
* ``%aunique{identifiers,disambiguators,brackets}``: Provides a unique string
|
||||
to disambiguate similar albums in the database. See :ref:`aunique`, below.
|
||||
* ``%sunique{identifiers,disambiguators,brackets}``: Provides a unique string
|
||||
to disambiguate similar singletons in the database. See :ref:`sunique`, below.
|
||||
* ``%time{date_time,format}``: Return the date and time in any format accepted
|
||||
by `strftime`_. For example, to get the year some music was added to your
|
||||
library, use ``%time{$added,%Y}``.
|
||||
|
|
@ -145,6 +147,18 @@ its import time. Only the second album will receive a disambiguation string. If
|
|||
you want to add the disambiguation string to both albums, just run ``beet move``
|
||||
(possibly restricted by a query) to update the paths for the albums.
|
||||
|
||||
.. _sunique:
|
||||
|
||||
Singleton Disambiguation
|
||||
------------------------
|
||||
|
||||
It is also possible to have singleton tracks with the same name and the same
|
||||
artist. Beets provides the ``%sunique{}`` template to avoid having the same
|
||||
file path.
|
||||
|
||||
It has the same arguments as the :ref:`%aunique <aunique>` template, but the default
|
||||
values are different. The default identifiers are ``artist title`` and the
|
||||
default disambiguators are ``year trackdisambig``.
|
||||
|
||||
Syntax Details
|
||||
--------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue