Code review comment for lp:~michihenning/thumbnailer/add-preview-image-extraction

Revision history for this message
James Henstridge (jamesh) wrote :

This looks it works by accident. A file can contain multiple images, so the code in question is iterating through them to find one that represents the cover. It stops when it hits the last image.

If there are no IMAGE tags in the file, it will ask for the 0th PREVIEW_IMAGE and generally do the right thing.

If there is a single image in the file, the first iteration of the loop will find that image, and on the second iteration it will get an error and look for PREVIEW_IMAGE at index 1. So if there is a single PREVIEW_IMAGE tag, we'll ignore it.

I think we want to iterate through all IMAGE tags and then all PREVIEW_IMAGE tags here.

review: Needs Fixing

« Back to merge proposal