Comment 6 for bug 602638

Revision history for this message
Andy Finch (fincha) wrote :

Additional code in thumbnail.py such as the below (indentation will probably get lost), will allow flac files to be imported properly. I haven't submitted it as a patch yet, as I wanted to spend more time testing it all out, but it seems to work.

 audio_index = self.p.get_int("audio_index")
    video_index = self.p.get_int("video_index")
    audio_property = "meta.media.%s.codec.long_name" % audio_index
    if self.p.get(audio_property):
     audio_codec = self.p.get(audio_property)
    else:
     audio_codec = ""

    video_property = "meta.media.%s.codec.long_name" % video_index
    if self.p.get(video_property):
     video_codec = self.p.get(video_property)
     print self.p.get("meta.media.colorspace")
    else:
     video_codec = ""

    if self.p.get_frame():
     frame = self.p.get_frame()
     frequency = frame.get_int("frequency")
     channels = frame.get_int("channels")

    # determine if this is an image
    is_image = False
    if self.p.get_length() == 15000 and video_index == 0 and audio_index == 0:
     # images always have exactly 15000 frames
                                is_image = True
     self.file_type = "image"