Skip to content

Commit

Permalink
album/artists_credit
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbannon committed Jun 27, 2023
1 parent 2e382a8 commit 37cb43a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 48 deletions.
56 changes: 12 additions & 44 deletions mediafile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2101,67 +2101,35 @@ def as_dict(self):
StorageStyle('ARTIST_CREDIT'),
ASFStorageStyle('beets/Artist Credit'),
)
artists_credits = ListMediaField(
MP3ListDescStorageStyle(desc=u'ARTISTSCREDITS'),
MP3ListDescStorageStyle(desc=u'ARTISTS_CREDITS'),
MP3ListDescStorageStyle(desc=u'ARTISTS CREDITS', read_only=True),
MP4ListStorageStyle('----:com.apple.iTunes:ARTISTSCREDITS'),
MP4ListStorageStyle('----:com.apple.iTunes:ARTISTS_CREDITS'),
MP4ListStorageStyle(
'----:com.apple.iTunes:ARTISTS CREDITS', read_only=True
),
ListStorageStyle('ARTISTSCREDITS'),
ListStorageStyle('ARTISTS_CREDITS'),
ListStorageStyle('ARTISTS CREDITS', read_only=True),
ASFStorageStyle('beets/Artists Credits'),
artists_credit = ListMediaField(
MP3ListDescStorageStyle(desc=u'ARTISTS_CREDIT'),
MP4ListStorageStyle('----:com.apple.iTunes:ARTISTS_CREDIT'),
ListStorageStyle('ARTISTS_CREDIT'),
ASFStorageStyle('beets/ArtistsCredit'),
)
artists_sort = ListMediaField(
MP3ListDescStorageStyle(desc=u'ARTISTSSORT'),
MP3ListDescStorageStyle(desc=u'ARTISTS_SORT'),
MP3ListDescStorageStyle(desc=u'ARTISTS SORT', read_only=True),
MP4ListStorageStyle('----:com.apple.iTunes:ARTISTSSORT'),
MP4ListStorageStyle('----:com.apple.iTunes:ARTISTS_SORT'),
MP4ListStorageStyle(
'----:com.apple.iTunes:ARTISTS SORT', read_only=True
),
ListStorageStyle('ARTISTSSORT'),
ListStorageStyle('ARTISTS_SORT'),
ListStorageStyle('ARTISTS SORT', read_only=True),
ASFStorageStyle('beets/Artists Sort'),
ASFStorageStyle('beets/ArtistsSort'),
)
albumartist_credit = MediaField(
MP3DescStorageStyle(u'Album Artist Credit'),
MP4StorageStyle('----:com.apple.iTunes:Album Artist Credit'),
StorageStyle('ALBUMARTIST_CREDIT'),
ASFStorageStyle('beets/Album Artist Credit'),
)
albumartists_credits = ListMediaField(
MP3ListDescStorageStyle(desc=u'ALBUMARTISTSCREDITS'),
MP3ListDescStorageStyle(desc=u'ALBUMARTISTS_CREDITS'),
MP3ListDescStorageStyle(desc=u'ALBUMARTISTS CREDITS', read_only=True),
MP4ListStorageStyle('----:com.apple.iTunes:ALBUMARTISTSCREDITS'),
MP4ListStorageStyle('----:com.apple.iTunes:ALBUMARTISTS_CREDITS'),
MP4ListStorageStyle(
'----:com.apple.iTunes:ALBUMARTISTS CREDITS', read_only=True
),
ListStorageStyle('ALBUMARTISTSCREDITS'),
ListStorageStyle('ALBUMARTISTS_CREDITS'),
ListStorageStyle('ALBUMARTISTS CREDITS', read_only=True),
ASFStorageStyle('beets/Album Artists Credits'),
albumartists_credit = ListMediaField(
MP3ListDescStorageStyle(desc=u'ALBUMARTISTS_CREDIT'),
MP4ListStorageStyle('----:com.apple.iTunes:ALBUMARTISTS_CREDIT'),
ListStorageStyle('ALBUMARTISTS_CREDIT'),
ASFStorageStyle('beets/AlbumArtistsCredit'),
)
albumartists_sort = ListMediaField(
MP3ListDescStorageStyle(desc=u'ALBUMARTISTSSORT'),
MP3ListDescStorageStyle(desc=u'ALBUMARTISTS_SORT'),
MP3ListDescStorageStyle(desc=u'ALBUMARTISTS SORT', read_only=True),
MP4ListStorageStyle('----:com.apple.iTunes:ALBUMARTISTSSORT'),
MP4ListStorageStyle('----:com.apple.iTunes:ALBUMARTISTS_SORT'),
MP4ListStorageStyle(
'----:com.apple.iTunes:ALBUMARTISTS SORT', read_only=True
),
ListStorageStyle('ALBUMARTISTSSORT'),
ListStorageStyle('ALBUMARTISTS_SORT'),
ListStorageStyle('ALBUMARTISTS SORT', read_only=True),
ASFStorageStyle('beets/Album Artists Sort'),
ASFStorageStyle('beets/AlbumArtistsSort'),
)

# Legacy album art field
Expand Down
8 changes: 4 additions & 4 deletions test/test_mediafile.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,8 @@ def _generate_tags(self, base=None):
tags[key] = 1

for key in [
'artists', 'albumartists', 'artists_credits',
'albumartists_credits', 'artists_sort', 'albumartists_sort'
'artists', 'albumartists', 'artists_credit',
'albumartists_credit', 'artists_sort', 'albumartists_sort'
]:
tags[key] = ['multival', 'test']

Expand Down Expand Up @@ -1113,8 +1113,8 @@ def test_known_fields(self):
fields.extend(
('encoder', 'images', 'genres', 'albumtype', 'artists',
'albumartists', 'url', 'mb_artistids', 'mb_albumartistids',
'albumtypes', 'catalognums', 'languages', 'artists_credits',
'artists_sort', 'albumartists_credits', 'albumartists_sort')
'albumtypes', 'catalognums', 'languages', 'artists_credit',
'artists_sort', 'albumartists_credit', 'albumartists_sort')
)
assertCountEqual(self, MediaFile.fields(), fields)

Expand Down

0 comments on commit 37cb43a

Please sign in to comment.