Skip to content

Instantly share code, notes, and snippets.

@madprops
Last active January 2, 2018 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madprops/04ad2ec755190b2e49c490b13f390db1 to your computer and use it in GitHub Desktop.
Save madprops/04ad2ec755190b2e49c490b13f390db1 to your computer and use it in GitHub Desktop.
I use this script to make a smooth transition when new music has been added to my icecast radio. What it does is it first updates the database, crops the playlist, then add the new playlist, I have an audio file saying "the music database has been updated" , but I don't want it in the playlist, neither I want the current track appearing twice, s…
mpc --no-status --wait update &&
mpc --no-status crop &&
mpc --no-status add ''
mpc --no-status random on &&
mpc --no-status crossfade 10 &&
mpc --no-status consume on &&
mpc play &&
killall mpc
( mpc --no-status idle player && mpc --no-status idle player && mpc --no-status consume off) 0<>/dev/null >&0 2>&0 & disown -h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment