Ordering tracks on my Archos with INODE numbers
Edit: Bah, infact this does not work, after unplugging my MP3 player the tracks remained in the same order, and when checking the INODE numbers again they were unchanged, so I am obviosuly missing something here.
I sometimes imagine that Apple must payoff other MP3 player manufacturers so that they provide an inferior product ... I imagine this because my Archos MP3 player lacks a sort function, infact it lacks many things, but why? Its not difficult to implement these basic features, these basic features do not require a problematic amount of processing power. They are just not there, in all the VISION series of MP3 players.
So .. how are my tracks sorted? They are sorted by the INODE number, which means that they are sorted in the order that they were loaded onto the device. i.e. there is no sorting.. this is pretty vexing when you are trying to listen to an album.
So the order for my album apears as follows on the device:
$ls -i | sort
16600 07 Mass & Spring.mp3
16601 ISAM.jpg
16602 08 Calculate.mp3
16603 02 Piece of Paper.mp3
16605 03 Goto 10.mp3
16610 11 Night Swim.mp3
16611 12 Dropped from the Sky.mp3
16612 14 One Last Look.mp3
16613 09 Kitty Cat.mp3
16614 13 Morning Ms Candis.mp3
16618 01 Journeyman.mp3
16619 05 Lost & Found.mp3
16622 06 Wooden Toy.mp3
16624 04 Surge.mp3
16625 10 Bedtime Stories.mp3
The ls -i command prefixes the INODE number to the filename, piping through sort then sorts the output.
So... the bash shell to the rescue then
for i in *.mp3; do echo "Processing $i"; cp "$i" "$i.sorted"; rm "$i"; mv "$i.sorted" "$i"; done;
The for loop iterates over the files in the directory on my device (seemingly alphabetically, which is ideal as the files are prefixed with the track number), copies them (creating a new INODE number) then removes the original and moves the copied file in the originals place.
Now my files are "naturally" in the correct order:
$ls -i | sort
5155 ISAM.jpg
7215 01 Journeyman.mp3
7216 02 Piece of Paper.mp3
7217 03 Goto 10.mp3
7218 04 Surge.mp3
7219 05 Lost & Found.mp3
7220 06 Wooden Toy.mp3
7221 07 Mass & Spring.mp3
7222 08 Calculate.mp3
7223 09 Kitty Cat.mp3
7224 10 Bedtime Stories.mp3
7225 11 Night Swim.mp3
7226 12 Dropped from the Sky.mp3
7227 13 Morning Ms Candis.mp3
7228 14 One Last Look.mp3
and then to sort everything on my device ...
find /media/ARCHOS/MUSIC/* -type d -printf "%p\n" | while read d; do cd "$d"; for i in *.mp3; do echo "Processing $i"; cp "$i" "$i.sorted"; rm "$i"; mv "$i.sorted" "$i"; done; done;
ok ..
Comments
Post new comment
Tags
- DropBox
- XMPP
- android
- apache
- archos
- audacious
- awesome
- bash
- bootstrap
- bristol
- diagramming
- doctrine
- doctrine2
- git
- gloucester
- graphs
- gt540
- jack
- javascript
- manchester
- mapdroyd
- markdown
- mongodb
- paris
- php
- profiling
- projectm
- running
- scripting
- sed
- software design
- ssh
- symfony
- symfony2
- thonon-les-bains
- trainer
- travel
- twig
- ubnutu
- vim
- weymouth
- workflow
- xdebug
- xml
- ylly
- yprox
10 Latest Items
-
08
Maytrainer [Velo] paris - compiègne 153.00km / 05:48:32 / 00:02:16mpkm Fois.
-
06
Maytrainer [Velo] Vincennes Hippodrome 1hr 34.34km / 01:00:00 / 00:01:44mpkm Solo effort. Did interfals (sprinting from zebra crossing to hairpin turn).
-
05
Maytrainer [Run] Diderot > Pnt. Alx III > Rue de Charonne 13.96km / 01:08:40 / 00:04:55mpkm Good to run in the rain. Lots of traffic.
-
04
Maytrainer [Velo] Vincennes Hippodrome 1hr 32.20km / 01:00:00 / 00:01:51mpkm Rode apace a peloton, but tried not to get in the draft. Sprinted for a few minutes on every lap.
-
03
Maytrainer [Run] Dumas > P. Auguste > Belleville > Prc. de Villette > Pt. de Lilas > Pt. Vincennces 14.48km / 01:07:00 / 00:04:37mpkm Kept up a reasonably good pace. No problems from calf muscle as was the case yesterday.
-
02
Maytrainer [Run] Dumas > Diderot > Trocadero > Basitlle 14.48km / 01:10:00 / 00:04:49mpkm Experienced pain in the back of my calf and stopped a few times towards the end.
-
01
Maytrainer [Velo] Dumas > Rambouillet 123.31km / 05:06:00 / 00:02:28mpkm Paris Rambouillet. Sunny day. Ate a bakery pizza, tarte au pomme and drank a cola then lay down on a bench in the châte...
-
29
Aprtrainer [Run] 14 - 15 miles 23.34km / 01:50:00 / 00:04:42mpkm Run down the Rue Charonne, down Boulevard Henri IV, round le Ile St-Louis, along the Seine, crossing the Pont d'lén...
-
28
Aprtrainer [Velo] Vincennes Hippodrome 1hr 34.12km / 01:00:00 / 00:01:45mpkm Actually 45 minutes. Rain stopped play. Also boredom. "Sprinted" up the second half of the upside at each circ...
-
27
Aprtrainer [Run] 54 minutes 11.50km / 00:54:00 / 00:04:41mpkm Ran down and around.
