Unoffical empeg BBS

Quick Links: Empeg FAQ | Software | RioCar.Org | Hijack | jEmplode | emphatic
Repairs: Repairs | Addons: Eutronix | Cases

Topic Options
#368560 - 01/04/2017 22:38 fidtomp3.sh -- a bash script
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 13628
Loc: Canada
We are gradually working on updating several of our RioCar/Empeg players here to larger, solid-state drives. With the increase in storage capacity, it should be possible to combine all of our tunes onto all of our players.

First step is to extract the tunes from the players. jEmplode is what I would normally have used, but it isn't working that well for us. It pulls most of the tunes from the players, but misses a fair number as well, reason unknown. And I'm not sure how well it manages ripping/preserving the playlists and tags.

So.. I wrote a bash (shell) script to do it.

This can be run on the player itself, though it is painfully slow there and unlikely to complete in our lifetimes. smile But with the drive pulled from the player, and connected to a Linux PC using USB/whatever, it is reasonably speedy.

The result is a directory tree of symlinks, pointing back at the original "fids". At least in the initial version (attached) of the script. It's a simple change to have it hard-link, or even copy the files into the tree rather than symlinking them.

Within each playlist directory it creates, there is also a 00_ORDER file giving the original ordering of the contents from the player, so that the order can later be preserved when going back from mp3's to fids (not implemented yet).

The tag (metadata) files are also symlinked along with the tunes, so that they too can survive the back-and-forth transfers.

Anyway.. initial version is attached, and works well enough to back up our tunes. I'll be updating it and probably adding a new script to go the other way at some point -- similar to the mp3tofid utility I suppose.

Cheers
Mark

EDIT: One obvious enhancement might be to have it fetch the fids over the network using Hijack's built-in FTP server. This would be much slower, but would make it possible without having to remove the drive from the empeg.


Attachments
fidtomp3.sh (87 downloads)
Description: fidtomp3.sh



Top
#368561 - 01/04/2017 22:49 Re: fidtomp3.sh -- a bash script [Re: mlord]
tanstaafl.
carpal tunnel

Registered: 08/07/1999
Posts: 5313
Loc: Ajijic, Mexico
function get_tag(){
sed -n -e's/"/\\"/g' -e"s/^${2}=\(.*\)/\1/p" < "$1"
}

Uhhh... yeah. Sure. That's just how I'd have done it. Just like Excel, isn't it? smile

tanstaafl.
_________________________
"There Ain't No Such Thing As A Free Lunch"

Top
#368562 - 02/04/2017 12:34 Re: fidtomp3.sh -- a bash script [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 13628
Loc: Canada
Hey, my first programming language was APL! This ain't yo daddy's spreadsheeet, pal! smile

Top