scanner: Update based on review comments.

This commit is contained in:
Thomas Adamcik 2013-05-20 15:28:41 +02:00
parent afb46b23de
commit b4411ec877
2 changed files with 6 additions and 5 deletions

View File

@ -231,7 +231,7 @@ class Track(ImmutableObject):
:type bitrate: integer
:param musicbrainz_id: MusicBrainz ID
:type musicbrainz_id: string
:param last_modified: integer representing last modifcation time
:param last_modified: Represents last modification time
:type last_modified: integer
"""
@ -266,7 +266,8 @@ class Track(ImmutableObject):
musicbrainz_id = None
#: Integer representing when the track was last modified, exact meaning
#: depends on source of track.
#: depends on source of track. For local files this is the mtime, for other
#: backends it could be a timestamp or simply a version counter.
last_modified = 0
def __init__(self, *args, **kwargs):

View File

@ -58,8 +58,8 @@ def main():
# TODO: missing error checking and other default setup code.
audio = dummy_audio.DummyAudio()
local_backend_class = extensions['local'].get_backend_classes()
local_backend = local_backend_class[0](config, audio)
local_backend_classes = extensions['local'].get_backend_classes()
local_backend = local_backend_classes[0](config, audio)
tracks = {} # Current lib.
update = [] # Paths to rescan for updates/adds.
@ -97,7 +97,7 @@ def main():
logging.debug('Debug info for %s: %s', uri, debug)
logging.info('Scanning %d files.', len(update))
logging.info('Scanning %d new/changed files.', len(update))
scanner = Scanner(update, store, debug)
try:
scanner.start()