acoustid ID and fingerprint stored/tracked (#332)

This commit is contained in:
Adrian Sampson 2012-04-01 18:22:42 -07:00
parent aeeb040fe4
commit de6530f4a5
4 changed files with 55 additions and 31 deletions

View file

@ -41,32 +41,34 @@ ITEM_FIELDS = [
('path', 'blob', False, False),
('album_id', 'int', False, False),
('title', 'text', True, True),
('artist', 'text', True, True),
('artist_sort', 'text', True, True),
('album', 'text', True, True),
('albumartist', 'text', True, True),
('albumartist_sort', 'text', True, True),
('genre', 'text', True, True),
('composer', 'text', True, True),
('grouping', 'text', True, True),
('year', 'int', True, True),
('month', 'int', True, True),
('day', 'int', True, True),
('track', 'int', True, True),
('tracktotal', 'int', True, True),
('disc', 'int', True, True),
('disctotal', 'int', True, True),
('lyrics', 'text', True, True),
('comments', 'text', True, True),
('bpm', 'int', True, True),
('comp', 'bool', True, True),
('mb_trackid', 'text', True, True),
('mb_albumid', 'text', True, True),
('mb_artistid', 'text', True, True),
('mb_albumartistid', 'text', True, True),
('albumtype', 'text', True, True),
('label', 'text', True, True),
('title', 'text', True, True),
('artist', 'text', True, True),
('artist_sort', 'text', True, True),
('album', 'text', True, True),
('albumartist', 'text', True, True),
('albumartist_sort', 'text', True, True),
('genre', 'text', True, True),
('composer', 'text', True, True),
('grouping', 'text', True, True),
('year', 'int', True, True),
('month', 'int', True, True),
('day', 'int', True, True),
('track', 'int', True, True),
('tracktotal', 'int', True, True),
('disc', 'int', True, True),
('disctotal', 'int', True, True),
('lyrics', 'text', True, True),
('comments', 'text', True, True),
('bpm', 'int', True, True),
('comp', 'bool', True, True),
('mb_trackid', 'text', True, True),
('mb_albumid', 'text', True, True),
('mb_artistid', 'text', True, True),
('mb_albumartistid', 'text', True, True),
('albumtype', 'text', True, True),
('label', 'text', True, True),
('acoustid_fingerprint', 'text', True, True),
('acoustid_id', 'text', True, True),
('length', 'real', False, True),
('bitrate', 'int', False, True),

View file

@ -932,6 +932,24 @@ class MediaFile(object):
etc = StorageStyle('musicbrainz_albumartistid')
)
# Acoustid fields.
acoustid_fingerprint = MediaField(
mp3 = StorageStyle('TXXX',
id3_desc=u'Acoustid Fingerprint'),
mp4 = StorageStyle(
'----:com.apple.iTunes:Acoustid Fingerprint',
as_type=str),
etc = StorageStyle('ACOUSTID_FINGERPRINT')
)
acoustid_id = MediaField(
mp3 = StorageStyle('TXXX',
id3_desc=u'Acoustid Id'),
mp4 = StorageStyle(
'----:com.apple.iTunes:Acoustid Id',
as_type=str),
etc = StorageStyle('ACOUSTID_ID')
)
# ReplayGain fields.
rg_track_gain = FloatValueField(2, 'dB',
mp3 = StorageStyle('TXXX',

View file

@ -148,9 +148,11 @@ Audio information:
* bitdepth (only available for some formats)
* samplerate (in kilohertz, with units: e.g., "48kHz")
MusicBrainz IDs:
MusicBrainz and fingerprint information:
* mb_trackid
* mb_albumid
* mb_artistid
* mb_albumartistid
* acoustid_fingerprint
* acoustid_id

View file

@ -223,10 +223,12 @@ correct_dicts = {
'label': u'',
# Additional, non-iTunes fields.
'albumartist': u'',
'mb_albumartistid': u'',
'artist_sort': u'',
'albumartist_sort': u'',
'albumartist': u'',
'mb_albumartistid': u'',
'artist_sort': u'',
'albumartist_sort': u'',
'acoustid_fingerprint': u'',
'acoustid_id': u'',
},
# Full release date.