Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bas-Man committed Mar 11, 2019
2 parents 259c819 + 5656621 commit fd15186
Show file tree
Hide file tree
Showing 14 changed files with 235 additions and 242 deletions.
8 changes: 6 additions & 2 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Revision history for Perl extension Video::File::TVShow::Import.
seasonFolder()

0.25 Friday May 11th 2018
- Documentaion update. No Changes to the code base implemented
- Documentation update. No Changes to the code base implemented
- Also need to remember to update this file when changes are actually
made to the version releases :)

Expand All @@ -30,4 +30,8 @@ Revision history for Perl extension Video::File::TVShow::Import.
- Added the Carp Module to the list of required modules. Its been in use for
a while.
- Removed exceptionList as a global variable. We now pass a named variable
to new()
to new()
- Migrated to snake_case in order to fit normal perl coding style.
- Changed Import to Organize
- Changed import_* to move_* for methods.
- Dropped Video:: from the module naming. It now more simply File::TVShow::*
18 changes: 9 additions & 9 deletions Examples/basic.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,34 @@
use strict;
use warnings;

use Video::File::TVShow::Import;
use File::TVShow::Organize;

my $obj = Video::File::TVShow::Import->new({
my $obj = File::TVShow::Organize->new({
Exceptions => 'S.W.A.T.2017:S.W.A.T 2017'
});

$obj->newShowFolder("/tmp/");
$obj->showFolder("/absolute/path/to/TV Shows");
$obj->new_show_folder("/tmp/");
$obj->show_folder("/absolute/path/to/TV Shows");

if((!defined $obj->newShowFolder()) || (!defined $obj->showFolder())) {
if((!defined $obj->new_show_folder()) || (!defined $obj->show_folder())) {
print "Verify your paths. Something is wrong\n";
exit;
}

# Create a hash for matching file name to Folders
$obj->createShowHash();
$obj->create_show_hash();

# Delete files after processing. The default is to rename the files by appending ".done"
$obj->delete(1);

# Do not create sub folders under the the show's parent folder. All files should be dumped
# into the parent folder. The default is to create season folders.
$obj->seasonFolder(0);
$obj->season_folder(0);

# Batch process a folder containing TV Show files
$obj->processNewShows();
$obj->process_new_shows();

# Report any file names which could not be handled automatically.
$obj->wereThereErrors();
$obj->were_there_errors();

#end of program
22 changes: 11 additions & 11 deletions Examples/myPersonalCode.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@

# This is used during development to confirm code works in my local environment.
# before I do a make install for the module.
#use lib "/Users/aspann/dev/BAS-TVShow-Import/lib/";
#use lib "/Users/aspann/dev/BAS-TVShow-Organize/lib/";

# Note I do not personally do any case testing as I have been using this code for some time and am very
# familiar with its operation.
# Note I do not personally do any case testing as I have been using this code
# for some time and am very familiar with its operation.

use strict;
use warnings;

use Video::File::TVShow::Import;
use File::TVShow::Organize;

my $obj = Video::File::TVShow::Import->new({
my $obj = File::TVShow::Organize->new({
Exceptions => 'S.W.A.T.2017:S.W.A.T 2017'
});

$obj->newShowFolder("/Volumes/Drobo/completed");
$obj->showFolder("/Volumes/Drobo/TV Shows");
$obj->new_show_folder("/Volumes/Drobo/completed");
$obj->show_folder("/Volumes/Drobo/TV Shows");

$obj->createShowHash();
$obj->create_show_hash();

$obj->processNewShows();
$obj->process_new_shows();

# if you wish to use the plex command here you will need to check what number matches your TV Library to trigger
# a reload of the correct items.
# if you wish to use the plex command here you will need to check what number
# matches your TV Library to trigger a reload of the correct items.
# See https://support.plex.tv/articles/201242707-plex-media-scanner-via-command-line/ for details.
my $plexCommand = "/Applications/Plex\\ Media\\ Server.app/Contents\\/MacOS\\/Plex\\ Media\\ Scanner -s -c 1 > /dev/null 2>&1";

Expand Down
2 changes: 1 addition & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ t/07TestRecursiveImport.t
t/10Clean.t
t/test-data.tar.gz
t/tv-shows.tar.gz
lib/Video/File/TVShow/Import.pm
lib/File/TVShow/Organize.pm
8 changes: 4 additions & 4 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
NAME => 'Video::File::TVShow::Import',
VERSION_FROM => 'lib/Video/File/TVShow/Import.pm', # finds $VERSION
NAME => 'File::TVShow::Organize',
VERSION_FROM => 'lib/File/TVShow/Organize.pm', # finds $VERSION
PREREQ_PM => { 'Video::Filename' => 0,
'File::Path' => 0,
'File::Path' => 0,
'File::Copy' => 0,
'Test::Carp' => 0,
'Carp' => 0 }, # e.g., Module::Name => 1.1
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/Video/File/TVShow/Import.pm', # retrieve abstract from module
(ABSTRACT_FROM => 'lib/File/TVShow/Organize.pm', # retrieve abstract from module
AUTHOR => 'Adam Spann <[email protected]>') : ()),
)
22 changes: 11 additions & 11 deletions README
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Video-File-TVShow-Import version 0.31
File-TVShow-Organize version 0.31
============================

This module makes it easier to import TV Show files into the correct Show
This module makes it easier to move TV Show files into the correct Show
folder and also place them in to the correct season or specials folder.
This may be of use if you have a large media server which you are trying to
keep organised.
Expand All @@ -25,22 +25,22 @@ Example Usage:
use strict;
use warnings;

use Video::File::TVShow::Import;
use File::TVShow::Organize;

my $obj = Video::File::TVShow::Import->new( {
my $obj = File::TVShow::Organize->new( {
Exceptions => 'S.W.A.T.2017:S.W.A.T 2017|Other:other' }
);

$obj->newShowFolder("/tmp/");
$obj->showFolder("/absolute/path/to/TV Shows");
$obj->new_show_folder("/tmp/");
$obj->show_folder("/absolute/path/to/TV Shows");

if((!defined $obj->newShowFolder()) || (!defined $obj->showFolder())) {
if((!defined $obj->new_show_folder()) || (!defined $obj->show_folder())) {
print "Verify your paths. Something in wrong\n";
exit;
}

# Create a hash for matching file name to Folders
$obj->createShowHash();
$obj->create_show_hash();

# Delete files after processing.
The default is to rename the files by appending ".done"
Expand All @@ -49,13 +49,13 @@ Example Usage:
# Do not create sub folders under the the show's parent folder.
All files should be dumped # into the parent folder. The default is to create
season folders.
$obj->seasonFolder(0);
$obj->season_folder(0);

# Batch process a folder containing TV Show files
$obj->processNewShows();
$obj->process_new_shows();

# Report any file names which could not be handled automatically.
$obj->wereThereErrors();
$obj->were_there_errors();

#end of program

Expand Down
2 changes: 0 additions & 2 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
These items should be completed before the next major push to GitHub or local origin.
<<<<<<< HEAD
Update Testing to make it more organised again. Its gotten a bit out of control.

Look at using Path::Tiny for path and file handling.
>>>>>>> origin/development
Loading

0 comments on commit fd15186

Please sign in to comment.