android
  #1  
Old 05-19-2008, 11:56 AM
cptdodno cptdodno is offline
Junior Member
 
Join Date: May 2008
Posts: 18
Default Playlist editor for V2

V2 of the Sansa e2x0 players uses regular m3u files stored in the /MUSIC directory. So, now I'm in search of a simple, linux based m3u editor.

Here's what I need:

open a new playlist
play songs; if one suits add to playlist
repeat as necessary
save playlist

Sounds simple but I really can't find a linux app that does that. I teach at a gym so I generate lots of playlists and I need to be able to do the listen/add thing a lot.
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 05-19-2008, 11:10 PM
cptdodno cptdodno is offline
Junior Member
 
Join Date: May 2008
Posts: 18
Default

OK, xmms sort of does what I need, with the following changes:

edit the m3u file xmms creates to

1. remove everything up to and including /../.../MUSIC
2. change the slashes '/' to backslashes '\'
3. change the unix <cr> to the dos <cr><lf>

and bingo, you have a working .m3u file....

Fortunately all that nonsense can be easily scripted with sed + tr

Here's a script that should convert an xmms .m3u to a sansa m3u. You must run it from within the Sansa tree. It will scan the entire MUSIC tree looking for unprocessed .m3u files and change them.

#!/bin/bash
#1. remove everything up to and including /../.../MUSIC/
#2. change the slashes '/' to backslashes '\'
#3. change the unix <cr> to the dos <cr><lf>
CR=$(printf '\r')
for m in `find $PWD -name '*.m3u'` ; do
[[ `grep MUSIC $m` ]] || continue
echo found $m
nm=`basename $m`
dm=`dirname $m`/
mv $m /tmp/$nm
cat /tmp/$nm | sed "s+^$dm++" | tr '/' '\\' | sed "s/\$/$CR/" > $m
rm /tmp/$nm
done

Last edited by cptdodno; 05-20-2008 at 03:25 PM.
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 12:00 AM.