mirror of
https://github.com/beetbox/beets.git
synced 2026-01-25 01:22:14 +01:00
original_date config option (GC-441)
This commit is contained in:
parent
e0bb3b5cd0
commit
3e624ea884
4 changed files with 39 additions and 5 deletions
|
|
@ -178,11 +178,21 @@ def apply_metadata(album_info, mapping):
|
|||
item.albumartist_credit = album_info.artist_credit
|
||||
|
||||
# Release date.
|
||||
for key in ('year', 'month', 'day',
|
||||
'original_year', 'original_month', 'original_day'):
|
||||
value = getattr(album_info, key)
|
||||
if value:
|
||||
setattr(item, key, value)
|
||||
for prefix in '', 'original_':
|
||||
if config['original_date'] and not prefix:
|
||||
# Ignore specific release date.
|
||||
continue
|
||||
|
||||
for suffix in 'year', 'month', 'day':
|
||||
key = prefix + suffix
|
||||
value = getattr(album_info, key)
|
||||
if value:
|
||||
setattr(item, key, value)
|
||||
if config['original_date']:
|
||||
# If we're using original release date for both
|
||||
# fields, set item.year = info.original_year,
|
||||
# etc.
|
||||
setattr(item, suffix, value)
|
||||
|
||||
# Title.
|
||||
item.title = track_info.title
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ timeout: 5.0
|
|||
per_disc_numbering: no
|
||||
verbose: no
|
||||
terminal_encoding: utf8
|
||||
original_date: no
|
||||
|
||||
ui:
|
||||
terminal_width: 80
|
||||
|
|
|
|||
|
|
@ -4,6 +4,14 @@ Changelog
|
|||
1.1b2 (in development)
|
||||
----------------------
|
||||
|
||||
This version introduces one **change to the default behavior** that you should
|
||||
be aware of. Previously, when importing new albums matched in MusicBrainz, the
|
||||
date fields (``year``, ``month``, and ``day``) would be set to the release date
|
||||
of the *original* version of the album, as opposed to the specific date of the
|
||||
release selected. Now, these fields reflect the specific release and
|
||||
``original_year``, etc., reflect the earlier release date. If you want the old
|
||||
behavior, just set :ref:`original_date` to true in your config file.
|
||||
|
||||
New configuration options:
|
||||
|
||||
* :ref:`default_action` lets you determine the default (just-hit-return) option
|
||||
|
|
@ -13,6 +21,10 @@ New configuration options:
|
|||
* :ref:`max_rec` lets you define a maximum recommendation for albums with
|
||||
missing/extra tracks or differing track lengths/numbers. Thanks again to Tai
|
||||
Lee.
|
||||
* :ref:`original_date` determines whether, when importing new albums, the
|
||||
``year``, ``month``, and ``day`` fields should reflect the specific (e.g.,
|
||||
reissue) release date or the original release date. Note that the original
|
||||
release date is always available as ``original_year``, etc.
|
||||
* :ref:`clutter` controls which files should be ignored when cleaning up empty
|
||||
directories. Thanks to Steinþór Pálsson.
|
||||
* :doc:`/plugins/lastgenre`: A new configuration option lets you choose to
|
||||
|
|
|
|||
|
|
@ -149,6 +149,17 @@ Format to use when listing *albums* with :ref:`list-cmd` and other
|
|||
commands. Defaults to ``$albumartist - $album``. The ``-f`` command-line
|
||||
option overrides this setting.
|
||||
|
||||
.. _original_date:
|
||||
|
||||
original_date
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Either ``yes`` or ``no``, indicating whether matched albums should have their
|
||||
``year``, ``month``, and ``day`` fields set to the release date of the
|
||||
*original* version of an album rather than the selected version of the release.
|
||||
That is, if this option is turned on, then ``year`` will always equal
|
||||
``original_year`` and so on. Default: ``no``.
|
||||
|
||||
.. _per_disc_numbering:
|
||||
|
||||
per_disc_numbering
|
||||
|
|
|
|||
Loading…
Reference in a new issue