NAME

File::Media::Sort - sort media based on their release names

SYNOPSIS

use File::Media::Sort qw(media_sort);

my @tv = media_sort('tv', glob("$ENV{HOME}/*"));

DESCRIPTION

This module was initially written to be used with Parse::Flexget and File::PatternMatch. The flexget application generates a logfile with downloaded files, Parse::Flexget parses that log while this module 'sorts' it before the results are being sent to File::PatternMatch which basically highlights subpatterns in the release names for terminal/dzen output.

These modules can be used for arbitary lists of files as well.

EXPORTS

None by default.

FUNCTIONS

media_sort()

Parameters: $type, @files

Returns: @results;

media_sort() takes a list of files and a type. Type can be 'music', 'mvids' or 'tv'.

CAVEATS

The regular expressions used here is far from perfect. In fact, they suck really badly. It's really hard making a regex that matches all music releases, for example. It's even harder trying to match both music videos and regular movies, since there's no way what so ever to distinguish them just by looking at the filename.

Patches and suggestions very welcome.

AUTHOR

Magnus Woldrich
CPAN ID: WOLDRICH
m@japh.se
http://japh.se

CONTRIBUTORS

None required yet.

COPYRIGHT

Copyright 2010, 2011, 2018- the File::Media::Sorts "AUTHOR" and "CONTRIBUTORS" as listed above.

LICENSE

This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Parse::Flexget, File::PatternMatch, App::rel