summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/audioboom-inspect59
1 files changed, 29 insertions, 30 deletions
diff --git a/test/audioboom-inspect b/test/audioboom-inspect
index 6120a85..4bca4c9 100755
--- a/test/audioboom-inspect
+++ b/test/audioboom-inspect
@@ -60,36 +60,35 @@ my $sum_text = "";
my $i = 0;
for my $clip (@clips) {
$i++;
- print $i . ": " . $clip->{title} . "\n";
-
- # next unless $entry->enclosure;
-
- # $sum_title = decode_entities($entry->title);
- # $sum_text = decode_entities($entry->content->body);
- # my $guid = $entry->{'entry'}{'guid'};
- # $guid = '<unset>' unless (defined $guid);
-
- # print $sum_title . ":\n";
- # print " Issued: " . $entry->issued . "\n";
- # print " guid: " . $guid. "\n";
- # print " Files:\n";
-
- # my $j = 0;
- # for my $enclosure($entry->enclosure) {
- # $j++;
- # if($enclosure->type eq "audio/mpeg" || $enclosure->type eq "audio/ogg") {
- # my $orig_uri = $enclosure->url;
- # if($orig_uri =~ /^(.*)_cut(\.[^\.]+)$/) {
- # $orig_uri = $1 . $2;
- # }
- # $uri = new URI::URL($orig_uri);
- # my @path = $uri->path_components;
- # $file = $path[-1];
-
- # print " $j: (" . $enclosure->type . ", " . $enclosure->length . ") " . $file . "\n";
- # }
- # }
- # print "\n";
+
+ $sum_title = decode_entities($clip->{title});
+ $sum_text = decode_entities($clip->{description});
+ my $orig_uri = $clip->{urls}{high_mp3};
+ next unless $orig_uri;
+
+ my $duration = $clip->{duration};
+ $duration = 0 unless (defined $duration);
+ my $size = $clip->{mp3_filesize};
+ $size = 0 unless (defined $size);
+
+ my @tags = @{$clip->{tags}};
+
+ my $recorded = $clip->{recorded_at};
+ $recorded = '<unset>' unless (defined $recorded);
+ my $uploaded = $clip->{uploaded_at};
+ $uploaded = '<unset>' unless (defined $uploaded);
+
+ $uri = new URI::URL($orig_uri);
+ my @path = $uri->path_components;
+ $file = $path[-1];
+
+ print $clip->{title} . ":\n";
+# print " Description: " . $sum_text . "\n";
+ print " Recorded: " . $recorded . "\n";
+ print " Uploaded: " . $uploaded . "\n";
+ print " Tags: " . join(", ", @tags) . "\n";
+ print " Files:\n 1: (audio/mpeg), " . $size . ") " . $file . "\n";
+ print "\n";
}
exit 0;