beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.86k stars 1.82k forks source link

mbsync: Configuration option to sort tags alphabetically, instead of by votes #4427

Open tandy-1000 opened 2 years ago

tandy-1000 commented 2 years ago

mbsync currently updates the genre tag for changes such as: genre: electro; electronic; synth-pop -> electronic; synth-pop; electro In this case, the only change is the ordering of the tags.

To reduce unnecessary file writes, we can check whether the genre exists in the tag before making a change.

sampsyo commented 2 years ago

Huh; that's interesting! It would be super useful to have someone do the "detective work" to figure out how this ordering is determined. Checking for identical sets in the strings would be difficult to implement, so it would be better if we could just enforce a deterministic ordering so the same set on of genres MusicBrainz always leads to the same string list.

tandy-1000 commented 2 years ago

Huh; that's interesting! It would be super useful to have someone do the "detective work" to figure out how this ordering is determined.

Genres follow a voting system, if all genres are equally weighted, they are sorted in alphabetical order, otherwise they are provided in weight order. image

Checking for identical sets in the strings would be difficult to implement, so it would be better if we could just enforce a deterministic ordering so the same set on of genres MusicBrainz always leads to the same string list.

Maybe just adding an option to apply an alphabetical sort would be a good solution?

sampsyo commented 2 years ago

Aha, thanks for the extra info! I like the idea of a configuration option to sort alphabetically.