Home | Trees | Indices | Help |
---|
|
|
|||
Inherited from |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
dict |
|
||
elisa.core.media_uri.MediaUri |
|
||
|
|||
bool |
|
||
twisted.internet.defer.Deferred
|
|
||
twisted.internet.defer.Deferred
|
|
||
|
|||
|
|||
twisted.internet.defer.Deferred
|
|
||
twisted.internet.defer.Deferred
|
|
||
Inherited from Inherited from Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
|||
string |
name =
Component's name |
||
Inherited from Inherited from |
|
|||
Inherited from |
|
|||
list |
scannable_uri_schemes DOCME |
||
dict mapping string to int |
supported_uri_schemes DOCME |
||
Inherited from |
|
|
Initialize various variables internal to the Component. This method is called by the plugin_registry after the component's config has been loaded. Override this method if you need to perform some initializations that would normally go in Component's constructor but can't be done there because they require access to the component's config.
|
Retrieve the URI schemes that can be scanned by the media_scanner. Since media scanning can be an heavy and long task the MediaProvider developer can choose to make the media_scanner skip URIs with scheme not appearing in returned list. By default the return value of this method corresponds to the keys of supported_uri_schemes__get return value. # FIXME: this should be documented in the class docstring as a class # variable
|
Retrieve the URI schemes supported by the provider, for each scheme there's a priority. Higher priority == 0 means the provider will always be used to read data from a given scheme. This function is called by the MediaManager to know which media provider it has to use to access a specified URI. You should return a dict containing the uri scheme (such as 'file', 'cdda', ...) and its priority between 0 to 255 (0 being the topmost priority). The prority is used by the MediaManager to know which media provider it should use in case there are more than one who support the desired uri scheme. You might have for example a component which supports more than one scheme, but the support of one of them is not very efficient compared to what it could be. In this case you could modify its priority to tell the MediaManager that another component should be used instead of it to access this scheme. example: { 'file': 0, 'smb': 10 } # FIXME: this should be documented in the class docstring as a class # variable
|
{'file_type': string (values: one of media_provider.media_types) 'mime_type': string (example: 'audio/mpeg' for .mp3 uris. can be empty string if unguessable) }'file_type' and 'mime_type' can be empty strings if it failed recognizing them.
|
|
|
|
|
|
|
|
scannable_uri_schemesDOCME
|
supported_uri_schemesDOCME
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Wed Jan 16 19:09:27 2008 | http://epydoc.sourceforge.net |