NAME

MP3::M3U - m3u playlist parser

SYNOPSIS

use MP3::M3U;

my $m3u = new MP3::M3U '/path/to/playlist.m3u';
my $files = $m3u->parse();
print foreach @$files;

DESCRIPTION

The parser engine tries to be smart in that it tests the existence of each file in the playlist with fallbacks. That is, if a file in the playlist doesn't exist, the engine will prepend the root path of the playlist to the filename. This is useful when the m3u is in the format of: \song1.mp3 \song2.mp3

The second fallback is specified via the parse method. See below.

INTERFACE

new (M3U)

First argument is the absolute path to the playlist filename.

parse ([search, replace])

The optional arguments specify the search and replace strings to be executed for each filename in the playlist.

eg.:

GIVEN: playlist.m3u: E:\song1.mp3 E:\song2.mp3

WANTED: /mp3/songs/song1.mp3 /mp3/songs/song2.mp3

SOLUTION: parse('E:', '/mp3/songs');

AUTHOR

Ilia Lobsanov <ilia@lobsanov.com>

COPYRIGHT

Copyright (c) 2001 Ilia Lobsanov, Nurey Networks Inc.

LICENSE

Licensed under GPL.