Provides access to files through the use of MediaProvider components
which allows to handle different file I/O protocols using URIs. It also
handles caching in a database and the monitoring of files via the elisa.core.media_scanner.MediaScanner.
Database caching can be disabled:
|
__init__(self,
metadata_manager)
Initialize media_providers instance variable and try to load the
media_scanner. |
source code
|
|
|
media_db__get(self)
MediaDB instance accessor. |
source code
|
|
|
|
|
|
|
start(self,
seconds=0,
resume_scan=True)
Load all enabled MediaProvider components using the PluginRegistry
and eventually start the media_scanner |
source code
|
|
twisted.internet.defer.DeferredList
|
stop(self)
Stop the media_scanner if it's running and clean all registered
media_providers. |
source code
|
|
|
|
|
|
|
get_metadata(self,
metadata,
low_priority=True)
just a proxy to the metadata_manager.get_metadata |
source code
|
|
|
|
|
|
|
|
elisa.extern.db_row.DBRow
|
|
|
handle_notify_event(self,
uri,
event,
media_types) |
source code
|
|
elisa.extern.db_row.DBRow
|
get_media_information(self,
uri,
extended=True,
media_type=' frontend ' )
Fetch the media located at given uri, by retrieving its
information in the media database. |
source code
|
|
elisa.base_components.media_provider.MediaProvider
|
|
|
_proxy(self,
method_name,
fallback_result,
uri,
*args,
**kw) |
source code
|
|
|
|
|
|
twisted.internet.defer.Deferred
|
get_media_type(self,
uri)
Try to guess the maximum information from the media located at
given uri by looking at eventual file extension. |
source code
|
|
|
|
bool
|
|
|
|
twisted.internet.defer.Deferred
|
has_children_with_types(self,
uri,
media_types)
Detect whether the given uri has children for given media types
which can be one of media_provider.media_types. |
source code
|
|
|
blocking_has_children_with_types(self,
uri,
media_types) |
source code
|
|
|
|
|
blocking_get_direct_children(self,
children_with_info) |
source code
|
|
elisa.core.media_file.MediaFile
|
open(self,
uri,
mode=' r ' )
Open an uri and return MediaFile file if the block keyword
parameter is True. |
source code
|
|
|
|
elisa.core.media_uri.MediaUri
|
|
|
blocking_next_location(self,
uri,
root=' frontend ' ) |
source code
|
|
elisa.core.media_uri.MediaUri
|
|
|
|
|
monitor_uri(self,
uri,
callback,
*extra_args)
Start monitoring given uri for modification and call a function in
case of any change happening on `uri` Raises UriNotMonitorable(uri)
if uri can't be monitored |
source code
|
|
|
|
bool
|
|
bool
|
|
bool
|
copy(self,
orig_uri,
dest_uri,
recursive=True)
Copy one location to another. |
source code
|
|
bool
|
move(self,
orig_uri,
dest_uri)
Move data located at given URI to another URI. |
source code
|
|
bool
|
delete(self,
uri,
recursive=True)
Delete a resource located at given URI. |
source code
|
|
elisa.core.media_uri.MediaUri
|
|
Inherited from manager.Manager :
component_registered ,
initialize
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__
|