Skip to content

Commit

Permalink
fix a problem where nuvexport wouldn't properly load settings from nu…
Browse files Browse the repository at this point in the history
…vexportrc

add require_cutlist to the nuvexportrc file
rearrange some rc/cli-handling stuff
update timestamps
  • Loading branch information
ex-nerd committed Apr 1, 2005
1 parent 1930900 commit fd8f177
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
10 changes: 3 additions & 7 deletions trunk/export/generic.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
#Last Updated: 2005.03.07 (xris)
#Last Updated: 2005.03.31 (xris)
#
# generic.pm
#
Expand Down Expand Up @@ -265,12 +265,8 @@ package export::generic;
my $self = shift;
my $arg = shift;
if (!defined $self->{$arg}) {
# Config option?
my $val = rc_arg($arg, $self);
# Use the default for this object
$val = $self->{'defaults'}{$arg} unless (defined $val);
# Look for a config option, or a commandline option
$self->{$arg} = arg($arg, $val);
# Look for a config option, a commandline option, or the code-specified default
$self->{$arg} = arg($arg, $self->{'defaults'}{$arg});
}
return $self->{$arg};
}
Expand Down
11 changes: 9 additions & 2 deletions trunk/nuv_export/cli.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
#Last Updated: 2005.03.09 (xris)
#Last Updated: 2005.03.31 (xris)
#
# cli.pm
#
Expand Down Expand Up @@ -169,7 +169,14 @@ package nuv_export::cli;
# Retrieve the value of a commandline argument
sub arg {
my ($arg, $default) = @_;
return defined($args{$arg}) ? $args{$arg} : $default;
# Commandline preference/override
return $args{$arg} if (defined($args{$arg}));
# Load rc preference
$args{$arg} = rc_arg($arg);
# Return the rc preference, or the passed-in default value
return defined($args{$arg})
? $args{$arg}
: $default;
}

# Retrieve the value of a nuvexportrc argument
Expand Down
2 changes: 1 addition & 1 deletion trunk/nuvexport
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Last Updated: 2005.02.28 (xris)

# Version
$VERSION = '0.2 cvs20050311';
$VERSION = '0.2 0.20050331.cvs';

# Autoflush buffers
$|++;
Expand Down
2 changes: 1 addition & 1 deletion trunk/nuvexport.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name: nuvexport
Version: 0.2
Release: cvs20050311
Release: 0.20050331.cvs
License: GPL
Summary: mythtv nuv video file conversion script
URL: http://forevermore.net/nuvexport/
Expand Down
7 changes: 7 additions & 0 deletions trunk/nuvexportrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,15 @@
#
# Setting underscores to yes will convert whitespace in filenames to an
# underscore character (which some people seem to prefer)
#
underscores=no

#
# Setting require_cutlist to yes will tell nuvexport to show only those
# recordings that have a cutlist
#
require_cutlist=yes

</nuvexport>

#
Expand Down

0 comments on commit fd8f177

Please sign in to comment.