- tag = E3.Tag()
- tag.link(path)
- tag.setTextEncoding(E3.UTF_8_ENCODING)
- try:
- tag.update(E3.ID3_V1_1)
- except (UnicodeEncodeError, E3.tag.GenreException):
- pass
+ f = E3.load(path)
+ if f is None: return
+ t = f.tag
+ if t is None: return
+ for v in [E3.id3.ID3_V2_3, E3.id3.ID3_V1]:
+ try: f.tag.save(version = v)
+ except (UnicodeEncodeError,
+ E3.id3.GenreException,
+ E3.id3.TagException):
+ pass