Comment 18 for bug 1542175

Revision history for this message
Michi Henning (michihenning) wrote :

Problem is caused by libtaglib. It helpfully opens the file for read-write, and it is impossible to open for read-only without jumping through unbelievable hoops :-(

Mediascanner2 has an inotify watch for IN_CLOSE_WRITE. Every time the thumbnailer made a new thumbnail, the media scanner concludes that the file has been modified. In turn, that causes a model update, which ends up re-drawing the list.

It is questionable whether re-displaying the list re-positioned at the first song is the correct behavior; it would seem more appropriate to re-display at the current view position, if possible. But that's a separate, unrelated issue.

James has modified the media scanner to check the modification time when getting an IN_CLOSE_WRITE. Opening and closing for writing doesn't update mtime unless there is an intervening call to write(2). I've verified that this fixes the problem on the phone.