From the "Yeah, I know you guys learned this decades ago, but I'm still new at this cool stuff" desk, here's a simple script that plays random albums stored on your hard-drives. It assumes a AlbumArtist/Album/Track hierarchy, but it does work pretty neat. My stuff's all in FLAC and OGG, so vorbistools does the job for me with ogg123.
Code: Select all
#!/bin/bash
cd [album-artist-directory]
while:
do
ogg123 $(ls -1 | shuf -n 1)
sleep 2
done
There it is, my first real bash script. ogg123 needs two Control-C's to exit, and this script adds a third, but for all that RMS-friendly music on your comp, no need to install something bloaty like GMusicbrowser for the same functionality.
For example, I've got a box set of Mozart that's 170 CD's. I put the Mozart directory in the script, and it decides which cd to play when.
Edit: clarification and correction.