Skip to content

Instantly share code, notes, and snippets.

@TauPan
Created July 20, 2011 09:52
Show Gist options
  • Save TauPan/1094692 to your computer and use it in GitHub Desktop.
Save TauPan/1094692 to your computer and use it in GitHub Desktop.
extremely dirty first shell version of xmms2continue
#!/bin/bash
searchterm=$(echo $(curl http://ws.audioscrobbler.com/1.0/user/TauPan/recenttracks.rss|grep -A1 item|grep title|head -1|sed -e 's/<title>\(.*\)<\/title>/\1/'|tr -dc \ A-z0-9))
artist=$(echo $(xmms2 search $searchterm -l artist|tail -2|head -1))
album=$(echo $(xmms2 search $searchterm -l album|tail -2|head -1))
title=$(echo $(xmms2 search $searchterm -l title|tail -2|head -1))
xmms2 stop
xmms2 clear
xmms2 add artist:"$artist" album:"$album" -o "artist date tracknr"
xmms2 jump $title
xmms2 play
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment