mirror of
https://github.com/beetbox/beets.git
synced 2025-12-20 15:43:58 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
a55ba1a7a0
13 changed files with 41 additions and 40 deletions
1
.hgtags
1
.hgtags
|
|
@ -16,3 +16,4 @@ d3dbc6df2b96f8ba5704305a893e3e63b7f9cd77 1.0b14
|
|||
c84744f4519be7416dc1653142f1763f406d6896 1.0rc1
|
||||
f3cd4c138c6f40dc324a23bf01c4c7d97766477e 1.0rc2
|
||||
6f29c0f4dc7025e8d8216ea960000c353886c4f4 v1.1.0-beta.1
|
||||
f28ea9e2ef8d39913d79dbba73db280ff0740c50 v1.1.0-beta.2
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# The above copyright notice and this permission notice shall be
|
||||
# included in all copies or substantial portions of the Software.
|
||||
|
||||
__version__ = '1.1.0-beta.2'
|
||||
__version__ = '1.1.0-beta.3'
|
||||
__author__ = 'Adrian Sampson <adrian@radbox.org>'
|
||||
|
||||
import beets.library
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ from beets.util import sorted_walk, ancestry, displayable_path
|
|||
|
||||
# Parts of external interface.
|
||||
from .hooks import AlbumInfo, TrackInfo, AlbumMatch, TrackMatch
|
||||
from .match import AutotagError
|
||||
from .match import tag_item, tag_album
|
||||
from .match import recommendation
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ ALBUM_WEIGHT = 3.0
|
|||
TRACK_WEIGHT = 1.0
|
||||
# The weight of a missing track.
|
||||
MISSING_WEIGHT = 0.9
|
||||
# The weight of an extra (umatched) track.
|
||||
# The weight of an extra (unmatched) track.
|
||||
UNMATCHED_WEIGHT = 0.6
|
||||
# These distances are components of the track distance (that is, they
|
||||
# compete against each other but not ARTIST_WEIGHT and ALBUM_WEIGHT;
|
||||
|
|
@ -81,10 +81,6 @@ recommendation = enum('none', 'low', 'medium', 'strong', name='recommendation')
|
|||
# differing artists.
|
||||
VA_ARTISTS = (u'', u'various artists', u'va', u'unknown')
|
||||
|
||||
# Autotagging exceptions.
|
||||
class AutotagError(Exception):
|
||||
pass
|
||||
|
||||
# Global logger.
|
||||
log = logging.getLogger('beets')
|
||||
|
||||
|
|
@ -418,7 +414,6 @@ def tag_album(items, search_artist=None, search_album=None,
|
|||
- A recommendation.
|
||||
If search_artist and search_album or search_id are provided, then
|
||||
they are used as search terms in place of the current metadata.
|
||||
May raise an AutotagError if existing metadata is insufficient.
|
||||
"""
|
||||
# Get current metadata.
|
||||
cur_artist, cur_album, artist_consensus = current_metadata(items)
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ def album_info(release):
|
|||
int(medium['position']),
|
||||
int(track['position']))
|
||||
if track.get('title'):
|
||||
# Track title may be distinct from underling recording
|
||||
# Track title may be distinct from underlying recording
|
||||
# title.
|
||||
ti.title = track['title']
|
||||
ti.disctitle = disctitle
|
||||
|
|
|
|||
|
|
@ -633,11 +633,9 @@ def initial_lookup(session):
|
|||
plugins.send('import_task_start', session=session, task=task)
|
||||
|
||||
log.debug('Looking up: %s' % displayable_path(task.paths))
|
||||
try:
|
||||
task.set_candidates(*autotag.tag_album(task.items,
|
||||
config['import']['timid']))
|
||||
except autotag.AutotagError:
|
||||
task.set_null_candidates()
|
||||
task.set_candidates(
|
||||
*autotag.tag_album(task.items, config['import']['timid'].get(bool))
|
||||
)
|
||||
|
||||
def user_query(session):
|
||||
"""A coroutine for interfacing with the user about the tagging
|
||||
|
|
|
|||
|
|
@ -539,21 +539,16 @@ class TerminalImportSession(importer.ImportSession):
|
|||
elif choice is importer.action.MANUAL:
|
||||
# Try again with manual search terms.
|
||||
search_artist, search_album = manual_search(False)
|
||||
try:
|
||||
_, _, candidates, rec = \
|
||||
autotag.tag_album(task.items, search_artist,
|
||||
search_album)
|
||||
except autotag.AutotagError:
|
||||
candidates, rec = None, None
|
||||
_, _, candidates, rec = autotag.tag_album(
|
||||
task.items, search_artist, search_album
|
||||
)
|
||||
elif choice is importer.action.MANUAL_ID:
|
||||
# Try a manually-entered ID.
|
||||
search_id = manual_id(False)
|
||||
if search_id:
|
||||
try:
|
||||
_, _, candidates, rec = \
|
||||
autotag.tag_album(task.items, search_id=search_id)
|
||||
except autotag.AutotagError:
|
||||
candidates, rec = None, None
|
||||
_, _, candidates, rec = autotag.tag_album(
|
||||
task.items, search_id=search_id
|
||||
)
|
||||
else:
|
||||
# We have a candidate! Finish tagging. Here, choice is an
|
||||
# AlbumMatch object.
|
||||
|
|
@ -702,7 +697,7 @@ import_cmd.parser.add_option('-P', '--noresume', action='store_false',
|
|||
dest='resume', help="do not try to resume importing")
|
||||
import_cmd.parser.add_option('-q', '--quiet', action='store_true',
|
||||
dest='quiet', help="never prompt for input: skip albums instead")
|
||||
import_cmd.parser.add_option('-l', '--log', dest='logpath',
|
||||
import_cmd.parser.add_option('-l', '--log', dest='log',
|
||||
help='file to log untaggable albums for later review')
|
||||
import_cmd.parser.add_option('-s', '--singletons', action='store_true',
|
||||
help='import individual tracks instead of full albums')
|
||||
|
|
|
|||
|
|
@ -1,9 +1,17 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
1.1b2 (in development)
|
||||
1.1b3 (in development)
|
||||
----------------------
|
||||
|
||||
1.1b2 (February 16, 2013)
|
||||
-------------------------
|
||||
|
||||
The second beta of beets 1.1 uses the fancy new configuration infrastructure to
|
||||
add many, many new config options. The import process is more flexible;
|
||||
filenames can be customized in more detail; and more. This release also
|
||||
supports Windows Media (ASF) files and iTunes Sound Check volume normalization.
|
||||
|
||||
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
|
||||
|
|
@ -95,6 +103,7 @@ Other new stuff:
|
|||
* Fix an error when migrating the ``.beetsstate`` file on Windows.
|
||||
* A nicer error message is now given when the configuration file contains tabs.
|
||||
(YAML doesn't like tabs.)
|
||||
* Fix the ``-l`` (log path) command-line option for the ``import`` command.
|
||||
|
||||
.. _iTunes Sound Check: http://support.apple.com/kb/HT2425
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ project = u'beets'
|
|||
copyright = u'2012, Adrian Sampson'
|
||||
|
||||
version = '1.1'
|
||||
release = '1.1b2'
|
||||
release = '1.1b3'
|
||||
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ You'll want to set a few basic options before you start using beets. The
|
|||
configuration is stored in a text file: on Unix-like OSes, the config file is
|
||||
at ``~/.config/beets/config.yaml``; on Windows, it's at
|
||||
``%APPDATA%\beets\config.yaml``. Create and edit the appropriate file with your
|
||||
favorite text editor. This file will start out empty, but here's good place to
|
||||
start::
|
||||
favorite text editor. (You may need to create the enclosing directories also.)
|
||||
The file will start out empty, but here's good place to start::
|
||||
|
||||
directory: ~/music
|
||||
library: ~/data/musiclibrary.blb
|
||||
|
|
|
|||
|
|
@ -27,6 +27,10 @@ with its Python bindings) on your system.
|
|||
* On Windows, you may want to try `GStreamer WinBuilds`_ (cavet emptor: I
|
||||
haven't tried this).
|
||||
|
||||
You will also need the various GStreamer plugin packages to make everything
|
||||
work. See the :doc:`/plugins/chroma` documentation for more information on
|
||||
installing GStreamer plugins.
|
||||
|
||||
.. _MacPorts: http://www.macports.org/
|
||||
.. _GStreamer WinBuilds: http://www.gstreamer-winbuild.ylatuya.es/
|
||||
.. _Homebrew: http://mxcl.github.com/homebrew/
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ Here's an example plugin that adds a simple command::
|
|||
from beets.ui import Subcommand
|
||||
|
||||
my_super_command = Subcommand('super', help='do something super')
|
||||
def say_hi(lib, config, opts, args):
|
||||
def say_hi(lib, opts, args):
|
||||
print "Hello everybody! I'm a plugin!"
|
||||
my_super_command.func = say_hi
|
||||
|
||||
|
|
@ -78,7 +78,6 @@ myfunction``. This function should take the following parameters: ``lib`` (a
|
|||
beets ``Library`` object) and ``opts`` and ``args`` (command-line options and
|
||||
arguments as returned by `OptionParser.parse_args`_).
|
||||
|
||||
.. _ConfigParser object: http://docs.python.org/library/configparser.html
|
||||
.. _OptionParser.parse_args:
|
||||
http://docs.python.org/library/optparse.html#parsing-arguments
|
||||
|
||||
|
|
@ -121,29 +120,29 @@ currently available are:
|
|||
|
||||
* *album_imported*: called with an ``Album`` object every time the ``import``
|
||||
command finishes adding an album to the library. Parameters: ``lib``,
|
||||
``album``, ``config``
|
||||
``album``
|
||||
|
||||
* *item_imported*: called with an ``Item`` object every time the importer adds a
|
||||
singleton to the library (not called for full-album imports). Parameters:
|
||||
``lib``, ``item``, ``config``
|
||||
``lib``, ``item``
|
||||
|
||||
* *write*: called with an ``Item`` object just before a file's metadata is
|
||||
written to disk (i.e., just before the file on disk is opened).
|
||||
|
||||
* *import_task_start*: called when before an import task begins processing.
|
||||
Parameters: ``task`` and ``config``.
|
||||
Parameters: ``task`` (an `ImportTask`) and ``session`` (an `ImportSession`).
|
||||
|
||||
* *import_task_apply*: called after metadata changes have been applied in an
|
||||
import task. Parameters: ``task`` and ``config``.
|
||||
import task. Parameters: ``task`` and ``session``.
|
||||
|
||||
* *import_task_choice*: called after a decision has been made about an import
|
||||
task. This event can be used to initiate further interaction with the user.
|
||||
Use ``task.choice_flag`` to determine the action to be taken. Parameters:
|
||||
``task`` and ``config``.
|
||||
``task`` and ``session``.
|
||||
|
||||
* *import_task_files*: called after an import task finishes manipulating the
|
||||
filesystem (copying and moving files, writing metadata tags). Parameters:
|
||||
``task`` and ``config``.
|
||||
``task`` and ``session``.
|
||||
|
||||
* *library_opened*: called after beets starts up and initializes the main
|
||||
Library object. Parameter: ``lib``.
|
||||
|
|
@ -151,7 +150,8 @@ currently available are:
|
|||
* *database_change*: a modification has been made to the library database. The
|
||||
change might not be committed yet. Parameter: ``lib``.
|
||||
|
||||
* *cli_exit*: called just before the ``beet`` command-line program exits. Parameter: ``lib``.
|
||||
* *cli_exit*: called just before the ``beet`` command-line program exits.
|
||||
Parameter: ``lib``.
|
||||
|
||||
The included ``mpdupdate`` plugin provides an example use case for event listeners.
|
||||
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -42,7 +42,7 @@ if 'sdist' in sys.argv:
|
|||
shutil.copytree(os.path.join(docdir, '_build', 'man'), mandir)
|
||||
|
||||
setup(name='beets',
|
||||
version='1.1.0-beta.2',
|
||||
version='1.1.0-beta.3',
|
||||
description='music tagger and library organizer',
|
||||
author='Adrian Sampson',
|
||||
author_email='adrian@radbox.org',
|
||||
|
|
|
|||
Loading…
Reference in a new issue