Merge pull request #432 from Sophist-UK/sophist_add_support_for_TKEY

Add support for key tag
This commit is contained in:
Philipp Wolfer
2015-10-15 11:54:58 +02:00
6 changed files with 16 additions and 1 deletions

View File

@@ -91,4 +91,5 @@ api_versions = [
"1.1.0",
"1.2.0",
"1.3.0",
"1.4.0",
]

View File

@@ -97,6 +97,7 @@ class ASFFile(File):
'comment:': 'Description',
'genre': 'WM/Genre',
'bpm': 'WM/BeatsPerMinute',
'key': 'WM/InitialKey',
'script': 'WM/Script',
'language': 'WM/Language',
'mood': 'WM/Mood',

View File

@@ -129,6 +129,7 @@ class ID3File(File):
'TCOM': 'composer',
'TENC': 'encodedby',
'TBPM': 'bpm',
'TKEY': 'key',
'TLAN': 'language',
'TCON': 'genre',
'TMED': 'media',
@@ -438,7 +439,7 @@ class ID3File(File):
v1 = 2
else:
v1 = 0
if config.setting['write_id3v23']:
tags.update_to_v23(join_with=config.setting['id3v23_join_with'])
tags.save(filename, v2_version=3, v1=v1)

View File

@@ -102,6 +102,7 @@ class MP4File(File):
"----:com.apple.iTunes:LANGUAGE": "language",
"----:com.apple.iTunes:ARTISTS": "artists",
"----:com.apple.iTunes:WORK": "work",
"----:com.apple.iTunes:initialkey": "key",
}
__r_freeform_tags = dict([(v, k) for k, v in __freeform_tags.iteritems()])

View File

@@ -39,6 +39,7 @@ TAG_NAMES = {
'isrc': N_('ISRC'),
'mood': N_('Mood'),
'bpm': N_('BPM'),
'key': N_('Key'),
'copyright': N_('Copyright'),
'license': N_('License'),
'composer': N_('Composer'),

View File

@@ -137,6 +137,7 @@ class FLACTest(FormatsTest):
'comment:foo': 'Foo',
'genre': 'Foo',
'bpm': '80',
'key': 'E#m',
'mood': 'Foo',
'isrc': 'Foo',
'copyright': 'Foo',
@@ -206,6 +207,7 @@ class WMATest(FormatsTest):
#'comment:foo': 'Foo',
'genre': 'Foo',
'bpm': '80',
'key': 'E#m',
'mood': 'Foo',
'isrc': 'Foo',
'copyright': 'Foo',
@@ -275,6 +277,7 @@ class MP3Test(FormatsTest):
'comment:foo': 'Foo',
'genre': 'Foo',
'bpm': '80',
'key': 'E#m',
'mood': 'Foo',
'isrc': 'Foo',
'copyright': 'Foo',
@@ -342,6 +345,7 @@ class TTATest(FormatsTest):
'comment:foo': 'Foo',
'genre': 'Foo',
'bpm': '80',
'key': 'E#m',
'mood': 'Foo',
'isrc': 'Foo',
'copyright': 'Foo',
@@ -410,6 +414,7 @@ if picard.formats.AiffFile:
'comment:foo': 'Foo',
'genre': 'Foo',
'bpm': '80',
'key': 'E#m',
'mood': 'Foo',
'isrc': 'Foo',
'copyright': 'Foo',
@@ -477,6 +482,7 @@ class OggVorbisTest(FormatsTest):
'comment:foo': 'Foo',
'genre': 'Foo',
'bpm': '80',
'key': 'E#m',
'mood': 'Foo',
'isrc': 'Foo',
'copyright': 'Foo',
@@ -545,6 +551,7 @@ class MP4Test(FormatsTest):
#'comment:foo': 'Foo',
'genre': 'Foo',
'bpm': '80',
'key': 'E#m',
'mood': 'Foo',
'isrc': 'Foo',
'copyright': 'Foo',
@@ -612,6 +619,7 @@ class WavPackTest(FormatsTest):
'comment:foo': 'Foo',
'genre': 'Foo',
'bpm': '80',
'key': 'E#m',
'mood': 'Foo',
'isrc': 'Foo',
'copyright': 'Foo',
@@ -679,6 +687,7 @@ class MusepackSV7Test(FormatsTest):
'comment:foo': 'Foo',
'genre': 'Foo',
'bpm': '80',
'key': 'E#m',
'mood': 'Foo',
'isrc': 'Foo',
'copyright': 'Foo',
@@ -746,6 +755,7 @@ class MusepackSV8Test(FormatsTest):
'comment:foo': 'Foo',
'genre': 'Foo',
'bpm': '80',
'key': 'E#m',
'mood': 'Foo',
'isrc': 'Foo',
'copyright': 'Foo',