iRiver plays files in order they were saved

Kjetil Thuen Kjetil.Thuen at nsd.uib.no
Mon Jan 28 12:10:03 UTC 2008


søn, 27.01.2008 kl. 22.03 +0000, skrev chombee:

> There appear to be no way to tell the device to play the files in order
> of filename, or mp3 tag, it can only play them in the order they were
> saved.
> 
> Is there some way around this? 

I've successfully used this small bash script to alphabetize the
directory:

-- snip --
#!/bin/bash

if [ $# -lt 1 ] ;then
  echo "Usage: `basename $0` directory"
  exit 1
fi

if [ ! -d "$1" ] ;then
  echo "Usage: `basename $0` directory"
  exit 1
fi


DIR=`mktemp -d -p .`
mv "`pwd`/$1"/* "`pwd`/$DIR/"

for file in "$DIR"/* ; do 
  mv "$file" "`pwd`/$1"/ ; 
done

if [ -e "$DIR" ]; then 
  rmdir "$DIR";
fi
-- snap --

It works like this:

~/m/Albums> find "Will Oldham - Western Music" -type f
Will Oldham - Western Music/03 - Will Oldham - Three Photographs.ogg
Will Oldham - Western Music/01 - Will Oldham - Always Bathing in the
Evening.ogg
Will Oldham - Western Music/02 - Will Oldham - Western Song for
J.L.L..ogg
Will Oldham - Western Music/04 - Will Oldham - Jump in Jump in_ Come in
Come in.ogg
~/m/Albums> alphabetizedir "Will Oldham - Western Music"
~/m/Albums> find "Will Oldham - Western Music" -type f
Will Oldham - Western Music/01 - Will Oldham - Always Bathing in the
Evening.ogg
Will Oldham - Western Music/02 - Will Oldham - Western Song for
J.L.L..ogg
Will Oldham - Western Music/03 - Will Oldham - Three Photographs.ogg
Will Oldham - Western Music/04 - Will Oldham - Jump in Jump in_ Come in
Come in.ogg

You can run this script after you have copied the files to your mp3
player, or even run it recursively on your music collection to fix the
problem once and for all. Note that this does not seem to work on lvm
partitions.

-- 
Kjetil Thuen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dette er en digitalt signert meldingsdel
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080128/61858264/attachment.sig>


More information about the ubuntu-users mailing list