Calling mpdupdate

Was it my imagination or did using the mpdupdate plugin once allow manual updating with:

% beet mpdupdate


I now get

error: unknown command 'mpdupdate'

Config here:

% beet version
beets version 1.5.0
Python version 3.7.4
plugins: badfiles, bandcamp, convert, discogs, duplicates, edit, fetchart, mpdupdate, playlist, smartplaylist
% cat .config/beets/config.yaml 
directory: "/Volumes/Apollo/music/media"
  copy: yes
  write: yes
  log: "import.log"
asciify_paths: yes
original_date: yes
    countries: ["au", "us"]
    media: ["cd", "digital"]
  ignored_media: vinyl
languages: en
  default: "$albumartist/$album/$track $title"
  singleton: "singles/$artist/$title"
  comp: "compilations/$album/$track $title"
  genre:soundtrack: "soundtracks/$album%aunique{}/$track $title"
  - edit
  - duplicates
  - fetchart
  - playlist
  - smartplaylist
  - convert
  - badfiles
  - mpdupdate
  - discogs
  - bandcamp
  auto: yes
  minwidth: 800
  enforce_ratio: 8px
  sources: itunes *
  host: "~/.mpd/socket"
  port: 6600
  auto: yes
  relative_to: library
  playlist_dir: "~/Music/playlists"
  auto: yes
  playlist_dir: "~/Music/playlists"
    - name: "Last 2 Wks.m3u"
      query: added- added:-2w..
    - name: "Lossless.m3u"
      query: added- format:alac, format:flac
    - name: "low bitrate.m3u"
      query: albumartist+ bitrate:..128000
    - name: "Music of This Year.m3u"
      query: year:2019
    - name: "Singles Collection.m3u"
      query: singleton:true
    - name: "The Covers Playlist.m3u"
      query: cover:true
      command: ffmpeg -i $source -y -vn -acodec aac -ab 256k $dest
      extension: m4a
  user_token: REDACTED
  source_weight: 0.7
  art: yes

p.s. I was getting the same with beets 1.4.9 and so installed from master to see if it would change anything.

I could be wrong, but I don’t believe there ever was such a command!

If you want to find an authoritative answer, however, git log beetsplug/ will hold all the answers… :smiley:

1 Like

Thanks, you’re right!

May I ask, is there a way to force beets to update the mpd db? My beets library is pretty ship shape, but for some reason my mpd db gets a bit funky.

You don’t need beets to instruct MPD to update its library – you can use something like mpc update to do it from MPC. You can even use netcat localhost 6600 and then type update and hit return :slight_smile:

Or even u from within ncmpcpp! However… when mpd updates its library it just scans the filesystem and whatever is there is there; I was under the impression that when beets updates mpd’s library it’s a case of beets using its own sqlite db as the canonical source of library info?

Edit: but just looking at the docs again, I’m thinking this is not the case.

Yes, mpdupdate only prompts MPD to re-scan its library when beets’ database changes. You can see that it’s only sending update over a socket and that’s all:

MPD will always get its information from the filesystem. You could check out the bpd plugin though which implements an MPD-like server using beets’ library as the backend instead of the filesystem. It works reasonably well with ncmpcpp though there are occasional hiccups.

1 Like

Enlightening :slight_smile:

Thanks, it’s on my todo list!