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:
parent
2c00655c98
commit
6842dda4cc
1 changed files with 5 additions and 3 deletions
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
|
from .image import BaseImage
|
||||||
from .base import Field, StringField
|
from .base import Field, StringField
|
||||||
from .file import ICapFile, BaseFile
|
from .file import ICapFile, BaseFile
|
||||||
|
|
||||||
|
|
@ -31,9 +32,10 @@ class BaseAudio(BaseFile):
|
||||||
"""
|
"""
|
||||||
Represent an audio file
|
Represent an audio file
|
||||||
"""
|
"""
|
||||||
duration = Field('Audio file duration', int, long, timedelta)
|
duration = Field('file duration', int, long, timedelta)
|
||||||
bitrate = Field('Audio stream bit rate un Kbps', int)
|
bitrate = Field('file bit rate in Kbps', int)
|
||||||
format = StringField('Audio stream format')
|
format = StringField('file format')
|
||||||
|
thumbnail = Field('Image associated to the file', BaseImage)
|
||||||
|
|
||||||
|
|
||||||
class ICapAudio(ICapFile):
|
class ICapAudio(ICapFile):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue