Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
packing=packing.DATE, pack_pos=2),
etc = StorageStyle('ORIGINALDATE', packing=packing.DATE, pack_pos=2),
asf = StorageStyle('WM/OriginalReleaseYear', packing=packing.DATE,
pack_pos=2),
)
original_date = CompositeDateField(original_year, original_month,
original_day)
# Nonstandard metadata.
artist_credit = MediaField(
mp3 = StorageStyle('TXXX', id3_desc=u'Artist Credit'),
mp4 = StorageStyle("----:com.apple.iTunes:Artist Credit"),
etc = StorageStyle('ARTIST_CREDIT'),
asf = StorageStyle('beets/Artist Credit'),
)
albumartist_credit = MediaField(
mp3 = StorageStyle('TXXX', id3_desc=u'Album Artist Credit'),
mp4 = StorageStyle("----:com.apple.iTunes:Album Artist Credit"),
etc = StorageStyle('ALBUMARTIST_CREDIT'),
asf = StorageStyle('beets/Album Artist Credit'),
)
# Album art.
art = ImageField()
# MusicBrainz IDs.
mb_trackid = MediaField(
mp3 = StorageStyle('UFID:http://musicbrainz.org',
list_elem = False,
id3_frame_field = 'data'),
mp4 = StorageStyle('----:com.apple.iTunes:MusicBrainz Track Id',
as_type=str),
MP4TupleStorageStyle('trkn', index=0),
StorageStyle('TRACK'),
StorageStyle('TRACKNUMBER'),
ASFStorageStyle('WM/TrackNumber'),
out_type=int,
)
tracktotal = MediaField(
MP3SlashPackStorageStyle('TRCK', pack_pos=1),
MP4TupleStorageStyle('trkn', index=1),
StorageStyle('TRACKTOTAL'),
StorageStyle('TRACKC'),
StorageStyle('TOTALTRACKS'),
ASFStorageStyle('TotalTracks'),
out_type=int,
)
disc = MediaField(
MP3SlashPackStorageStyle('TPOS', pack_pos=0),
MP4TupleStorageStyle('disk', index=0),
StorageStyle('DISC'),
StorageStyle('DISCNUMBER'),
ASFStorageStyle('WM/PartOfSet'),
out_type=int,
)
disctotal = MediaField(
MP3SlashPackStorageStyle('TPOS', pack_pos=1),
MP4TupleStorageStyle('disk', index=1),
StorageStyle('DISCTOTAL'),
StorageStyle('DISCC'),
StorageStyle('TOTALDISCS'),
ASFStorageStyle('TotalDiscs'),
out_type=int,
)
images = ImageListField()
# MusicBrainz IDs.
mb_trackid = MediaField(
MP3UFIDStorageStyle(owner='http://musicbrainz.org'),
MP4StorageStyle('----:com.apple.iTunes:MusicBrainz Track Id'),
StorageStyle('MUSICBRAINZ_TRACKID'),
ASFStorageStyle('MusicBrainz/Track Id'),
)
mb_releasetrackid = MediaField(
MP3DescStorageStyle(u'MusicBrainz Release Track Id'),
MP4StorageStyle('----:com.apple.iTunes:MusicBrainz Release Track Id'),
StorageStyle('MUSICBRAINZ_RELEASETRACKID'),
ASFStorageStyle('MusicBrainz/Release Track Id'),
)
mb_workid = MediaField(
MP3DescStorageStyle(u'MusicBrainz Work Id'),
MP4StorageStyle('----:com.apple.iTunes:MusicBrainz Work Id'),
StorageStyle('MUSICBRAINZ_WORKID'),
ASFStorageStyle('MusicBrainz/Work Id'),
)
mb_albumid = MediaField(
MP3DescStorageStyle(u'MusicBrainz Album Id'),
MP4StorageStyle('----:com.apple.iTunes:MusicBrainz Album Id'),
StorageStyle('MUSICBRAINZ_ALBUMID'),
ASFStorageStyle('MusicBrainz/Album Id'),
)
mb_artistid = MediaField(
MP3DescStorageStyle(u'MusicBrainz Artist Id'),
MP4StorageStyle('----:com.apple.iTunes:MusicBrainz Artist Id'),
StorageStyle('MUSICBRAINZ_ARTISTID'),
ASFStorageStyle('MusicBrainz/Artist Id'),
mb_artistid = MediaField(
mp3 = StorageStyle('TXXX', id3_desc=u'MusicBrainz Artist Id'),
mp4 = StorageStyle('----:com.apple.iTunes:MusicBrainz Artist Id',
as_type=str),
etc = StorageStyle('MUSICBRAINZ_ARTISTID'),
asf = StorageStyle('MusicBrainz/Artist Id'),
)
mb_albumartistid = MediaField(
mp3 = StorageStyle('TXXX',
id3_desc=u'MusicBrainz Album Artist Id'),
mp4 = StorageStyle('----:com.apple.iTunes:MusicBrainz Album Artist Id',
as_type=str),
etc = StorageStyle('MUSICBRAINZ_ALBUMARTISTID'),
asf = StorageStyle('MusicBrainz/Album Artist Id'),
)
mb_releasegroupid = MediaField(
mp3 = StorageStyle('TXXX',
id3_desc=u'MusicBrainz Release Group Id'),
mp4 = StorageStyle('----:com.apple.iTunes:MusicBrainz Release Group Id',
as_type=str),
etc = StorageStyle('MUSICBRAINZ_RELEASEGROUPID'),
asf = StorageStyle('MusicBrainz/Release Group Id'),
)
# 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'),
asf = StorageStyle('Acoustid/Fingerprint'),
# This tag mapping was invented for beets (not used by Picard, etc).
mp3 = StorageStyle('TXXX', id3_desc=u'MusicBrainz Album Comment'),
mp4 = StorageStyle("----:com.apple.iTunes:MusicBrainz Album Comment"),
etc = StorageStyle('MUSICBRAINZ_ALBUMCOMMENT'),
asf = StorageStyle('MusicBrainz/Album Comment'),
)
# Release date.
year = MediaField(out_type=int,
mp3 = StorageStyle('TDRC', packing=packing.DATE, pack_pos=0),
mp4 = StorageStyle("\xa9day", packing=packing.DATE, pack_pos=0),
etc = [StorageStyle('DATE', packing=packing.DATE, pack_pos=0),
StorageStyle('YEAR')],
asf = StorageStyle('WM/Year', packing=packing.DATE, pack_pos=0),
)
month = MediaField(out_type=int,
mp3 = StorageStyle('TDRC', packing=packing.DATE, pack_pos=1),
mp4 = StorageStyle("\xa9day", packing=packing.DATE, pack_pos=1),
etc = StorageStyle('DATE', packing=packing.DATE, pack_pos=1),
asf = StorageStyle('WM/Year', packing=packing.DATE, pack_pos=1),
)
day = MediaField(out_type=int,
mp3 = StorageStyle('TDRC', packing=packing.DATE, pack_pos=2),
mp4 = StorageStyle("\xa9day", packing=packing.DATE, pack_pos=2),
etc = StorageStyle('DATE', packing=packing.DATE, pack_pos=2),
asf = StorageStyle('WM/Year', packing=packing.DATE, pack_pos=2),
)
date = CompositeDateField(year, month, day)
# *Original* release date.
original_year = MediaField(out_type=int,
mp3 = StorageStyle('TDOR', packing=packing.DATE, pack_pos=0),
ASFStorageStyle('WM/Composer'),
)
composer_sort = MediaField(
MP3StorageStyle('TSOC'),
MP4StorageStyle('soco'),
StorageStyle('COMPOSERSORT'),
ASFStorageStyle('WM/Composersortorder'),
)
arranger = MediaField(
MP3PeopleStorageStyle('TIPL', involvement='arranger'),
MP4StorageStyle('----:com.apple.iTunes:Arranger'),
StorageStyle('ARRANGER'),
ASFStorageStyle('beets/Arranger'),
)
grouping = MediaField(
MP3StorageStyle('TIT1'),
MP4StorageStyle('\xa9grp'),
StorageStyle('GROUPING'),
ASFStorageStyle('WM/ContentGroupDescription'),
)
track = MediaField(
MP3SlashPackStorageStyle('TRCK', pack_pos=0),
MP4TupleStorageStyle('trkn', index=0),
StorageStyle('TRACK'),
StorageStyle('TRACKNUMBER'),
ASFStorageStyle('WM/TrackNumber'),
out_type=int,
)
tracktotal = MediaField(
MP3SlashPackStorageStyle('TRCK', pack_pos=1),
MP4TupleStorageStyle('trkn', index=1),
mp3 = StorageStyle('TDOR', packing=packing.DATE, pack_pos=0),
mp4 = StorageStyle('----:com.apple.iTunes:ORIGINAL YEAR',
packing=packing.DATE, pack_pos=0),
etc = StorageStyle('ORIGINALDATE', packing=packing.DATE, pack_pos=0),
asf = StorageStyle('WM/OriginalReleaseYear', packing=packing.DATE,
pack_pos=0),
)
original_month = MediaField(out_type=int,
mp3 = StorageStyle('TDOR', packing=packing.DATE, pack_pos=1),
mp4 = StorageStyle('----:com.apple.iTunes:ORIGINAL YEAR',
packing=packing.DATE, pack_pos=1),
etc = StorageStyle('ORIGINALDATE', packing=packing.DATE, pack_pos=1),
asf = StorageStyle('WM/OriginalReleaseYear', packing=packing.DATE,
pack_pos=1),
)
original_day = MediaField(out_type=int,
mp3 = StorageStyle('TDOR', packing=packing.DATE, pack_pos=2),
mp4 = StorageStyle('----:com.apple.iTunes:ORIGINAL YEAR',
packing=packing.DATE, pack_pos=2),
etc = StorageStyle('ORIGINALDATE', packing=packing.DATE, pack_pos=2),
asf = StorageStyle('WM/OriginalReleaseYear', packing=packing.DATE,
pack_pos=2),
)
original_date = CompositeDateField(original_year, original_month,
original_day)
# Nonstandard metadata.
artist_credit = MediaField(
mp3 = StorageStyle('TXXX', id3_desc=u'Artist Credit'),
mp4 = StorageStyle("----:com.apple.iTunes:Artist Credit"),
etc = StorageStyle('ARTIST_CREDIT'),
asf = StorageStyle('beets/Artist Credit'),
asf = StorageStyle('WM/IsCompilation', as_type=bool),
)
albumartist = MediaField(
mp3 = StorageStyle('TPE2'),
mp4 = StorageStyle('aART'),
etc = [StorageStyle('ALBUM ARTIST'),
StorageStyle('ALBUMARTIST')],
asf = StorageStyle('WM/AlbumArtist'),
)
albumtype = MediaField(
mp3 = StorageStyle('TXXX', id3_desc=u'MusicBrainz Album Type'),
mp4 = StorageStyle('----:com.apple.iTunes:MusicBrainz Album Type'),
etc = StorageStyle('MUSICBRAINZ_ALBUMTYPE'),
asf = StorageStyle('MusicBrainz/Album Type'),
)
label = MediaField(
mp3 = StorageStyle('TPUB'),
mp4 = [StorageStyle('----:com.apple.iTunes:Label'),
StorageStyle('----:com.apple.iTunes:publisher')],
etc = [StorageStyle('LABEL'),
StorageStyle('PUBLISHER')], # Traktor
asf = StorageStyle('WM/Publisher'),
)
artist_sort = MediaField(
mp3 = StorageStyle('TSOP'),
mp4 = StorageStyle("soar"),
etc = StorageStyle('ARTISTSORT'),
asf = StorageStyle('WM/ArtistSortOrder'),
)
albumartist_sort = MediaField(
mp3 = StorageStyle('TXXX', id3_desc=u'ALBUMARTISTSORT'),
mp4 = StorageStyle("soaa"),
)
# Legacy album art field
art = CoverArtField()
# Image list
images = ImageListField()
# MusicBrainz IDs.
mb_trackid = MediaField(
MP3UFIDStorageStyle(owner='http://musicbrainz.org'),
MP4StorageStyle('----:com.apple.iTunes:MusicBrainz Track Id'),
StorageStyle('MUSICBRAINZ_TRACKID'),
ASFStorageStyle('MusicBrainz/Track Id'),
)
mb_releasetrackid = MediaField(
MP3DescStorageStyle(u'MusicBrainz Release Track Id'),
MP4StorageStyle('----:com.apple.iTunes:MusicBrainz Release Track Id'),
StorageStyle('MUSICBRAINZ_RELEASETRACKID'),
ASFStorageStyle('MusicBrainz/Release Track Id'),
)
mb_workid = MediaField(
MP3DescStorageStyle(u'MusicBrainz Work Id'),
MP4StorageStyle('----:com.apple.iTunes:MusicBrainz Work Id'),
StorageStyle('MUSICBRAINZ_WORKID'),
ASFStorageStyle('MusicBrainz/Work Id'),
)
mb_albumid = MediaField(
MP3DescStorageStyle(u'MusicBrainz Album Id'),
MP4StorageStyle('----:com.apple.iTunes:MusicBrainz Album Id'),
StorageStyle('MUSICBRAINZ_ALBUMID'),
ASFStorageStyle('MusicBrainz/Album Id'),
track = MediaField(out_type=int,
mp3 = StorageStyle('TRCK', packing=packing.SLASHED, pack_pos=0),
mp4 = StorageStyle('trkn', packing=packing.TUPLE, pack_pos=0),
etc = [StorageStyle('TRACK'),
StorageStyle('TRACKNUMBER')],
asf = StorageStyle('WM/TrackNumber'),
)
tracktotal = MediaField(out_type=int,
mp3 = StorageStyle('TRCK', packing=packing.SLASHED, pack_pos=1),
mp4 = StorageStyle('trkn', packing=packing.TUPLE, pack_pos=1),
etc = [StorageStyle('TRACKTOTAL'),
StorageStyle('TRACKC'),
StorageStyle('TOTALTRACKS')],
asf = StorageStyle('TotalTracks'),
)
disc = MediaField(out_type=int,
mp3 = StorageStyle('TPOS', packing=packing.SLASHED, pack_pos=0),
mp4 = StorageStyle('disk', packing=packing.TUPLE, pack_pos=0),
etc = [StorageStyle('DISC'),
StorageStyle('DISCNUMBER')],
asf = StorageStyle('WM/PartOfSet'),
)
disctotal = MediaField(out_type=int,
mp3 = StorageStyle('TPOS', packing=packing.SLASHED, pack_pos=1),
mp4 = StorageStyle('disk', packing=packing.TUPLE, pack_pos=1),
etc = [StorageStyle('DISCTOTAL'),
StorageStyle('DISCC'),
StorageStyle('TOTALDISCS')],
asf = StorageStyle('TotalDiscs'),
)
lyrics = MediaField(
mp3 = StorageStyle('USLT', list_elem=False, id3_desc=u''),