]> git.mjollnir.org Git - scripts.git/commitdiff
renametv.pl - workaround for 24 which has a stupid syntax
authorPenny Leach <penny@mjollnir.org>
Wed, 24 Feb 2010 21:36:29 +0000 (22:36 +0100)
committerPenny Leach <penny@mjollnir.org>
Wed, 24 Feb 2010 21:36:29 +0000 (22:36 +0100)
bin/renametv.pl

index fb336c9375959a3d95bdbcb74c7e14d074b8e640..595114f5a018f3102c9085e0cb499cac12106556 100755 (executable)
@@ -31,12 +31,12 @@ while (<$inputdir/*>) {
     s/'//g;
     s/-/_/g;
     s/[\[\]]//g;
-    s/[S|s]?(\d+)\.?[E|e|x|X]?(\d+)/$1$2/;
+    s/\.[S|s]?(\d+)\.?[E|e|x|X]?(\d+)\./.$1$2./;
     s/\.0/./g;
     foreach my $bad (@usualsuspects) {
         s/(\[|\.|_|-)?$bad(\]|-)?//g;
     }
-    if (/^(.*\/(?!.*\/))([a-z_.]*)((?:_|\.)[0-9]*)(?:_|\.)+([a-z_.,&]*)$/) {
+    if (/^(.*\/(?!.*\/))([a-z0-9_.]*)((?:_|\.)[0-9]*)(?:_|\.)+([a-z_.,&]*)$/) {
         my ($path, $series, $epno, $title) = ($1, $2, $3, $4);
         $series =~ s/(_|\.)//g;
         $epno =~ s/.(.*)/$1/g;