Package elisa :: Package plugins :: Package bad :: Package album_art_plugin :: Module coverindir_metadata :: Class CoverInDir
[hide private]
[frames] | no frames]

Class CoverInDir

source code


This CoverInDir Metadata Provider just looks if there are might covers in the directory of the URI. If there are more than one found, it uses the best suited one.

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
 
_find_sub_string(self, data, match_list) source code
 
_search_for_cover(self, metadata) source code
 
_files_scan(self, metadata) source code
 
_elisa_db_scan(self, metadata) source code
 
_set_cover(self, metadata, cover_path) 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 = 'cover_in_dir'
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]
list list_of_extentions = ['png', 'jpg', 'xpm', 'jpeg']
a list of extentions our cover could have.
list list_of_names = ['cover', 'front', 'cd', 'dvd']
a list of good names for our cover sorted by priority.

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
Overrides: base_components.metadata_provider.MetadataProvider.get_rank
(inherited documentation)

able_to_handle(self, metadata)

source code 
Return wether this provider is able to fill in metadata, when it gets this metadata dictionary.
Returns: bool
Overrides: base_components.metadata_provider.MetadataProvider.able_to_handle
(inherited documentation)

get_metadata(self, metadata, low_priority=True)

source code 
Retrieve the metadata for this metadata request and put it in there.
Returns: twisted.internet.defer.Deferred
Overrides: base_components.metadata_provider.MetadataProvider.get_metadata
(inherited documentation)

Instance Variable Details [hide private]

list_of_names

a list of good names for our cover sorted by priority. if there is none found, which is exactly spelled this way, we'll look for one, which contains any of this names...
Type:
list
Value:
['cover', 'front', 'cd', 'dvd']