NAME
Music::Tag::File - Plugin module for Music::Tag to get information from filename and directory entries.
SYNOPSIS
use Music::Tag
my $filename = "/var/lib/music/artist/album/track.mp3";
my $info = Music::Tag->new($filename, { quiet => 1 });
$info->add_plugin("File");
$info->get_info();
# Following prints "artist"
print "Artist is ", $info->artist;
DESCRIPTION
Music::Tag::File is used to guess information about a music file from its filename, directory name, or contents of the directory it resides in.
This plugin will not overwrite values found by other plugins.
REQUIRED VALUES
No values are required (except filename, which is usually provided on object creation).
SET VALUES
- album
-
Derived from directory file is in.
- aritst
-
Derived from parent directory of directory file is in.
- tracknum
-
Derived from first number(s) found in file.
- track
-
From file with initial numbers removed.
- disc
-
Set to 1 of 1 if no value set.
- picture
-
Looks for folder.png, folder.jpg, or cover.jpg
- lyrics
-
Looks for file of same name as filename with .txt extension.
- booklet
-
Looks for any pdf file.
OPTIONS
- lyricsoverwrite
-
If true will overwrite lyrics with values found by plugin.
- coveroverwrite
-
If true will overwrite picture with values found by plugin.
BUGS
This method is always unreliable unless great care is taken in file naming.
SEE ALSO
Music::Tag, Music::Tag::Amazon, Music::Tag::FLAC, Music::Tag::Lyrics, Music::Tag::M4A, Music::Tag::MP3, Music::Tag::MusicBrainz, Music::Tag::OGG, Music::Tag::Option,
AUTHOR
Edward Allen III <ealleniii _at_ cpan _dot_ org>
COPYRIGHT
Copyright (c) 2007 Edward Allen III. Some rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, distributed with Perl.