Merge remote-tracking branch 'voiceinsideyou/PICARD-27'

This commit is contained in:
Lukáš Lalinský
2012-05-22 18:55:22 +02:00
2 changed files with 2 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ Version UNRELEASED - 2012-XX-XX
* Fix $copy not preserving multi-value variables as documented (PICARD-138)
* Load/save free-text tags for ID3 as TXXX frames (PICARD-148)
* Fix writing of MusicBrainz Work Id / musicbrainz_workid to tags (PICARD-88)
* Handle mimetype for embedding cover art from EXIF jpegs (PICARD-27)
Version 0.16 - 2011-10-23
* Added AcoustID support.

View File

@@ -30,7 +30,7 @@ EXTENSION_MIME_TYPE_MAP = dict([(b, a) for a, b in MIME_TYPE_EXTENSION_MAP.items
def get_from_data(data, filename=None, default=None):
"""Tries to determine the mime type from the given data."""
if data.startswith('\xff\xd8\xff\xe0'):
if data.startswith('\xff\xd8\xff'):
return 'image/jpeg'
elif data.startswith('\x89PNG\x0d\x0a\x1a\x0a'):
return 'image/png'