25 Feb 2015
Reflections on my Progress
I think we’re making good progress as a team so far. According to our timeline, our next milestone is February 26 where we hoped to “Have at least two issues solved at this point OR begin work on feature.”
After our meeting last Friday, February 21, we made the decision to not work on a feature. The feature/enhancement we were considering was dynamic playlist, which would’ve been extremely interesting but also quite difficult. We came to the conclusion that it would be in our best interest to work on several bugs or smaller enhancements.
I’m not sure what our progress is on our latest issue, but Cameron opened up an issue #994 to improve the documentation regarding OSX contribution (specifically directions on installing from source with OSX).
Given that they have not commented on the issue yet I’m not sure when this will be completed. We might just go ahead and make the changes and submit a pull request so that we can move on.
Looking Ahead
For our first issue involving the code base we’re looking at #910, a request to add the option to “rescan” files. We’ve identified some of the areas in the code we need to look at for reference, and are trying to get a few more pointers to identify what exactly they’re looking for.
In mopidy/local/commands.py
there are two functions that we essentially want to combine to create a rescan command.
class ClearCommand(commands.Command)
and
class ScanCommand(commands.Command)
We believe that the rescan options needs to add files regardless if they were modified recently or not. It should look through every file and essentially do the same as an initial command (called with ScanCommand
). As such, we’ve identified this code as something that could be changed:
for track in library.begin():
abspath = translator.local_track_uri_to_path
(track.uri, media_dir)
mtime = file_mtimes.get(abspath)
if mtime is None:
logger.debug('Missing file %s', track.uri)
uris_to_remove.add(track.uri)
elif mtime > track.last_modified:
uris_to_update.add(track.uri)
uris_in_library.add(track.uri)
Specifically changing:
elif mtime > track.last_modified:
to:
elif mtime >= track.last_modified:
would force scanning of files even if they’ve not been recently modified.
Once we get the OSX documentation issue completed we’ll likely focus our efforts as a group on this code, testing it and discussing our changes with the core developers.
Update (2/26)
We’ve already got a pull request up for the above issue. We solved it by adding a --force
argument and putting a simple boolean check to the elif
so that uris_to_update.add(track.uri)
will be called if the argument is present.
self.add_argument('--force',
action='store_true',dest='force',default=False,
help='Forces the scanner to re-scan all media files')
elif mtime > track.last_modified or args.force:
Interview
Lastly we’re still planning an interview with Jodal, the project creator. We’ve got a list of questions here and are planning our interview for mid-march.
Laura Barber at 12:53PM