Add id3 TOPE support

This commit is contained in:
Sophist
2017-03-30 12:37:07 +01:00
parent 89ca4b15ca
commit 02002dc7ef
2 changed files with 4 additions and 2 deletions

View File

@@ -123,6 +123,7 @@ class ID3File(File):
'WCOP': 'license',
'WOAR': 'website',
'COMM': 'comment',
'TOPE': 'originalartist',
# The following are informal iTunes extensions to id3v2:
'TCMP': 'compilation',
@@ -432,7 +433,7 @@ class ID3File(File):
if frame.FrameID in ('TMCL', 'TIPL', 'IPLS'):
for people in frame.people:
if people[0] == role:
frame.people.remove(people)
frame.people.remove(people)
elif name.startswith('comment:'):
desc = name.split(':', 1)[1]
if desc.lower()[:4] != 'itun':
@@ -453,7 +454,7 @@ class ID3File(File):
if frame.FrameID in ('TIPL', 'IPLS'):
for people in frame.people:
if people[0] == role:
frame.people.remove(people)
frame.people.remove(people)
elif name == 'musicbrainz_recordingid':
for key, frame in tags.items():
if frame.FrameID == 'UFID' and frame.owner == 'http://musicbrainz.org':

View File

@@ -88,6 +88,7 @@ TAG_NAMES = {
'~rating': N_('Rating'),
'artists': N_('Artists'),
'work': N_('Work'),
'originalartist': N_('Original Artist'),
}
PRESERVED_TAGS = [