Class e.p.m.m.MediaScanner(ServiceProvider):

Part of elisa.plugins.media_db.media_scanner View In Hierarchy

Scan media sources extracting metadata and populating the
L{elisa.core.media_db.MediaDB}.

The MediaScanner crawls sources looking for resources from which to get
metadata. Static source locations can be specified in the configuration
file. Sources can also be added, removed and updated at runtime with
L{elisa.core.media_scanner.MediaScanner.add_source},
L{elisa.core.media_scanner.MediaScanner.remove_source} and
L{elisa.core.media_scanner.MediaScanner.update_source).

Sources are periodically rescanned to keep the
L{elisa.core.media_db.MediaDB} up to date. Monitorable sources are
automatically watched for metadata changes so they need not be rescanned.
FIXME: monitoring is not implemented currently.
Line # Kind Name Docs
100 Method initialize Initialize the component.
159 Method start Start the scanner.
176 Method stop Stop the scanner.
213 Method add_source Add a new source to the scan queue.
232 Method add_media Undocumented
235 Method remove_source Mark a source as unavailable in the database and stop monitoring it.
245 Method remove_media Undocumented
249 Method update_source Schedule a new scan of the source located at given uri.

Inherited from Component (via ServiceProvider):

Line # Kind Name Docs
85 Class PathDescriptor Undocumented
97 Class Method create Create and initialize the component.
142 Method clean Clean the component.

Inherited from Loggable (via ServiceProvider, Component):

Line # Kind Name Docs
81 Method __init__ Undocumented
def initialize(self):

Initialize the component.

This method is called by Component.create to finish the initialization of a component.
Returnsa deferred called when a component is fully initialized (type: twisted.internet.defer.Deferred )
def start(self, delayed_start=5):
Start the scanner.
Parametersdelayed_startnumber of seconds to wait before starting (type: int )
def stop(self):
Stop the scanner.
def add_source(self, source_uri, media_types=None):
Add a new source to the scan queue.
Parameterssource_uriThe location of the source (type: elisa.core.media_uri.MediaUri )
media_typesa sequence of media types to scan on this source eg: ('audio', 'image') or None (type: sequence )
Returnsdefer called when the source scan is complete (type: twisted.internet.defer.Deferred )
def add_media(self, source_uri, uri):
Undocumented
def remove_source(self, source_uri):
Mark a source as unavailable in the database and stop monitoring it.
Parameterssource_uriThe location of the source (type: elisa.core.media_uri.MediaUri )
def remove_media(self, source_uri, uri):
Undocumented
def update_source(self, source_uri):
Schedule a new scan of the source located at given uri.
Parameterssource_uriThe location of the source (type: elisa.core.media_uri.MediaUri )
Returnsdefer (type:

twisted.internet.defer.Deferred called when the

source update is complete )
API Documentation for Elisa Media Center, generated by pydoctor at 2008-09-01 20:02:12.