mutagen
mutagen copied to clipboard
ID3TimeStamp support for baddly formated input
in my personnal library, some mp3 have a TDRC frame with baddly formated values. In mutagen\id3_specs.py, in ID3TimeStamp.set_text(), all data is lost. By 'data', I mean, the input was '2013 2013' (I don't know the source of this, but I have several files tagged that way, from various sources) For my own usage, I quick-fixed this by changing the parsing:
def set_text(self, text, splitre=re.compile('[-T:/.]|\s+')):
becomes
def set_text(self, text, splitre=re.compile(r'[^\d]')):
Detected data is messy (year=2013, month=2013) but it's enough for me as I need the year only... Anyway, thank you so much for this lib, it seriously rocks !