a few more fields for Monkey's Audio support

This commit is contained in:
Adrian Sampson 2010-06-26 02:24:48 -07:00
parent f7cdf60c53
commit 3e23b412f4
3 changed files with 5 additions and 1 deletions

View file

@ -434,6 +434,8 @@ class MediaFile(object):
self.type = 'flac'
elif type(self.mgfile).__name__ == 'OggVorbis':
self.type = 'ogg'
elif type(self.mgfile).__name__ == 'MonkeysAudio':
self.type = 'ape'
else:
raise FileTypeError('file type %s unsupported by MediaFile' %
type(self.mgfile).__name__)
@ -520,7 +522,8 @@ class MediaFile(object):
mp4 = StorageStyle('trkn',
packing = packing.TUPLE,
pack_pos = 0),
etc = StorageStyle('tracknumber')
etc = [StorageStyle('track'),
StorageStyle('tracknumber')]
)
tracktotal = MediaField(out_type = int,
mp3 = StorageStyle('TRCK',

BIN
test/rsrc/full.ape Normal file

Binary file not shown.

View file

@ -267,6 +267,7 @@ test_files = {
'mp3': ['full', 'partial', 'min'],
'flac': ['full', 'partial', 'min'],
'ogg': ['full'],
'ape': ['full'],
}
def suite():