# Difference between update and mbsync

**URL:** https://discourse.beets.io/t/difference-between-update-and-mbsync/303
**Category:** Help
**Created:** [March 7, 2018, 4:02pm UTC](https://discourse.beets.io/t/difference-between-update-and-mbsync/303 "2018-03-07T16:02:21Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![dosoe](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dosoe](https://discourse.beets.io/u/dosoe)
#### Post date: [March 7, 2018, 4:02pm UTC](https://discourse.beets.io/t/difference-between-update-and-mbsync/303/1 "2018-03-07T16:02:21Z")

</div>

Hi!  
I’m wondering: what is the difference between `update` and `mbsync`? I have a music collection that is tagged uniquely using musicbrainz (as far as I know) but if I run `beet up` and `beet mbsync` after one another they find discrepancies.  
As an example, this track was tagged with `beet up` and then with `beet mbsync`, that’s what `mbsync` modified:  
Isaac Albéniz - Albéniz: Iberia / Granados: Goyescas - Iberia Suite, B. 47: V. Almería  
albumstatus: official -\> Official  
original\_day: 00 -\> 15  
composer: Albeniz (1860-1909) -\> Isaac Albéniz  
tracktotal: 10 -\> 19  
albumartist\_credit: -\> Albéniz, Granados; Alicia de Larrocha  
original\_month: 00 -\> 01  
composer\_sort: -\> Albéniz, Isaac  
original\_year: 0000 -\> 1996  
language: -\> spa  
work: -\> Iberia, B. 47: Book II: II. Almería  
label: -\> Decca Classics  
albumtype: album -\> compilation  
artist\_credit: -\> Isaac Albéniz  
I don’t specify any source for the musicdata and I don’t use any plugin for discogs or similar, what is happening?  
Regards,  
Dorian

Edit: I use a slightly different version of beets (with parentwork plugin and additional work and work\_id tags), but this shouldn’t change anything and I noticed this also on the regular beets.

---

<div class="post-metadata">

### Author: ![dosoe](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dosoe](https://discourse.beets.io/u/dosoe)
#### Post date: [March 7, 2018, 4:12pm UTC](https://discourse.beets.io/t/difference-between-update-and-mbsync/303/2 "2018-03-07T16:12:57Z")

</div>

This is an extreme example, most of the time, there are only minor changes (like adding a dot in a title) but it still is a change.

---

<div class="post-metadata">

### Author: ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)
#### Post date: [March 8, 2018, 3:36am UTC](https://discourse.beets.io/t/difference-between-update-and-mbsync/303/3 "2018-03-08T03:36:29Z")

</div>

Hello! The `update` command detects changes to files’ tags on the filesystem, while `mbsync` fetches new data from MusicBrainz.

---

<div class="post-metadata">

### Author: ![dosoe](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dosoe](https://discourse.beets.io/u/dosoe)
#### Post date: [March 8, 2018, 8:12pm UTC](https://discourse.beets.io/t/difference-between-update-and-mbsync/303/4 "2018-03-08T20:12:36Z")

</div>

Thanks! Now I understand it better. I’m also wondering: on MusicBrainz, there are very regular merges of recordings and albums (I have a 40k music collection and I get 50-100 merges every day) that change the mb\_trackid and mb\_albumids of the recordings. Does mbsync see and reflect an eventual change in mb\_trackid and mb\_albumid ? This is not a problem as far as fetching the data is concerned, since the old mbids redirect to the newer ones, but it doesn’t interact well with the duplicates plugin, since he uses the mb\_trackid and mb\_albumid as default keys. That could mean trouble if one adds a recording to the database that is already in the collection, but after some process the mbid of the recording changed. Then they wouldn’t be recognized as duplicates anymore. On the other hand mb\_trackid is the most sensible choice for tracking duplicates if one uses MB as a metadata source.  
Do you know if this could be a problem? I’m asking because I never noticed a change in mb\_trackid fields and I noticed today that I have quite a few undetected duplicates and I wonder if it might be because of that.

---

<div class="post-metadata">

### Author: ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)
#### Post date: [March 8, 2018, 8:26pm UTC](https://discourse.beets.io/t/difference-between-update-and-mbsync/303/5 "2018-03-08T20:26:08Z")

</div>

Good question! I’m not 100% sure—it might be worth doing some experiments with manually-set IDs to find out.

---

<div class="post-metadata">

### Author: ![dosoe](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dosoe](https://discourse.beets.io/u/dosoe)
#### Post date: [May 12, 2018, 10:29am UTC](https://discourse.beets.io/t/difference-between-update-and-mbsync/303/6 "2018-05-12T10:29:56Z")

</div>

Hi!  
I finally found an occurence of  
`mb_trackid: 33f1f557-d44b-4c5d-9087-5b6539f18843 -> d49b09ef-3771-4d6d-8111-1f3a3f72ca58` so I guess this is settled.

---

<div class="post-metadata">

### Author: ![dosoe](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dosoe](https://discourse.beets.io/u/dosoe)
#### Post date: [May 31, 2019, 5:12pm UTC](https://discourse.beets.io/t/difference-between-update-and-mbsync/303/7 "2019-05-31T17:12:43Z")

</div>

It doesn’t seem to be fully settled finally: I have a dupe with different trackids: one with f97bc3ca-9ae7-42d5-bbbc-df6813b3f4db an the other with f2d7c3a1-1cb5-407d-94b0-7590e98b9aa1 that both correspond to the same recording, but at other times I see that the `mb_trackid` is updated. There seem to be some cases where the update doesn’t work. I’m checking it more in detail.

---

<div class="post-metadata">

### Author: ![dosoe](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dosoe](https://discourse.beets.io/u/dosoe)
#### Post date: [May 31, 2019, 6:03pm UTC](https://discourse.beets.io/t/difference-between-update-and-mbsync/303/8 "2019-05-31T18:03:36Z")

</div>

It’s pretty strange:  
`mbsync` calls `beets.autotag.hooks.track_for_mbid(recording_id)` which calls `beets.autotag.mb.track_for_id(releaseid)`which calls `musicbrainzngs.get_recording_by_id(trackid, TRACK_INCLUDES)` and feeds the output of this into `beets.autotag.mb.track_info`, where it is shoved into a `beets.autotag.hooks.trackinfo` object by doing  
`info = beets.autotag.hooks.TrackInfo(recording['title'], recording['id'],...)`

I checked the result of `musicbrainzngs.get_recording_by_id(trackid, TRACK_INCLUDES)` for this specific example and it returned the correct trackid (i. e. the updated trackid in case of a merge). This should settle it once and for all, and I don’t know what happened with the 9 tracks that were reluctant to adapt (they didn’t only not update the `track_id`, their `title` was also obsolete and corresponded to an older tracklist).
