From 87c44e1b97386c86a679c45370372ccb22f730b2 Mon Sep 17 00:00:00 2001 From: legatvs Date: Fri, 17 Jul 2009 14:42:40 +0300 Subject: [PATCH] Tweak: dash replacement if gstitle. --- lib/clive/Video.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/clive/Video.pm b/lib/clive/Video.pm index c0dc63d..7f6f946 100644 --- a/lib/clive/Video.pm +++ b/lib/clive/Video.pm @@ -118,10 +118,10 @@ sub formatOutputFilename { # Format output filename. $fname = $config->{filename_format} || "%t.%s"; - $title ||= $self->{video_id} - if ( $fname !~ /%i/ ); - - $title =~ s/-/_/g; + if ( !$title && $fname !~ /%i/ ) { + $title = $self->{video_id}; + $title =~ s/-/_/g; + } $fname =~ s/%t/$title/; $fname =~ s/%s/$self->{file_suffix}/; -- 2.11.4.GIT