def decode(self, codec='utf8'):
        for fld in ['title', 'artist', 'medium', 'artist_sort', 'disctitle',
                    'artist_credit', 'media']:
            value = getattr(self, fld)
            if isinstance(value, bytes):
                setattr(self, fld, value.decode(codec, 'ignore'))


# Candidate distance scoring.

# Parameters for string distance function.
# Words that can be moved to the end of a string using a comma.
Ensure that all string attributes on this object are decoded
dataset/ETHPy150Open beetbox/beets/beets/autotag/hooks.py/TrackInfo.decode