Edward J. Allen III > Music-Tag-File-0.29 > Music::Tag::File

Download:
Music-Tag-File-0.29.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.29   Source  

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.

no_savelyrics

If true will not save lyrics.

no_savecover

If true will not save cover.

METHODS ^

default_options

Returns the default options for the plugin.

set_tag

Saves info such as image files, lyrics, etc. Note: Currently calls save_lyrics method for all files that do not end in .mp3 unless np_savelyrics is set.

get_tag

Gathers info from file name, text files, etc.

save_lyrics

Save lyrics to a text file.

save_cover

Save cover picture to disk.

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.