PDA

View Full Version : two newbie questions



Peter Pouliot
2004-04-02, 10:11
Here's how I sanitize playlists....
it may not be pretty but it works...

#!/bin/sh
#
perl -pi -e 's|file:\\\\localhost\\Volumes\\MP3\\|/mp3/|g;' *.m3u ;
perl -pi -e 's/\\/\//g;' *.m3u ;
perl -pi -e 's/%22/"/g;' *.m3u ;
perl -pi -e 's/%23/#/g;' *.m3u ;
perl -pi -e 's/%5B/[/g;' *.m3u ;
perl -pi -e 's/%5D/]/g;' *.m3u ;
perl -pi -e 's/%60/`/g;' *.m3u ;
perl -pi -e 's/%25/%/g;' *.m3u ;
perl -pi -e 's/%3F/?/g;' *.m3u ;
perl -pi -e 's/%CC%80//g;' *.m3u ;
perl -pi -e 's/%CC%81//g;' *.m3u ;
perl -pi -e 's/%CC%83//g;' *.m3u ;
perl -pi -e 's/%C3%86//g;' *.m3u ;

You really want the first line. The stuff after it cleans up the ascii
characters.

Cheers,
pp

> From: Tom Newton <tom (AT) reapergraphics (DOT) com>
> Reply-To: Slim Devices Discussion <discuss (AT) lists (DOT) slimdevices.com>
> Date: Fri, 02 Apr 2004 00:55:12 +0100
> To: discuss (AT) lists (DOT) slimdevices.com
> Subject: [slim] two newbie questions
>
> Chris Kantarjiev wrote:
>
>>
>>
>> - While my MP3s live on the OpenBSD box, so far all my clients are
>> PCs. So my m3u playlists are created by winamp and either have
>> relative addressing or a prefix of M: to point the client programs
>> at the right place. I'd like to put in a small hack to allow
>> SlimServer to understand the M: syntax - where's a likely place
>> to start?
>
> Good point.. i'd like to be able to download playlists and play them on my
> box (where the music is mounted under /mnt/music) or some windows box where
> it's L: (don't ask). Be good to have something that could "sanitize" a
> playlist before download...
>
> --
>
> Tom Newton
>
>