Package elisa :: Package base_components :: Module metadata_provider :: Class MetadataProvider
[hide private]
[frames] | no frames]

Class MetadataProvider

source code


Metadata (ID3 tags, EXIF information, ...) can be extracted from medias using different ways. This base component is meant to provide the developer some nice ways to extend Elisa's metadata parsing framework.

All MetadataProviders are handled by the elisa.core.metadata_manager.MetadataManager manager.

A MetadataProvider must be able to : TODO:

Nested Classes [hide private]

Inherited from core.component.Component: __metaclass__

Instance Methods [hide private]
integer
get_rank(self)
Rank determining wether the parser should be prioritized.
source code
bool
able_to_handle(self, metadata)
Return wether this provider is able to fill in metadata, when it gets this metadata dictionary.
source code
twisted.internet.defer.Deferred
get_metadata(self, metadata, low_priority=True)
Retrieve the metadata for this metadata request and put it in there.
source code

Inherited from core.component.Component: __init__, clean, initialize, load_config, save_config

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 core.component.Component: __classinit__

Class Variables [hide private]
string name = 'metadata_provider'
Component's name

Inherited from core.component.Component: checked, config_doc, default_config, id, plugin

Inherited from extern.log.log.Loggable: logCategory

Instance Variables [hide private]

Inherited from core.component.Component: config, path

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

get_rank(self)

source code 
Rank determining wether the parser should be prioritized.
Returns: integer
the rank as integer between 0 and 255

To Do: We need a better System here so that the developers can decide which one to use

able_to_handle(self, metadata)

source code 
Return wether this provider is able to fill in metadata, when it gets this metadata dictionary.
Parameters:
  • metadata (dict) - a dictionary containing all known and requested metadata
Returns: bool

get_metadata(self, metadata, low_priority=True)

source code 
Retrieve the metadata for this metadata request and put it in there.
Parameters:
  • metadata (dict) - a dictionary containing all the known and requested metadata, which is also filled with the new data
Returns: twisted.internet.defer.Deferred

To Do: determine all the keys returned for each content-type.