Xmms: Changing Play list Using Bash Script – Update And Play Our Collection

By | October 1, 2009

Xmms: Changing Play list Using Bash Script – Update And Play Our Collection

While listening to music, i usually change the play list on my Xmms player. Some time i do download of new songs and adding them to my collection have two music collection folders. One for English and other one for Malayalam. Each day i hear songs from both the collections (English, Malayalam). Normally it took little time to do loading and changing the play list. So i thought to write a script for changing the play list without much effort. The script is also capable of updating new songs from collection folder to their corresponding panelist.

Install Xmms Player

1. Set the yum repository with rpmforge-release

# cd /tmp

# wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

*Select rpmforge-release package according to the Linux OS version.

2. Install Xmms package using the yum

# yum install xmms-skins xmms xmms-mp3

Script

# vi /usr/local/bin/xmmel

#!/bin/bash

xmms=(`which xmms`)

#echo "$xmms"

echo -e "Enter your choice,nFor English Press (e),nFor Malayalam Press (m),nFor Updation Press (u)"

read language

#echo $language

if [ $language == e ]

then

killall -15 xmms

##Store location for English play list####

$xmms/media/zongs/playlist/english.m3u &

echo "Enjoy English Song"

elif [ $language == m ]

then

killall -15 xmms

##Store location for Malayalam play list####

$Xmas /media/zongs/playlist/malayalam.m3u &

echo "Enjoy Malayalam Song"

elif [ $language == u ]

then

##Updation from my music folders# > ##to there corresponding play list#

find /media/songs/English/ -name *.mp3 > /media/zongs/playlist/english.m3u

find /media/zongs/Malayalam/ -name *.mp3 > /media/zongs/playlist/malayalam.m3u

echo "Updation Completed"

else

echo "Wrong Choice"

exit

fi

# chomd a+x /usr/local/bin/xmmel

Enjoy the Script

# xmmel

Options:

Song selection press “e” for English, “m” for Malayalam and “u” for Updating the collection.

Cheers!

Melbin Mathew

www.talk2melbin.com

Melbin Mathew

I am Melbin Mathew, Systems Engineer from Kerala, India. I live with my parents, daughter and my wonderful wife. I graduated in 2004 with a bachelor’s degree in Electronics and Hardware from Mahatma Gandhi University, Kottayam and completed certification in MCITP, RHCE, CCNA, VCP ...Read More
Category: Scripts

About Melbin Mathew

I am Melbin Mathew, Systems Engineer from Kerala, India. I live with my parents, daughter and my wonderful wife. I graduated in 2004 with a bachelor’s degree in Electronics and Hardware from Mahatma Gandhi University, Kottayam and completed certification in MCITP, RHCE, CCNA, VCP ...Read More

  • jmituzas

    Could you please help me out a bit further?

    How could I do this ‘reclusively’, meaning I would like it search every directory for mp3 file and in each directory create a playlist by directory name?

    Have been banging my head against the wall trying to figure it out. Please help.

    Thanks in advance,
    regards,
    joe