|
@@ -465,10 +465,10 @@ sub delTor($) {
|
|
|
|
|
|
|
|
sub guessExt($) {
|
|
sub guessExt($) {
|
|
|
my ($file) = @_;
|
|
my ($file) = @_;
|
|
|
|
|
+ my $ext = '';
|
|
|
|
|
|
|
|
# Believe most non-avi file extensions without checking
|
|
# Believe most non-avi file extensions without checking
|
|
|
# It's mostly "avi" that lies, and the checks are expensive
|
|
# It's mostly "avi" that lies, and the checks are expensive
|
|
|
- my $ext = '';
|
|
|
|
|
{
|
|
{
|
|
|
my $orig_ext = basename($file);
|
|
my $orig_ext = basename($file);
|
|
|
$orig_ext =~ s/^.*\.(\w{2,3})$/$1/;
|
|
$orig_ext =~ s/^.*\.(\w{2,3})$/$1/;
|
|
@@ -478,6 +478,11 @@ sub guessExt($) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ # Deal with the weird case of text files labeled as .txt.mp4
|
|
|
|
|
+ if ($file =~ /\.txt\.mp4$/i) {
|
|
|
|
|
+ $ext = 'txt';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
# Ask movInfo.pl about the demuxer
|
|
# Ask movInfo.pl about the demuxer
|
|
|
if (!$ext) {
|
|
if (!$ext) {
|
|
|
my $demux = '';
|
|
my $demux = '';
|
|
@@ -541,10 +546,10 @@ sub processFile($$) {
|
|
|
return -1;
|
|
return -1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- # Skip RARBG.com files with success code -- always extra but not a problem
|
|
|
|
|
- if ($filename =~ /RARBG\.com/i) {
|
|
|
|
|
|
|
+ # Skip known packaging files files with success code
|
|
|
|
|
+ if ($ext =~ /txt/i || $filename =~ /RARBG\.com/i) {
|
|
|
if ($DEBUG) {
|
|
if ($DEBUG) {
|
|
|
- print STDERR 'Declining to save RARBG.com file: ' . $filename . "\n";
|
|
|
|
|
|
|
+ print STDERR 'Declining to save extra file: ' . $filename . "\n";
|
|
|
}
|
|
}
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|