%perl>
my $cwd = $m->base_comp->source_dir;
if ($ARGS{o} eq 'd' && $ARGS{f}){
unlink "$cwd/../mp3/$ARGS{f}";
# print "$cwd/../mp3/$ARGS{f}";
print "";
}
my $tostat = $ARGS{f};
%perl>
% my @files = sort {(stat("$b"))[9] <=> (stat("$a"))[9]} grep{/\.mp3/o} io("$cwd/../mp3")->all_files();
% if(@files){
RIPPED FILES
% }
% if( @files ){
% if($ARGS{is_admin}){
|
% }
|
| NAME
% }
<%perl>
use IO::All;
use MP3::Info;
use URI::Escape;
my $info;
my $cnt = 0;
foreach my $f (@files){
$info = undef;
$f =~ s,^.+/,,;
$info = get_mp3info("$cwd/../mp3/$f") if $tostat && "$f" eq "$tostat";
%perl>
|
% if($ARGS{is_admin}){
| Delete
% }
|
| <% $f %>
% if( ref $info ){
|
| LENGTH | <% $info->{TIME} %>
| | FREQUENCY | <% $info->{FREQUENCY} %>
| | STEREO | <% $info->{STEREO} ? 'Y' : 'N' %>
| | SIZE (Mb) | <% sprintf("%.5s", ($info->{SIZE}/1048576)) %>
|
% } else {
| info
% }
% $cnt++;
%}
|