File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 11# !/usr/bin/perl -w
2- # Last Updated: 2004.09.26 (xris)
2+ # Last Updated: 2004.09.27 (xris)
33#
44# export::NUV_SQL
55# Maintained by Chris Petersen <mythtv@forevermore.net>
@@ -26,7 +26,8 @@ package export::NUV_SQL;
2626 ' enabled' => 1,
2727 ' errors' => [],
2828 # Delete original files?
29- ' delete' => 0,
29+ ' delete' => 0,
30+ ' create_dir' => 1,
3031 };
3132 bless ($self , $class );
3233
@@ -54,13 +55,22 @@ package export::NUV_SQL;
5455 }
5556 # Load the save path, if requested
5657 $self -> {' path' } = query_savepath();
58+ # Create a
59+ $self -> {' create_dir' } = query_text(' Create a directory with the show name?' ,
60+ ' yesno' ,
61+ $self -> {' create_dir' } ? ' Yes' : ' No' );
5762 }
5863
5964 sub export {
6065 my $self = shift ;
6166 my $episode = shift ;
6267 # Make sure we have finfo
6368 load_finfo($episode );
69+ # Create a show-name directory?
70+ if ($self -> {' create_dir' }) {
71+ $self -> {' path' } .= ' /' .$episode -> {' outfile' };
72+ mkdir ($self -> {' path' }, 0755) or die " Can't create $self ->{'path'}: $! \n\n " ;
73+ }
6474 # Load the three files we'll be using
6575 my $txt_file = basename($episode -> {' filename' }, ' .nuv' ) . ' .txt' ;
6676 my $sql_file = basename($episode -> {' filename' }, ' .nuv' ) . ' .sql' ;
You can’t perform that action at this time.
0 commit comments