sampsyo/beets — pull request #614 by asutherland (2014-03-16 19:55:55+00:00)
Title: Return 0 dates instead of throwing on bad dates.

At some point in my naive life I managed to tag a flac file with a "date" of "Oct 3, 1995". This got into beets through an import done using beets 1.0.0b13 because of bad git hygiene/dumbness on my part; I'm not sure this is something you could do today.

Then when I went to run "beet replaygain" during tag write-back or something like that, _get_date_tuple got called and exploded because int() does not like the above string.

I've provided a unit test case that fails without the fix and passes with it. Since I believe that test class gets run for all file variants and the logic fix does not vary, I'm not sure that's the right place to have the test. It's also possible this is not something you want coverage for.

Please let me know if you want any changes made.