Home | Trees | Indices | Help |
---|
|
Medias are all accessible using URIs. MediaProvider components are responsible to support one or many URI schemes.
MediaProviders are able to parse media trees of supported URI(s) scheme(s), they can also provide limited information about parsed files and directories.
MediaProviders can optionnally monitor media locations and notify registered components of data updates (new/updated/deleted files/directories).
TODO:
|
|||
Inherited from |
|
|||
|
|||
|
|||
elisa.core.media_uri.MediaUri |
|
||
twisted.internet.defer.Deferred
|
|
||
dict |
|
||
twisted.internet.defer.Deferred
|
|
||
bool |
|
||
twisted.internet.defer.Deferred
|
|
||
bool |
|
||
twisted.internet.defer.Deferred
|
|
||
list |
|
||
twisted.internet.defer.Deferred
|
|
||
elisa.core.media_file.MediaFile |
|
||
twisted.internet.defer.Deferred
|
|
||
|
|||
twisted.internet.defer.Deferred
|
|
||
|
|||
twisted.internet.defer.Deferred
|
|
||
string |
|
||
twisted.internet.defer.Deferred
|
|
||
elisa.core.media_uri.MediaUri |
|
||
twisted.internet.defer.Deferred
|
|
||
elisa.core.media_uri.MediaUri |
|
||
|
|||
|
|||
bool |
|
||
bool |
|
||
twisted.internet.defer.Deferred
|
|
||
twisted.internet.defer.Deferred
|
|
||
twisted.internet.defer.Deferred
|
|
||
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 |
|
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 |
|
blocking_get_media_type but without
blocking (in theory). This method by default triggers a succeeded
callback on a Twisted deferred, using blocking_get_media_type result.
|
{'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.
|
|
|
|
|
|
Scan the data located at given uri and return informations about its children. Fills children_with_info. Typemap of filled result:[ (uri : media_uri.MediaUri, additional info: dict), ... ]If you supply additional info, they should be stored in a elisa.core.observers.dict.DictObservable instead of a normal dictionnary. Valid keys: ['default_image', 'artist', 'album', 'song', 'song_artist', 'song_album']
|
Note: It's not allowed to open directories, it's up to the developer to check that the URI to open doesn't represent a directory. |
Note: It's not allowed to open directories, it's up to the developer to check that the URI to open doesn't represent a directory. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scannable_uri_schemesDOCME
|
supported_uri_schemesDOCME
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Wed Jan 16 19:08:38 2008 | http://epydoc.sourceforge.net |