adrian-bl/vanilla — pull request #16 by kieranclancy (2012-11-16 09:25:04+00:00)
Title: Make player more robust in the event of missing files and file errors

This was primarily motivated by a bug in ICS 4.0.4 where the android media provider starts regularly duplicating entries but with empty _data fields (file name). I've seen many others complain about the issue online, and personally saw up to 3 duplicates sometimes (so, for every music file, there would be 1 working file and 3 non-working files).

This would make Vanilla unusable as it would hit a single one of these missing files (with about 75% probability) and then stop without continuing.

To begin with I had a patch to avoid pulling in any songs from the media provider without file names set. I then upgraded it to handle missing files more gracefully, skipping over them if it can.

I have tested these changes personally, and it all works as expected.