Open wyqydsyq opened 10 years ago
I've had the best results by wrapping the entire call to ID3Frame.parse in an exception handler, as there seem to be a handful of assumptions in there that don't hold for all files I've encountered. You can ignore frames that fail to parse and still process the rest of the file.
I came here to propose the exact same change. Catching the exception here avoids unnecessarily failing the whole process due to one small problem in the tag. I agree that there may ultimately be a better place or additional places to put such a change, though.
Wrapping this
if
clause in atry...catch
seems to alleviate the issue found in https://github.com/43081j/id3/issues/10 and possibly https://github.com/43081j/id3/issues/9There seems to be no real negative impact in simply ignoring any exceptions generated by the tried code, the resulting
tags
seems to be completely fine, though a more graceful method of handling the exception should probably be implemented.