add thumbnail property to BaseAudio

this can be used, for example, to associate an audio
file or stream with an image related to its author,
or an album cover

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2013-12-22 00:45:51 +01:00
commit 6842dda4cc

View file

@ -20,6 +20,7 @@
from datetime import timedelta
from .image import BaseImage
from .base import Field, StringField
from .file import ICapFile, BaseFile
@ -31,9 +32,10 @@ class BaseAudio(BaseFile):
"""
Represent an audio file
"""
duration = Field('Audio file duration', int, long, timedelta)
bitrate = Field('Audio stream bit rate un Kbps', int)
format = StringField('Audio stream format')
duration = Field('file duration', int, long, timedelta)
bitrate = Field('file bit rate in Kbps', int)
format = StringField('file format')
thumbnail = Field('Image associated to the file', BaseImage)
class ICapAudio(ICapFile):