Skip to content

Commit f841f72

Browse files
committed
minor optimization and code-shortening for printing the cutlist to the
transcode command line.
1 parent 99333bc commit f841f72

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

trunk/export/transcode.pm

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/perl -w
2-
#Last Updated: 2005.03.02 (xris)
2+
#Last Updated: 2005.04.13 (xris)
33
#
44
# transcode.pm
55
#
@@ -255,11 +255,10 @@ package export::transcode;
255255
}
256256
# Use the cutlist? (only for mpeg files -- nuv files are handled by mythtranscode)
257257
if ($self->{'use_cutlist'} && $episode->{'cutlist'} && $episode->{'cutlist'} =~ /\d/) {
258-
my @skiplist;
259-
foreach my $cut (split("\n", $episode->{'cutlist'})) {
260-
push @skiplist, (split(" - ", $cut))[0]."-".(split(" - ", $cut))[1];
261-
}
262-
$transcode .= " -J skip=\"".join(" ", @skiplist)."\"";
258+
my $cutlist = $episode->{'cutlist'};
259+
$cutlist =~ tr/ //d;
260+
$cutlist =~ tr/\n/ /;
261+
$transcode .= " -J skip=\"$cutlist\"";
263262
}
264263
# Filters
265264
if ($self->{'zoom_filter'}) {

0 commit comments

Comments
 (0)