LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-18-2003, 05:14 PM   #1
General_Tso
Member
 
Registered: Jan 2003
Location: New York, NY, USA
Distribution: Mac OS X (10.4.6), Ubuntu 6.06
Posts: 183

Rep: Reputation: 30
Question Creating XMMS Playlist in Terminal


Hey, Folks:

Is there any way to create a playlist in XMMS consisting of a whole directory via the terminal? I have a ton of mp3s, and it's a little unruly to do it through Nautilus...

Thanks,

--Erich
 
Old 03-18-2003, 05:24 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
should be easy enough, just look at a playlist in a text browser and write a simople script to parse a "find" output into that format. can't remember the format offhand though so i can't give an example.
 
Old 03-18-2003, 06:04 PM   #3
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
.m3u works for me. I've always just ls'd the directory and cut and paste into vim or whatever though...
 
Old 03-18-2003, 11:26 PM   #4
General_Tso
Member
 
Registered: Jan 2003
Location: New York, NY, USA
Distribution: Mac OS X (10.4.6), Ubuntu 6.06
Posts: 183

Original Poster
Rep: Reputation: 30
Thanks, guys. I didn't know you could do that. That's pretty handy. I have one question, though. The file begins with #EXTM3U. Could I create other file types by identifying the extension that way in VIM?

--Erich

Last edited by General_Tso; 03-18-2003 at 11:38 PM.
 
Old 03-19-2003, 02:22 AM   #5
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 56
Have a look at xmms-shell.
 
Old 03-19-2003, 01:51 PM   #6
Glock Shooter
Member
 
Registered: Jan 2002
Location: Riverside, CA
Distribution: Slackware Convert!!
Posts: 210

Rep: Reputation: 30
mp3blaster is a console based mp3 player that you can create playlists with.
 
Old 03-29-2003, 02:15 PM   #7
General_Tso
Member
 
Registered: Jan 2003
Location: New York, NY, USA
Distribution: Mac OS X (10.4.6), Ubuntu 6.06
Posts: 183

Original Poster
Rep: Reputation: 30
[Edit: Misposted. Sorry.]

Last edited by General_Tso; 03-29-2003 at 02:16 PM.
 
Old 04-07-2003, 06:00 PM   #8
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
I wrote a script that will prompt you for songs and add them to an .m3u playlist.

You just need to keep in mind that filepaths to songs need to be reletive to where the playlist will be ie: if the playlist will be in /home/music and the song you want to add is /home/music/atol/ab/song.ogg then you need to add the song as ./atol/ab/song.ogg, or else just use full paths...

It will work for oggs or mp3s, and you can add more songs to the playlist at a later time (it just appends them to the end) by putting in the name of a previous playlist when prompted for the playlist name.

So anyway....here it is:
Code:
#!/bin/bash
#

echo -n "Enter playlist name: "
read playlist
echo -n "Enter directory to place the playlist: "
read listdir
genericvariable=0
while [ $genericvariable = 0 ]
do
	echo -n "Enter song to add to playlist (type 'done' if finished): "
	read file
	if [ ${file} = "done" ]; then
		echo "Thanks for using playlist generator"
		exit 0
	fi
	echo "${file}" | cat >> ${listdir}/${playlist}.m3u
done
 
Old 04-08-2003, 02:32 AM   #9
General_Tso
Member
 
Registered: Jan 2003
Location: New York, NY, USA
Distribution: Mac OS X (10.4.6), Ubuntu 6.06
Posts: 183

Original Poster
Rep: Reputation: 30
That's really cool, bro. I'm going to have to start playing with scripts. I love that stuff. If any one comes across this post looking to learn scripts, here you go.

Thanks for sharing that.

--Erich
 
Old 04-08-2003, 03:40 PM   #10
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Heres another, adds an entire directory to the playlist:
Code:
#!/bin/bash
#

if [ ! $1 ]; then
        echo "Please specify a directory"
        exit 0
fi
echo -n "Enter playlist name: "
read name
echo -n "Enter full path to playlist directory: "
read listdir
dir=$1
for file in `ls -1tX $dir/*`
do
        echo "${file}" | cat >> ${listdir}/${name}.m3u
done
exit 0
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Winamp playlist to XMMS dangerousdave Linux - Software 5 08-25-2005 04:15 PM
XMMS playlist problems apachedude Linux - Software 3 04-05-2005 10:44 PM
XMMS playlist non-wipe richardlynch Fedora 0 10-26-2004 10:04 PM
xmms has no playlist!! prkn8tr Linux - Software 1 03-13-2004 12:15 PM
Xmms playlist pb kyoshiro Linux - Software 0 12-05-2003 02:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration