Package elisa :: Package core :: Module metadata_manager :: Class MetadataManager
[hide private]
[frames] | no frames]

Class MetadataManager

source code


This manager is responsible for media metadata parsing. It creates and handles the elisa.base_components.metadata_provider.MetadataProvider components.

Nested Classes [hide private]

Inherited from manager.Manager: __metaclass__

Instance Methods [hide private]
 
__init__(self)
Initialize the _components instance variable and the Manager as a Loggable object.
source code
 
register_component(self, provider)
Register a new Component
source code
 
unregister_component(self, provider)
Unregister a component from the Manager
source code
twisted.internet.defer.DeferredList
stop(self)
Stop clean and remove all registered components.
source code
twisted.internet.defer.Deferred
get_metadata(self, metadata, low_priority=True)
Retrieve the metadata of the media located at given URI.
source code

Inherited from manager.Manager: component_registered, initialize, start

Inherited from manager.Manager (private): _load_providers

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

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

Static Methods [hide private]

Inherited from manager.Manager: __classinit__

Class Variables [hide private]
  name = 'metadata_manager'

Inherited from extern.log.log.Loggable: logCategory

Instance Variables [hide private]

Inherited from manager.Manager (private): _components

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Initialize the _components instance variable and the Manager as a Loggable object.
Overrides: manager.Manager.__init__
(inherited documentation)

register_component(self, provider)

source code 

Register a new Component

Store a new Component in our components list. Returns the result of the operation. If the component is already registered, don't register it twice.
Overrides: manager.Manager.register_component
(inherited documentation)

unregister_component(self, provider)

source code 

Unregister a component from the Manager

Remove the Component instance from our components list if it's there. Returns the result of the operation.
Overrides: manager.Manager.unregister_component
(inherited documentation)

stop(self)

source code 
Stop clean and remove all registered components.
Returns: twisted.internet.defer.DeferredList
Overrides: manager.Manager.stop
(inherited documentation)

get_metadata(self, metadata, low_priority=True)

source code 

Retrieve the metadata of the media located at given URI.

Metadata is returned as a dictionnary mapping keys depending on the content type (example: artist, album, track for 'audio' content-type) to actual metadata values. If you do a request for metadata, the value of this has to be a None Object.
Parameters:
  • metadata (dict) - a dicitionary containing the already known metadata and empty values for the requested tags
Returns: twisted.internet.defer.Deferred