Package amplee :: Package atompub :: Package member :: Module audio :: Class ID3BasedMember
[hide private]
[frames] | no frames]

Class ID3BasedMember

source code

 object --+        
          |        
EntryMember --+    
              |    
    MediaMember --+
                  |
                 ID3BasedMember
Known Subclasses:
FlacMember, M4AMember, MP3Member, OGGMember, WMAMember, WavPackMember

Instance Methods [hide private]
  __init__(self, collection, source, audio, ext, media_type, title=u'', description=u'', name_format='%A %d %n', entry_id_creator=None, **kwargs)
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.
  _get_infos(self, audio)

Inherited from EntryMember (private): _delentry, _getentry, _setentry

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Properties [hide private]

Inherited from MediaMember: content

Inherited from EntryMember: atom

Inherited from object: __class__


Method Details [hide private]

__init__(self, collection, source, audio, ext, media_type, title=u'', description=u'', name_format='%A %d %n', 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: MediaMember.__init__

_get_infos(self, audio)

source code 
None