Fix removal of suffixes for values that have them

This commit is contained in:
Dave Hayes 2013-02-13 09:59:58 -06:00
parent 3be24110d7
commit 55c68536c2

View file

@ -547,7 +547,7 @@ class MediaField(object):
# Remove suffix.
if style.suffix and isinstance(out, (str, unicode)):
if out.endswith(style.suffix):
out = out[:len(style.suffix)]
out = out[:-len(style.suffix)]
# MPEG-4 freeform frames are (should be?) encoded as UTF-8.
if obj.type == 'mp4' and style.key.startswith('----:') and \