mozilla-b2g/gaia — pull request #4826 by davidflanagan (2012-09-17 20:03:44+00:00)
Title: Mediadb2

This pull request includes two things:

1) A major refactor of MediaDB to handle file change notifications from DeviceStorage and to improve scanning performance. Additionally, the documentation is more complete and there are unit tests. (Botio can't run the tests because they use DeviceStorage, but the tests do pass when run on the desktop).

2) The conversion of Gallery to use the new version of MediaDB. The most visible part of this change is that Gallery no longer scans for photos every time it becomes visible. It does scan when you first launch it, but now displays an indeterminate progress bar at the top of the screen and you can use the app while it scans.

The new version of MediaDB is in shared/js/mediadb.js. The old version is shared/js/media_db.js. Once Music and Video are converted to use the new version, we can delete that old version of the library.