__init__(self,
collection,
source,
title=u'',
description=u'',
name_format=None,
ext='ogg',
media_type=u'application/ogg',
entry_id_creator=None,
**kwargs)
(Constructor)
| source code |
Creates a member based on ID3 tags, typically audio files such a MP3 or Vorbis
Keyword arguments
collection -- parent collection
source -- fileobject of content to handle
length -- amount of data to read from source
title -- title to use for the Atom entry. If not provided
will use 'title' ID3 tag.
description -- summary to use for the Atom entry
name_format -- template to generate the member and media ids
ext -- extension to use fo the media resource
media_type -- mime type of the media resource
entry_id_creator -- function object which will return the id
to use in the atom:id element (as an unicode object)
The name format defaults takes the following values:
%A -- artist name
%d -- album name
%t -- tracknumber
%n -- track title
%Y -- year
%M -- month
%D -- day
It defaults to %A %d %n
The entry_id_creator function must takes the following parameters:
base_uri, source, artist, album, tracknumber, title, date, genres
-
- Overrides:
ID3BasedMember.__init__
- (inherited documentation)
|