Crappy MP3 player doesn't have a shuffle mode
Crappy MP3 player doesn't have a shuffle mode
So... Should I try attempt to write a script that renames the files randomly so that I get a semi-random mode? (if so, I have no clue where to start) OR would a little java program be better/easier? Plus side here is that I could run it on windows and linux ;) |
Java might be easier...
|
I'd say a bash script is simple enough.
This should do what you want: Code:
#!/bin/bash Don't forget to do a chmod +x on the .sh file :) What it'll do is loop through every file in the folder, and stick a random number in front of it, thereby effectively shuffling your playlist. It does also rename itself, but that's something I can't be bothered to change right now ;) I wouldn't recommend putting it in your home diectory or anything like that, since it will rename **everything** in the current folder. Hope it's helpful... Sam |
That is really helpful!
Thanks so much for posting that :D |
Hey,
I've done some modification to the original script. The random number in front works pretty well, but the player seems to have an interesting way of ordering the songs, so in order to give it less options I want to only have a number in front of .mp3, I then have a restore script that can regenerate all the file names. Only problem is that now I have the possibility of overwriting a file. How can I check to see that a file won't be overwritten? (My script writing abilities aren't the best) And... horror of horrors, anyone know how to convert this to a .bat file so that I can run this in windows and linux ;) Code:
TT=$(ls *.mp3 | wc -l) |
Could someone shed some light on this;
The way this mp3 player actually plays songs is beyond me. I have the following songs in order (this is from the restore script) but when I play the songs on the mp3 player, it starts with Breakerfall, and then plays all the songs in order after that (Evacuation, Fly Paper jet etc). Now they obviously don't follow sequencially looking at their names. And when I restore their original names it starts playing "A Perfect Circle". WTF is going on?!? It plays according to a directory listing when I don't change anything. When I run the randomiser, it starts on some arb song but then starts playing in order again! Huh? How? Code:
mv "AA - 29 - 87 - 18.mp3" "A Perfect Circle - Mer De Noms - 02 - Magdalena.mp3.mp3" |
Hmmmmmm.
Okay, so I used id3 -d to delete the id3 tags from the files. Turns out (obviously) that the mp3 player was reading id3 tags after reading the first random song number. Now how to remove the id3 tags but be able to restore them like I can with the restore script? |
All times are GMT -5. The time now is 02:51 PM. |