💾 Archived View for gemini.spaceling.sh › fishmpd.gmi captured on 2024-05-26 at 14:20:55. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

random album mpd playlist in fish

10MAY24

i prefer to listen to full albums at a time, so i'd been just selecting albums in ncmpcpp. but here's a little fish function to do a better job, using the beets "random" plugin to even out artists.

function playrand
  if test (count $argv) -eq 0
    set count 6
  else
    set count $argv
  end
  mpc --quiet clear
  for albumname in (beet random -aef '$album' -n$count)
    mpc findadd album $albumname
  end
  mpc --quiet play 1
end