sampsyo/beets — pull request #608 by geigerzaehler (2014-03-13 14:20:30+00:00)
Title: Write tags only when changed

This was previously discussed in #527 and some questions came up.

> Unintentionally capturing modifications to other fields, such as when mgfile is assigned

It’s better to be on the safe side and perform unnecessary writes instead of missing necessary ones. Also
`mgfile` should never ever be changed.

> Missing changes when doing other kinds of modifications, like the delete operation used by the scrub plugin

`delete` is handled [here](https://github.com/geigerzaehler/beets/commit/b16eb61eb7232727646944ac2514db9976ec328f#diff-9f32ae8136422d861cc3215f657f1e1cR1219) and tested [here](https://github.com/geigerzaehler/beets/commit/b16eb61eb7232727646944ac2514db9976ec328f#diff-19d66b8d5e80f862f273212a6a1698e2R199)

> The potential inefficiency of reading each field twice on each write, especially for images

Files are not read twice since all tags are cached when the `mgfile` is created.