I would change this to deleteItem(item.filename)

The modification to make deleteItem() accept an item or filename is an optimization that makes the code more complicated for a case that does not need to be optimized.  I'm pretty sure the filmstrip never has more than 5 elements, so iterating through the array to find the item based on its filename is cheap, and keeps the code simpler.