Skip to content

Commit

Permalink
updated module version
Browse files Browse the repository at this point in the history
  • Loading branch information
Bas-Man committed May 1, 2019
1 parent ccc9176 commit 0552d34
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions lib/File/TVShow/Organize.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require Exporter;

our @ISA = qw(Exporter);

our $VERSION = '0.32.1';
our $VERSION = '0.34';

# Preloaded methods go here.

Expand Down Expand Up @@ -181,7 +181,6 @@ sub process_new_shows {
# next if ($file !~ m/s\d\de\d\d/i); # skip if SXXEXX is not present in file name
my $showData;
# Extract show name, Season and Episode
#$showData = Video::Filename::new($file);
$showData = File::TVShow::Info->new($file);
next if !$showData->is_tv_show();
# Apply special handling if the show is in the _exceptionList
Expand Down Expand Up @@ -220,13 +219,13 @@ sub were_there_errors {

my ($self) = @_;

# Check if there has been any files that Video::Filename could not handle
# Check if there has been any files that File::TVShow::Info could not handle
# Check that the hash UnHandledFileNames has actually been created before
# checking that is is not empty or you will get an error.
if ((defined $self->{UnhandledFileNames}) && (keys $self->{UnhandledFileNames})) {
if ((defined $self->{UnhandledFileNames}) && (keys %{$self->{UnhandledFileNames}})) {
print "\nThere were unhandled files in the directory\n";
print "consider adding them to the exceptionList\n###\n";
foreach my $key (keys $self->{UnhandledFileNames}) {
foreach my $key (keys %{$self->{UnhandledFileNames}}) {
print "### " . $key . " ==> " . $self->{UnhandledFileNames}{$key} . "\n";
}
print "###\n";
Expand Down Expand Up @@ -359,7 +358,7 @@ sub move_show {

# create the command string to be used in system() call
# Set --progress if verbose is true
my $command = "rsync -ta ";
my $command = "/usr/bin/env rsync -ta ";
$command = $command . "--progress " if ($self->verbose);
$command = $command . $source . $file . " " . $destination;

Expand Down Expand Up @@ -411,6 +410,10 @@ __END__
File::TVShow::Organize - Perl module to move TVShow Files into their
matching Show Folder on a media server.
=head1 VERSION
VERSION 0.34
=head1 SYNOPSIS
use File::TVShow::Organize;
Expand Down Expand Up @@ -491,7 +494,7 @@ Works on Mac OS and *nix systems.
If Exceptions is passed to the method we load this data into a hash
for later use to handle naming complications.
E.G file: S.W.A.T.2017.S01E01.avi is not handled correctly by Video::Filename
E.G file: S.W.A.T.2017.S01E01.avi is not handled correctly by File::TVShow::Info
so we need to know to handle this differently. Exceptions is an optional
parameter and can be left out when calling new().
Currently Exceptions is a scalar string.
Expand Down Expand Up @@ -598,7 +601,7 @@ Works on Mac OS and *nix systems.
Example:
my $file = Video::Filename::new("Life.on.Mars.(US).S01E01.avi", { spaces => '.' });
my $file = File::TVShow::Info->new("Life.on.Mars.(US).S01E01.avi");
# $file->{name} now contains "Life on Mars (US)"
# $file->{season} now contains "01"
Expand Down Expand Up @@ -835,13 +838,13 @@ I have not tested anycases where file names might be
=item L<File::Copy>
=item L<Video::Filename>
=item L<File::TVShow::Info>
=back
=head1 AUTHOR
Adam Spann, E<lt>[email protected]E<gt>
Adam Spann, E<lt>[email protected]E<gt>
=head1 COPYRIGHT AND LICENSE
Expand Down

0 comments on commit 0552d34

Please sign in to comment.