mirror of
https://github.com/beetbox/beets.git
synced 2025-12-24 09:33:46 +01:00
Merge remote-tracking branch 'upstream/master' into fetchart_unittests
This commit is contained in:
commit
7eb98c15bc
3 changed files with 21 additions and 7 deletions
|
|
@ -1490,18 +1490,24 @@ def move_items(lib, dest, query, copy, album, pretend, confirm=False,
|
|||
"""
|
||||
items, albums = _do_query(lib, query, album, False)
|
||||
objs = albums if album else items
|
||||
num_objs = len(objs)
|
||||
|
||||
# Filter out files that don't need to be moved.
|
||||
isitemmoved = lambda item: item.path != item.destination(basedir=dest)
|
||||
isalbummoved = lambda album: any(isitemmoved(i) for i in album.items())
|
||||
objs = [o for o in objs if (isalbummoved if album else isitemmoved)(o)]
|
||||
num_unmoved = num_objs - len(objs)
|
||||
# Report unmoved files that match the query.
|
||||
unmoved_msg = u''
|
||||
if num_unmoved > 0:
|
||||
unmoved_msg = u' ({} already in place)'.format(num_unmoved)
|
||||
|
||||
copy = copy or export # Exporting always copies.
|
||||
action = u'Copying' if copy else u'Moving'
|
||||
act = u'copy' if copy else u'move'
|
||||
entity = u'album' if album else u'item'
|
||||
log.info(u'{0} {1} {2}{3}.', action, len(objs), entity,
|
||||
u's' if len(objs) != 1 else u'')
|
||||
log.info(u'{0} {1} {2}{3}{4}.', action, len(objs), entity,
|
||||
u's' if len(objs) != 1 else u'', unmoved_msg)
|
||||
if not objs:
|
||||
return
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,10 @@ New features:
|
|||
strings, which prevents strange repeated output when running ``beet write``.
|
||||
Thanks to :user:`Holzhaus`.
|
||||
:bug:`3097` :bug:`2942`
|
||||
* The ``move`` command now lists the number of items already in-place.
|
||||
Thanks to :user:`RollingStar`.
|
||||
:bug:`3117`
|
||||
|
||||
|
||||
Changes:
|
||||
|
||||
|
|
|
|||
|
|
@ -654,8 +654,8 @@ Default: ``{}`` (empty).
|
|||
MusicBrainz Options
|
||||
-------------------
|
||||
|
||||
If you run your own `MusicBrainz`_ server, you can instruct beets to use it
|
||||
instead of the main server. Use the ``host`` and ``ratelimit`` options under a
|
||||
You can instruct beets to use `your own MusicBrainz database`_ instead of
|
||||
the `main server`_. Use the ``host`` and ``ratelimit`` options under a
|
||||
``musicbrainz:`` header, like so::
|
||||
|
||||
musicbrainz:
|
||||
|
|
@ -663,14 +663,18 @@ instead of the main server. Use the ``host`` and ``ratelimit`` options under a
|
|||
ratelimit: 100
|
||||
|
||||
The ``host`` key, of course, controls the Web server hostname (and port,
|
||||
optionally) that will be contacted by beets (default: musicbrainz.org). The
|
||||
``ratelimit`` option, an integer, controls the number of Web service requests
|
||||
optionally) that will be contacted by beets (default: musicbrainz.org).
|
||||
The server must have search indices enabled (see `Building search indexes`_).
|
||||
|
||||
The ``ratelimit`` option, an integer, controls the number of Web service requests
|
||||
per second (default: 1). **Do not change the rate limit setting** if you're
|
||||
using the main MusicBrainz server---on this public server, you're `limited`_
|
||||
to one request per second.
|
||||
|
||||
.. _your own MusicBrainz database: https://musicbrainz.org/doc/MusicBrainz_Server/Setup
|
||||
.. _main server: https://musicbrainz.org/
|
||||
.. _limited: http://musicbrainz.org/doc/XML_Web_Service/Rate_Limiting
|
||||
.. _MusicBrainz: http://musicbrainz.org/
|
||||
.. _Building search indexes: https://musicbrainz.org/doc/MusicBrainz_Server/Setup#Building_search_indexes
|
||||
|
||||
.. _searchlimit:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue