# \`update\` command behavior

**URL:** https://discourse.beets.io/t/update-command-behavior/789
**Category:** Help
**Created:** [June 5, 2019, 12:10am UTC](https://discourse.beets.io/t/update-command-behavior/789 "2019-06-05T00:10:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kergoth](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/kergoth/32/240_2.png) [@kergoth](https://discourse.beets.io/u/kergoth)
#### Post date: [June 5, 2019, 12:10am UTC](https://discourse.beets.io/t/update-command-behavior/789/1 "2019-06-05T00:10:38Z")

</div>

Greetings,

I’ve noticed some issues with the update command recently. I added a plugin which added a new mediafile tag/field for ITUNESADVISORY, but the update command refused to set it in the database for all the files in my library that have this tag set. I ended up reimporting a bunch of the files to pick it up. More recently, I noticed the musicbrainz info on some of my tracks was wrong, so I used Picard externally to correct the track ids (dup was picking up a duplicate that wasn’t really a duplicate, just a wrong mb\_trackid) and ran update, but it didn’t update the database with the new trackid. Anyone else run into anything like this? It doesn’t seem 100% consistent, so I don’t have a reproducer handy at this point. Just throwing it out there in case anyone else has run into anything like this.

Thanks, would love any input.  
-kergoth

---

<div class="post-metadata">

### Author: ![arcresu](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/arcresu/32/222_2.png) [@arcresu](https://discourse.beets.io/u/arcresu)
#### Post date: [June 5, 2019, 2:26am UTC](https://discourse.beets.io/t/update-command-behavior/789/2 "2019-06-05T02:26:08Z")

</div>

I’m not sure about this specific problem, but there has been some discussion in the past about removing the MediaFile extension feature from beets’ plugins because it’s a little fragile. I actually just updated [a planning page](https://github.com/beetbox/beets/wiki/PluginAPI#extending-mediafile) on the wiki about this yesterday using exactly this plugin of yours (found via a GitHub code search for that plugin feature) as a point against removing the feature.

I’ve seen several issues reported on GitHub where people have seen unexpected behaviour with `beet update`, but it’s really hard to know what’s going on without a specific reproducer. The problems can range from value normalisation, field name spelling/capitalisation, logic bugs in the code, etc.

---

<div class="post-metadata">

### Author: ![kergoth](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/kergoth/32/240_2.png) [@kergoth](https://discourse.beets.io/u/kergoth)
#### Post date: [June 5, 2019, 3:34pm UTC](https://discourse.beets.io/t/update-command-behavior/789/3 "2019-06-05T15:34:55Z")

</div>

Ah, fair enough, that does sound a bit messy, and injecting into the module isn’t particularly clean. I wouldn’t object to its removal. I can always submit my particular case as a pull req for consideration for mediafile itself, and if it isn’t accepted, can still make do with a db field, and set it from the tag via an external script, and possibly even automate that for new library additions via an import hook. Thanks.

I’ll let you know if I run into an update issue again in the future and will try to capture a reproducer before I work around the issue.
