The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Astroboy::AlbumDir

DESCRIPTION

Private.

METHODS

new()

Argument is abs path to directory.

If it's not deemed as an is_album(), returns undef.

abs_path()

Abs path to dir.

abs_music()

Abs pathto where music should reside. Default is ~/music.

ls()

Returns array ref of all files, these are filenames only. Not absolute paths.

ls_count()

Returns count of files.

ls_mp3()

Like ls(), returns array ref of mp3 files in this dir.

ls_trash()

Like ls(), returns everything not mp3.

ls_mp3_percent()

Of the files in this dir, what percentage are mp3s.

is_album()

If more than 50% of files are mp3, then true, else false.

empty_trash()

Moves files to a temp directory. Sort of a safe delete. This is everything that is not an mp3 file. Call at your own peril.

album()

If there are mp3 files, and they all have same album id3 tag, returns album.

artist()

If there are mp3 files, and they all have same artist id3 tag, returns artist.

SEE ALSO

Astroboy

CAVEATS

This package is in development. Do not interface with the api directly. Use the command line interface scripts for stability.

AUTHOR

Leo Charre leocharre at cpan dot org

COPYRIGHT

Copyright (c) 2008 Leo Charre. All rights reserved.

LICENSE

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, i.e., under the terms of the "Artistic License" or the "GNU General Public License".

DISCLAIMER

This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the "GNU General Public License" for more details.