From b4411ec877b2a82b77125ad14aaf4a1abbacfe98 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Mon, 20 May 2013 15:28:41 +0200 Subject: [PATCH] scanner: Update based on review comments. --- mopidy/models.py | 5 +++-- mopidy/scanner.py | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/mopidy/models.py b/mopidy/models.py index b5ec6a5f..fe390ddf 100644 --- a/mopidy/models.py +++ b/mopidy/models.py @@ -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): diff --git a/mopidy/scanner.py b/mopidy/scanner.py index 42c30861..7fd7b541 100644 --- a/mopidy/scanner.py +++ b/mopidy/scanner.py @@ -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()