changeset 259:1e214a53237d

Even more rules.
author Edho Arief <edho@myconan.net>
date Thu, 24 Nov 2011 09:42:16 +0700
parents 0cd601956a9a
children 6bdfe1746bb1
files bin/ren
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bin/ren	Sun Nov 20 23:21:45 2011 +0700
+++ b/bin/ren	Thu Nov 24 09:42:16 2011 +0700
@@ -24,6 +24,9 @@
   $newname =~ s/(\[ACX\])(Spiral)( - \d+) - .* (\[[a-f0-9]{8}\]\.mkv)$/$1 $2$3 $4/i;
   $newname =~ s/^Genesis of Aquarion - (\d+) \[3xR\]\[Blu-ray.720p.H264.FLAC.AC3\](v2|)/[3xR] Genesis of Aquarion - $1 [$2 720p BD]/;
   $newname =~ s/^Otogi Zoshi Act\.(\d+)\[x264 AAC\]\[SSP-Corp\]/[SSP-Corp] Otogi Zoshi - $1 /;
+  $newname =~ s/(Ending) (\(Clean\)) - 0(\d+)/$1 $3 $2/;
+  $newname =~ s/(Opening) (\(Clean\))0(\d+)/$1 $3 $2/;
+  $newname =~ s/ A\+Channel / A Channel - Special /;
   $newname =~ s/Onii-chan no Koto Nanka Zenzen Suki Janain Dakara ne!! - (\d+) \[Uncut\]/Onii-chan no Koto Nanka Zenzen Suki Janain Dakara ne!! - $1 /;
   $newname =~ s/^(Ayashi no Ceres|Chikyuu Shoujo Arjuna|Futari wa Precure  Splash Star) - (\d+)\[\d+\] - .*(\[DVD\])(\[[^]]+\])(\[[a-f0-9]{8}\]\.[^.]+)$/$4 $1 - $2 $3$5/i;
   $newname =~ s/^(Futari wa Precure  Splash Star) - (C\d+)\[\d+\] - .*(\[DVD\])(\[[^]]+\])(\[[a-f0-9]{8}\]\.[^.]+)$/$4 $1 - $2 $3$5/i;
@@ -35,6 +38,7 @@
   $newname =~ s/^cor\.extras\.infinite\.ryvius\.ryvius\.illusion(\d+)\.mini-episode(\d+)\./[cor] Infinite Ryvius - Ryvius Illusion $1 - Mini Episode $2 /;
   $newname =~ s/^cor\.extras\.infinite\.ryvius\.ryvius\.illusion(\d+)\.(introduction|ending)\./[cor] Infinite Ryvius - Ryvius Illusion $1 - $2 /;
   $newname =~ s/ (Ryvius Illusion \d+) - ending / $1 - Ending /;
+  $newname =~ s/ (Mitsudomoe Zouryouchuu\! - )0/ $1/;
   $newname =~ s/ (Ryvius Illusion \d+) - introduction / $1 - Introduction /;
   $newname =~ s/^Arigatou\.Tokyo\.Majin\.Ep(\d+)\./[Arigatou] Tokyo Majin - $1 /;
   $newname =~ s/ (Inazuma Eleven - )(\d{2}) / $1 0$2 /;
@@ -279,9 +283,9 @@
   $newname =~ s/(\(|\[) *(h\.264-Hi10P|720x480|10-?bit|10bit 480p H264|640x360|640x360 H264 AAC|h264\.aac|hi10p|10bit|\d+th Release|x264\.aac|xvid|divx5\.2\.1|divx5\.1|divx5\.05|divx5\.1\.1|h\.?264 AC3|848x480|H264 848x480|h264-480p AAC|h\.264-480p) *(\)|\])//i;
   $newname =~ s/\[(DVD 10bit)\]/[DVD]/i;
   $newname =~ s/(\(|\[) *(DVD H264 640x480|DVD H264 720x480 AAC|DVD 704x480 H264 AC3|DVD 704x480|DVDRip\.Xvid\.864x480\.Vorbis|DVD H264 848x480|DVD 720x480|DVD H264 720x480|DVD, wmv, mp3) *(\)|\])/[DVD]/i;
-  $newname =~ s/(\(|\[) *(BD\]\[1080p-FLAC|1920x1080 Hi10p h264 AAC|BD 1920x1080 x264 AAC|BD 1080p Hi10P|BDRip 1080p x264 FLAC|BD-1080p-|BD-1080p-FLAC|1920x1038 Blu-Ray FLAC|1920x1080 Blu-Ray FLAC|1920x1080 h264 BD FLAC|1920x1080 BD|BD\.1080p\.FLAC|BD 1080p H\.264 AAC 5\.1|BD 1080p) *(\)|\])/[1080p BD]/i;
+  $newname =~ s/(\(|\[) *(BD\]\[1080p-FLAC|BD 1080|1920x1080 Hi10p h264 AAC|BD 1920x1080 x264 AAC|BD 1080p Hi10P|BDRip 1080p x264 FLAC|BD-1080p-|BD-1080p-FLAC|1920x1038 Blu-Ray FLAC|1920x1080 Blu-Ray FLAC|1920x1080 h264 BD FLAC|1920x1080 BD|BD\.1080p\.FLAC|BD 1080p H\.264 AAC 5\.1|BD 1080p) *(\)|\])/[1080p BD]/i;
   $newname =~ s/(\(|\[) *(Hi10P 1280x720 H264|Hi10P 1280x720|1280x720 Hi10P|1280x720 5\.1|1280x720 x264 AAC|1280x720 H264 AAC|720p H264 AAC|1280x720|1280x720 H\.?264 AAC) *(\)|\])/[720p]/i;
-  $newname =~ s/(\(|\[) *(BDrip 720p Vorbis|BD 720p Hi10P AAC|BD, 720p,|BD 720p H264-AAC|BDRip 720p|BD, 720p, ,|1280x720 BD|BD 1280x720 H264 AAC|BD 720p|BD 720p FLAC|BD 1280x720 H264 AAC) *(\)|\])/[720p BD]/i;
+  $newname =~ s/(\(|\[) *(BD, 720, 10bit, AAC|BDrip 720p Vorbis|BD 720p Hi10P AAC|BD, 720p,|BD 720p H264-AAC|BDRip 720p|BD, 720p, ,|1280x720 BD|BD 1280x720 H264 AAC|BD 720p|BD 720p FLAC|BD 1280x720 H264 AAC) *(\)|\])/[720p BD]/i;
   $newname =~ s/(\(|\[) *(BD 540p) *(\)|\])/[BD]/i;
   $newname =~ s/(\(|\[) *(1024x576|H264 1024x576) *(\)|\])/[576p]/i;
   $newname =~ s/(\(|\[) *(1920x1080) *(\)|\])/[1080p]/i;
@@ -460,6 +464,7 @@
   #SAFE CLEANUPS
   $newname =~ s/ +/ /g;
   $newname =~ s/^ +//;
+  $newname =~ s/ *(\.[^ ]+$)/$1/;
   $newname =~ s/(- )+/- /;
   $newname =~ s/^\[N - F\]/[N-F]/;
   $newname =~ s/^\[K-F & AKUPX\]/[K-F AKUPX]/;