beetbox / beetbox/beets

Add --write/-w option to beet update

Open
#326 6 comments 0 reactions 0 assignees View on GitHub
feature update-command
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

I expected that running `beet update` would leave the database in a state where it reflects the filesystem and hence running it a second time immediately after would produce no effect. However, some changes seem not to be applied, because they keep appearing on subsequent `update`s. If this is intended then perhaps it would help to indicate that there is something preventing the changes from being applied?

Output of `beet update` for me after having just run it [(pastebin of full output)](http://hastebin.com/nugujijeqa):

```
Alabama Shakes - Big Light Studio 10/12/2012 - Boys & Girls
album: Big Light Studio 10/12/2012 -> Echo Mountain Recording 4/5/2012
Anna Calvi - Big Light Studio 10/12/2012 - Love Won’t Be Leaving
album: Big Light Studio 10/12/2012 -> Studio Paradiso 2/7/2012
Anthony Green - Big Light Studio 10/12/2012 - Blood Song
album: Big Light Studio 10/12/2012 -> Studio Paradiso 3/29/2012
Bad Weather California - Big Light Studio 10/12/2012 - I'll Sing Along
album: Big Light Studio 10/12/2012 -> Daytrotter Studio 2/22/2012
Bene Gesserit - True Horrors Vol.2 - Mickey, Please
language: -> English
Beta Evers - True Horrors Vol.2 - Paralyzed
language: -> English
Carl Anderson - Big Light Studio 10/12/2012 - Cold Hands
album: Big Light Studio 10/12/2012 -> Daytrotter Studio 9/17/2012
Chairlift - Big Light Studio 10/12/2012 - Ghost Tonight
album: Big Light Studio 10/12/2012 -> Daytrotter Studio 2/13/2012
Chelsea Wolfe - Big Light Studio 10/12/2012 - Feral Love
album: Big Light Studio 10/12/2012 -> Studio Paradiso 2/14/2012
David Ramirez - Big Light Studio 10/12/2012 - An Introduction
album: Big Light Studio 10/12/2012 -> Daytrotter Studio 8/29/2012
Emily Wells - Big Light Studio 10/12/2012 - Don’t Use Me Up
album: Big Light Studio 10/12/2012 -> Studio Paradiso 4/6/2012
Esme Patterson - Big Light Studio 10/12/2012 - My Young Man
album: Big Light Studio 10/12/2012 -> Daytrotter Studio 11/14/2012
Father John Misty - Big Light Studio 10/12/2012 - Funtimes In Babylon
album: Big Light Studio 10/12/2012 -> Good Danny's 5/23/2012
[...]
```

And the debug output (with all the "skipping..." lines removed):

```
data directory: /home/carl/.config/beets
library database: /home/carl/.config/beets/library.db
library directory: /home/carl/music
Getting items with SQL: SELECT * FROM items WHERE ((1)) ORDER BY (CASE artist_sort WHEN NULL THEN artist WHEN "" THEN artist ELSE artist_sort END), album, disc, track
Sending event: database_change
[...]
Sending event: database_change
moving album 344
Sending event: database_change
[...]
Sending event: database_change
moving album 952
Sending event: database_change
[...]
Sending event: database_change
moving album 323
Sending event: database_change
[...]
Sending event: database_change
moving album 789
Sending event: database_change
[...]
Sending event: database_change
moving album 1142
Sending event: cli_exit
```

Some observations:
- affects many fields, but not ever title or artist, as far as I've noticed
- sometimes affects different tracks in an album differently (e.g. suggesting some tracks change year/language/etc. to disagree with others)
- this is after a fresh import of the whole library
- the same output appears on every subsequent `update`

Version/plugin information:

```
beets version 1.2.0
plugins: chroma, discogs, duplicates, embedart, fetchart, info, lastgenre, mbsync, missing, replaygain, rewrite, scrub
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.