mirror of
https://github.com/beetbox/beets.git
synced 2025-12-26 02:24:33 +01:00
AlbumMatch and TrackMatch types
These new named tuples will represent candidates given by the autotagging system. In the case of album matches, these are currently unwieldy, verbosely-documented tuples that will only get more unwieldy with the addition of "unmatched tracks".
This commit is contained in:
parent
98d46be4a5
commit
8d7397135f
1 changed files with 8 additions and 0 deletions
|
|
@ -14,11 +14,14 @@
|
|||
|
||||
"""Glue between metadata sources and the matching logic."""
|
||||
import logging
|
||||
from collections import namedtuple
|
||||
|
||||
from beets import plugins
|
||||
from beets.autotag import mb
|
||||
|
||||
log = logging.getLogger('beets')
|
||||
|
||||
|
||||
# Classes used to represent candidate options.
|
||||
|
||||
class AlbumInfo(object):
|
||||
|
|
@ -117,6 +120,11 @@ class TrackInfo(object):
|
|||
self.disctitle = disctitle
|
||||
self.artist_credit = artist_credit
|
||||
|
||||
AlbumMatch = namedtuple('AlbumMatch', ['distance', 'info', 'mapping',
|
||||
'extra_items', 'extra_tracks'])
|
||||
|
||||
TrackMatch = namedtuple('TrackMatch', ['distance', 'info'])
|
||||
|
||||
|
||||
# Aggregation of sources.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue