comparison bin/ren @ 86:4a22703b183c

Merge.
author Edho Prima Arief <me@myconan.net>
date Sat, 09 Jul 2011 15:39:00 +0700
parents 428c308e609d 14435bd3f01c
children c884853b25d1
comparison
equal deleted inserted replaced
83:b65925c07cf6 86:4a22703b183c
10 print(qq(Could not find file "$_", skipping\n)) and next() unless -e $_; 10 print(qq(Could not find file "$_", skipping\n)) and next() unless -e $_;
11 my $newname = $_; 11 my $newname = $_;
12 #START HERE 12 #START HERE
13 $newname =~ s/_/ /g; 13 $newname =~ s/_/ /g;
14 #TITLE AND NAMES 14 #TITLE AND NAMES
15 $newname =~ s/\[WPP & T-N\]/[WPP T-N]/;
16 $newname =~ s/\[Elysium\]K-ON!!\.EP(\d+)\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 [1080p BD]/i;
17 $newname =~ s/\[Elysium\]K-ON!!\.(ED|OP)(\d+)\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 $2 [1080p BD]/i;
18 $newname =~ s/\[Elysium\]K-ON!!\.SP\d+\[EP(\d+)\]\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 [1080p BD]/i;
19 $newname =~ s/^\[wpp\]digimon frontier /[wpp] Digimon Frontier /i;
20 $newname =~ s/^\[ACX\]Fantastic Children - (\d+) .*/[ACX] Fantastic Children - $1.mkv/i;
21 $newname =~ s/\[a-s\] sakigake!! cromartie high school - (\d+) - .* /[a-S] Sakigake!! Cromartie High School - $1 /;
22 $newname =~ s/zx\.tenchi-universe\./[zx] Tenchi Universe - /;
23 $newname =~ s/\[Saizen & Shinsen-Subs\]/[Saizen-SHS]/i;
24 $newname =~ s/ ro-kyu-bu! / Ro-Kyu-Bu! /i;
25 $newname =~ s/ Ore no Imouto ga Konna ni Kawaii Wake ga Nai / Ore no Imouto /i;
26 $newname =~ s/ no 6 / No. 6 /i;
27 $newname =~ s/ THE iDOLM\@STER / The iDOLM\@STER /i;
28 $newname =~ s/^- (\d+) - (\[neo1024\])/$2 Luping III S3 - $2/i;
29 $newname =~ s/ Luping III S3 / Lupin III S3 /i;
30 $newname =~ s/( Transformers Headmasters - \d+) - .*\[/$1 [/i;
31 $newname =~ s/^cor\.tv\.getbackers\.(\d+)\./[cor] GetBackers - $1 /;
32 $newname =~ s/^cor\.extras\.getbackers\.(opening|ending)(\d+)\./[cor] GetBackers - $1 $2 /;
33 $newname =~ s/^Revolutionary Girl Utena /[Henshin] Revolutionary Girl Utena /;
34 $newname =~ s/His and Her Circumstances/His and Her Circumstances/i;
35 $newname =~ s/Magical Girl Madoka Magica/Puella Magi Madoka Magica/i;
36 $newname =~ s/ Pretty Rhythm Aurora Dream / Pretty Rhythm - Aurora Dream /i;
37 $newname =~ s/(\[dvdrip\] Transformers \(1984\) -) E(\d+) .*(\.avi)/$1 $2 $3/;
38 $newname =~ s/ Highschool of the Dead / High School of the Dead /i;
39 $newname =~ s/LOGH Gaiden 2 E(\d+) .*(\.avi|\.mkv)/Legend of Galactic Heroes Gaiden 2 - $1$2/i;
40 $newname =~ s/^\[RaX\] *Kiba - (\d+) - .* (\[v2\] \[|\[)/[RaX] Kiba - $1 $2/;
41 $newname =~ s/ (Gosick - \d+) \(Batch\) / $1 /;
42 $newname =~ s/ Clannad - After Story - / Clannad After Story - /;
43 $newname =~ s/^Mahoujin Guruguru TV2 - Doki Doki Densetsu Ep(\d+) \((Chamelenia)\)/[Chamelenia] Mahoujin Guruguru 2 - Doki Doki Densetsu - $1/i;
44 $newname =~ s/\.divx5\.ogm$/.ogm/;
45 #$newname =~ s/\[(neo1024)\] Lupin III - (\d+) - .+ \[/[$1] Lupin III S2 - $2 [/;
46 $newname =~ s/ Lupin S2 - / Lupin III S2 - /;
47 $newname =~ s/ Prince of Tennis (\d+)/ Prince of Tennis - $1/i;
48 $newname =~ s/ Boogiepop - / Boogiepop Phantom - /i;
49 $newname =~ s/ Aika Zero OVA / Aika Zero /i;
50 $newname =~ s/^\[A-BT&Pakapuka\]PopoloCrois 2003 Ep/[A-BT Pakapuka] PopoloCrois (2003) - /;
51 $newname =~ s/^\[A-BT&Pakapuka\] PopoloCrois Story 1998 /[A-BT Pakapuka] PopoloCrois (1998) - /;
52 $newname =~ s/ (Pollyanna|Happy Kappi) Episode (\d+) / $1 - $2 /;
53 $newname =~ s/\(G P\) Now and Then Here and There \(R2J\)/[G P] Now and Then Here and There - /;
15 $newname =~ s/^\[Jumonji-Giri\]\[Soldats\]\[AonE&HQA\] D\.C\. Da Capo /[Jumonji-Giri] Da Capo /i; 54 $newname =~ s/^\[Jumonji-Giri\]\[Soldats\]\[AonE&HQA\] D\.C\. Da Capo /[Jumonji-Giri] Da Capo /i;
55 $newname =~ s/\[A-Flux&Lunar\]/[A-Flux Lunar]/i;
56 $newname =~ s/^(Mushishi) - (\d+) - .* - (\[niizk\])/$3 $1 - $1/;
57 $newname =~ s/^(Saikano) (\d+)\[h\.264-AAC\](\[SSP-Corp\])/$3 $1 - $2 /;
16 $newname =~ s/^PitaTen.* Ep (\d+) .*\.avi/[Hnk] Pita Ten - $1.avi/; 58 $newname =~ s/^PitaTen.* Ep (\d+) .*\.avi/[Hnk] Pita Ten - $1.avi/;
17 $newname =~ s/^\[a-S\] Inuyasha - (\d+|\d+-\d+) /Inuyasha - $1 [a-S]/; 59 $newname =~ s/^\[a-S\] Inuyasha - (\d+|\d+-\d+) /Inuyasha - $1 [a-S]/;
18 $newname =~ s/\[DVD\]\[AHQ\]/[AHQ][DVD]/; 60 $newname =~ s/\[DVD\]\[AHQ\]/[AHQ][DVD]/;
19 $newname =~ s/\[subdesu\]/[SubDesu]/i; 61 $newname =~ s/\[subdesu\]/[SubDesu]/i;
20 $newname =~ s/ Zettai Shougeki - Platonic Heart / Zettai Shougeki /i; 62 $newname =~ s/ Zettai Shougeki - Platonic Heart / Zettai Shougeki /i;
21 $newname =~ s/ A-Channel / A Channel /i; 63 $newname =~ s/ A-Channel / A Channel /i;
22 $newname =~ s/^mars daybreak /[V-A] Mars Daybreak - /; 64 $newname =~ s/^mars daybreak /[V-A] Mars Daybreak - /;
23 $newname =~ s/ Shuffle! Episode / Shuffle! /; 65 $newname =~ s/ Shuffle! Episode / Shuffle! /;
66 $newname =~ s/ A-Channel / A Channel /;
67 $newname =~ s/ Moshidora \(Moshi Koko Yakyu no Joshi Manager ga Drucker no Management o Yondara\) / Moshidora /;
24 $newname =~ s/^\[ZA\]\.Saint\.Seiya\.Episode\.(\d+)\.DVDrip\.\[X264\.AAC\(Jpn-Fre\)\.Sub\(Fre-Eng\)\.Chap\]\.mkv$/[D-YFI] Saint Seiya - $1 [DVD].mkv/; 68 $newname =~ s/^\[ZA\]\.Saint\.Seiya\.Episode\.(\d+)\.DVDrip\.\[X264\.AAC\(Jpn-Fre\)\.Sub\(Fre-Eng\)\.Chap\]\.mkv$/[D-YFI] Saint Seiya - $1 [DVD].mkv/;
25 $newname =~ s/^HajimeNoIppo.*Round(\d+)-.*\(anime-mx\)/[Anime-MX] Fighting Spirit - $1 /; 69 $newname =~ s/^HajimeNoIppo.*Round(\d+)-.*\(anime-mx\)/[Anime-MX] Fighting Spirit - $1 /;
26 $newname =~ s/^(\[ACX\])(Final Fantasy Unlimited) - (\d+) .*\[ALI\] /$1 $2 - $3 /; 70 $newname =~ s/^(\[ACX\])(Final Fantasy Unlimited) - (\d+) .*\[ALI\] /$1 $2 - $3 /;
27 $newname =~ s/^\[a-s\] inuyasha - (\d+-\d+) rs2 /[a-S] Inuyasha - $1 /; 71 $newname =~ s/^\[a-s\] inuyasha - (\d+-\d+) rs2 /[a-S] Inuyasha - $1 /;
28 $newname =~ s/^(\[Kira-Fansub\]) Uchuu no (Stellvia) /$1 $2 /; 72 $newname =~ s/^(\[Kira-Fansub\]) Uchuu no (Stellvia) /$1 $2 /;
29 $newname =~ s/^(\[RaX\])(Chobits) - (\d+`\d) .*\(x264 aac\) /$1 $2 - $3 /; 73 $newname =~ s/^(\[RaX\])(Chobits) - (\d+`\d) .*\(x264 aac\) /$1 $2 - $3 /;
30 $newname =~ s/ Maria( |†)Holic / Maria+Holic /i; 74 $newname =~ s/ Maria( |†)Holic / Maria+Holic /i;
75 $newname =~ s/ Pollyanna Episode / Pollyanna /;
31 $newname =~ s/^Legend of Galactic Heroes - (\d+) \(([A-F0-9]{8})\) \[Central Anime\]/[Central Anime] Legend of Galactic Heroes - $1 [$2]/; 76 $newname =~ s/^Legend of Galactic Heroes - (\d+) \(([A-F0-9]{8})\) \[Central Anime\]/[Central Anime] Legend of Galactic Heroes - $1 [$2]/;
32 $newname =~ s/\[Hnk\]/[HnK]/; 77 $newname =~ s/\[Hnk\]/[HnK]/;
33 $newname =~ s/^Inuyasha - (\d+|\d+-\d+)\[167\] - .*(\[DVD\]\[AHQ\])/Inuyasha - $1 $2/; 78 $newname =~ s/^Inuyasha - (\d+|\d+-\d+)\[167\] - .*(\[DVD\]\[AHQ\])/Inuyasha - $1 $2/;
34 $newname =~ s/^Saint Seiya Hades OVA - (\d+) \[(AonE-SpA|SpA)\]/[$2] Saint Seiya Hades OVA - $1/; 79 $newname =~ s/^Saint Seiya Hades OVA - (\d+) \[(AonE-SpA|SpA)\]/[$2] Saint Seiya Hades OVA - $1/;
35 $newname =~ s/\[\d+\] Saint Seiya Hades OVA - (\d+)/[SpA] Saint Seiya Hades OVA - $1/; 80 $newname =~ s/\[\d+\] Saint Seiya Hades OVA - (\d+)/[SpA] Saint Seiya Hades OVA - $1/;
52 $newname =~ s/ Ep(\d+)v3 \[R2 Video\]/ - $1 [v3]/; 97 $newname =~ s/ Ep(\d+)v3 \[R2 Video\]/ - $1 [v3]/;
53 $newname =~ s/ Brighter Than The Dawning Blue - Crescent Love Ep(\d+) Subbed / Brigher Than The Dawning Blue - Crescent Love - $1 /; 98 $newname =~ s/ Brighter Than The Dawning Blue - Crescent Love Ep(\d+) Subbed / Brigher Than The Dawning Blue - Crescent Love - $1 /;
54 $newname =~ s/ Brighter Than The Dawning Blue - Crescent Love - (\d+) Subbed / Brigher Than The Dawning Blue - Crescent Love - $1 /; 99 $newname =~ s/ Brighter Than The Dawning Blue - Crescent Love - (\d+) Subbed / Brigher Than The Dawning Blue - Crescent Love - $1 /;
55 $newname =~ s/ Character Monologue 0/ Character Monologue /; 100 $newname =~ s/ Character Monologue 0/ Character Monologue /;
56 $newname =~ s/Ookami-san\.to\.Shichinin\.no\.Nakama-tachi\.EP(\d+)\(BD\.1080p\.AAC\)/Ookami-san - $1 [1080p BD]/; 101 $newname =~ s/Ookami-san\.to\.Shichinin\.no\.Nakama-tachi\.EP(\d+)\(BD\.1080p\.AAC\)/Ookami-san - $1 [1080p BD]/;
57 $newname =~ s/Ore.?tachi ni tsubasa wa nai /Oretachi ni Tsubasa wa nai /i; 102 $newname =~ s/Ore.?tachi ni tsubasa wa nai /Oretachi ni Tsubasa wa Nai /i;
58 $newname =~ s/\[anime-rg . ray=out\]/[anime-rg ray=out]/; 103 $newname =~ s/\[anime-rg . ray=out\]/[anime-rg ray=out]/;
59 $newname =~ s/^Arigatou\.Soul\.Eater\.Ep(\d+)\. \[x264\.AAC\]/[Arigatou] Soul Eater - $1 /; 104 $newname =~ s/^Arigatou\.Soul\.Eater\.Ep(\d+)\. \[x264\.AAC\]/[Arigatou] Soul Eater - $1 /;
60 $newname =~ s/^\[Doremi\]\.HeartCatch\.PreCure!\.(\d+)\.\[1280x720\]\./[Doremi] HeartCatch PreCure! - $1 [720p]/; 105 $newname =~ s/^\[Doremi\]\.HeartCatch\.PreCure!\.(\d+)\.\[1280x720\]\./[Doremi] HeartCatch PreCure! - $1 [720p]/;
61 $newname =~ s/^\[Doremi-CureCom\]\.Suite\.PreCure!\.(\d+)\.\[1280x720\]\./[Doremi-CureCom] Suite PreCure! - $1 [720p]/; 106 $newname =~ s/^\[Doremi-CureCom\]\.Suite\.PreCure!\.(\d+)\.\[1280x720\]\./[Doremi-CureCom] Suite PreCure! - $1 [720p]/;
62 $newname =~ s/^\[Doremi\]\.Motto\.Ojamajo\.Doremi\.(\d+)\./[Doremi] Motto Ojamajo Doremi - $1 /; 107 $newname =~ s/^\[Doremi\]\.Motto\.Ojamajo\.Doremi\.(\d+)\./[Doremi] Motto Ojamajo Doremi - $1 /;
137 $newname =~ s/ A Certain Magical Index II / Toaru Majutsu no Index II /i; 182 $newname =~ s/ A Certain Magical Index II / Toaru Majutsu no Index II /i;
138 $newname =~ s/ TV Broadcast \[720p/ [LQ 720p/; 183 $newname =~ s/ TV Broadcast \[720p/ [LQ 720p/;
139 $newname =~ s/ ED(\d)/ - Ending $1 /; 184 $newname =~ s/ ED(\d)/ - Ending $1 /;
140 $newname =~ s/ OP(\d)/ - Opening $1 /; 185 $newname =~ s/ OP(\d)/ - Opening $1 /;
141 $newname =~ s/ ED / - Ending /; 186 $newname =~ s/ ED / - Ending /;
142 $newname =~ s/ NCED / - Ending (Clean) /; 187 $newname =~ s/ NCED / - Ending (Clean) /i;
143 $newname =~ s/ NCOP / - Opening (Clean)/; 188 $newname =~ s/ NCED(\d+) / - Ending $1 (Clean) /i;
189 $newname =~ s/ NCOP / - Opening (Clean)/i;
144 $newname =~ s/ OP / - Opening /; 190 $newname =~ s/ OP / - Opening /;
145 $newname =~ s/ - - / - /; 191 $newname =~ s/ - - / - /;
146 $newname =~ s/ Ep / /ig; 192 $newname =~ s/ Ep / /ig;
147 #GENERAL RULES 193 #GENERAL RULES
194 $newname =~ s/\(1280x720 x264 AAC\)/[720p]/i;
195 $newname =~ s/\( *(1920x1038 Blu-Ray FLAC|1920x1080 h264 BD FLAC|1920x1080 BD) *\)/[1080p BD]/i;
196 $newname =~ s/\(BD\.1080p\.FLAC\)/[1080p BD]/;
197 ##SLICED BREAD
198 $newname =~ s/\[(\d+th Release|xvid|divx5\.2\.1|divx5\.1|divx5\.05|divx5\.1\.1|h\.?264 AC3|848x480|H264 848x480|h264-480p AAC|h\.264-480p)\]//i;
199 $newname =~ s/\[(DVD 720x480|DVD H264 720x480)\]/[DVD]/i;
200 $newname =~ s/\[(1280x720 H264 AAC)\]/[720p]/i;
201 $newname =~ s/\[(BD 1280x720 H264 AAC)\]/[720p BD]/i;
202 $newname =~ s/\( *(BD 720p|BD 720p FLAC|BD 1280x720 H264 AAC) *\)/[720p BD]/i;
203 $newname =~ s/\( *(1280x720|1280x720 H\.?264 AAC) *\)/[720p]/i;
204 ##SLICED BREAD pt.2
205 $newname =~ s/(\d+)v(\d+)/$1 [v$2]/i;
206 $newname =~ s/\[BD\]\[1920x1080 H264-Flac\]/[1080p BD]/i;
148 $newname =~ s/\.DVD/[DVD]/; 207 $newname =~ s/\.DVD/[DVD]/;
149 $newname =~ s/ ~(.+)~ / - $1 /; 208 $newname =~ s/ ~(.+)~ / - $1 /;
150 $newname =~ s/v2 \(BD-1080p\) / [v2 1080p BD]/i; 209 $newname =~ s/v2 \(BD-1080p\) / [v2 1080p BD]/i;
151 $newname =~ s/v2 \(BD H264 1280x960 24fps AAC\) / [v2 960p BD]/i; 210 $newname =~ s/v2 \(BD H264 1280x960 24fps AAC\) / [v2 960p BD]/i;
152 $newname =~ s/BD 1280x720 FLAC\]/ 720p BD]/i; 211 $newname =~ s/BD 1280x720 FLAC\]/ 720p BD]/i;
156 $newname =~ s/\[BD 720p\]/[720p BD]/; 215 $newname =~ s/\[BD 720p\]/[720p BD]/;
157 $newname =~ s/ \(BD H264 1280x960 24fps AAC\) / [960p BD]/i; 216 $newname =~ s/ \(BD H264 1280x960 24fps AAC\) / [960p BD]/i;
158 $newname =~ s/ \(h\.264\) //i; 217 $newname =~ s/ \(h\.264\) //i;
159 $newname =~ s/\(xvid-mp3\)//i; 218 $newname =~ s/\(xvid-mp3\)//i;
160 $newname =~ s/\(BD 1920x1080 *\)/[1080p BD]/i; 219 $newname =~ s/\(BD 1920x1080 *\)/[1080p BD]/i;
220 $newname =~ s/\[BD 1080p\]/[1080p BD]/i;
161 $newname =~ s/v3 \(BD-1080p\) / [v3 1080p BD]/i; 221 $newname =~ s/v3 \(BD-1080p\) / [v3 1080p BD]/i;
162 $newname =~ s/v0 \[720p\]/ [v0 720p]/i; 222 $newname =~ s/v0 \[720p\]/ [v0 720p]/i;
163 $newname =~ s/v0 \[/ [v0 /i; 223 $newname =~ s/v0 \[/ [v0 /i;
224 $newname =~ s/\[BD 1920x1080\]/[1080p BD]/;
164 $newname =~ s/\[1080p - Bluray\]/[1080p BD]/; 225 $newname =~ s/\[1080p - Bluray\]/[1080p BD]/;
165 $newname =~ s/\[Bluray - 1080p\]/[1080p BD]/; 226 $newname =~ s/\[Bluray - 1080p\]/[1080p BD]/;
166 $newname =~ s/\[BD 1080p AAC\]/[1080p BD]/; 227 $newname =~ s/\[BD 1080p AAC\]/[1080p BD]/;
167 $newname =~ s/ \(BD-1080p\) / [1080p BD]/i; 228 $newname =~ s/ \(BD-1080p\) / [1080p BD]/i;
168 $newname =~ s/ \(720p, BD\) / [720p BD]/i; 229 $newname =~ s/ \(720p, BD\) / [720p BD]/i;
185 $newname =~ s/ \(1920x1080\) \[BD\]/ [1080p BD]/i; 246 $newname =~ s/ \(1920x1080\) \[BD\]/ [1080p BD]/i;
186 $newname =~ s/ \(960x720 Blu-Ray FLAC\) / [720p BD]/i; 247 $newname =~ s/ \(960x720 Blu-Ray FLAC\) / [720p BD]/i;
187 $newname =~ s/ \(1920x1080 Blu-Ray FLAC\) / [1080p BD]/i; 248 $newname =~ s/ \(1920x1080 Blu-Ray FLAC\) / [1080p BD]/i;
188 $newname =~ s/ \(1280x720 Blu-Ray FLAC\) / [720p BD]/i; 249 $newname =~ s/ \(1280x720 Blu-Ray FLAC\) / [720p BD]/i;
189 $newname =~ s/ \(1280x720 h264 BD FLAC\) / [720p BD]/i; 250 $newname =~ s/ \(1280x720 h264 BD FLAC\) / [720p BD]/i;
190 $newname =~ s/ \(704x480 DVD AAC\) / [DVD]/i; 251 $newname =~ s/\((704|720)x480 DVD (AC3|AAC)\)/ [DVD]/i;
191 $newname =~ s/ \(960x720\) \[BD\]/ [720p BD]/i; 252 $newname =~ s/ \(960x720\) \[BD\]/ [720p BD]/i;
192 $newname =~ s/\(704x396\)//; 253 $newname =~ s/\(704x396\)//;
193 $newname =~ s/\(1280x720\)/ [720p]/i; 254 $newname =~ s/\(1280x720\)/ [720p]/i;
194 $newname =~ s/\(1920x1080\)/ [1080p]/i; 255 $newname =~ s/\(1920x1080\)/ [1080p]/i;
195 $newname =~ s/\(720x480 DVD AC3\)/ [DVD]/i;
196 $newname =~ s/\(1024x576\)/ [576p]/i; 256 $newname =~ s/\(1024x576\)/ [576p]/i;
257 $newname =~ s/\[1024x576\]/[576p]/i;
258 $newname =~ s/\[v(\d+) 1024x576\]/[v$1 576p]/i;
197 $newname =~ s/\(1280x720 h264\)/ [720p]/i; 259 $newname =~ s/\(1280x720 h264\)/ [720p]/i;
198 $newname =~ s/\(1280x720 ?(h264|x264)?( aac)?\)/ [720p]/i; 260 $newname =~ s/\(1280x720 ?(h264|x264)?( aac)?\)/ [720p]/i;
199 $newname =~ s/\(720p\)/[720p]/i; 261 $newname =~ s/\(720p\)/[720p]/i;
200 $newname =~ s/\(1080p\)/[1080p]/i; 262 $newname =~ s/\(1080p\)/[1080p]/i;
201 $newname =~ s/\(1080p,BD\)/[1080p BD]/i; 263 $newname =~ s/\(1080p,BD\)/[1080p BD]/i;
204 $newname =~ s/\(DVD\)/ [DVD]/i; 266 $newname =~ s/\(DVD\)/ [DVD]/i;
205 $newname =~ s/\[h264-480p\]//i; 267 $newname =~ s/\[h264-480p\]//i;
206 $newname =~ s/\[H264\]//i; 268 $newname =~ s/\[H264\]//i;
207 $newname =~ s/\[DVD\]\[v2\]/[v2 DVD]/i; 269 $newname =~ s/\[DVD\]\[v2\]/[v2 DVD]/i;
208 $newname =~ s/xvid//i; 270 $newname =~ s/xvid//i;
209 $newname =~ s/\[AC3\]//i; 271 $newname =~ s/\[(AC3|AAC|H264|X264)\]//i;
210 $newname =~ s/\[H264&MP3\]//i; 272 $newname =~ s/\[H264&MP3\]//i;
211 $newname =~ s/\[H264-AAC\]//i; 273 $newname =~ s/\[H264-AAC\]//i;
212 $newname =~ s/\+AAC//i; 274 $newname =~ s/\+AAC//i;
213 $newname =~ s/\[720x480 H264-Vorbis\]//i; 275 $newname =~ s/\[720x480 H264-Vorbis\]//i;
214 $newname =~ s/\[BD\]\[1280x720 H264-Flac\]/[720p BD]/i; 276 $newname =~ s/\[BD\]\[1280x720 H264-Flac\]/[720p BD]/i;
225 $newname =~ s/\[h264-720p\]/[720p]/i; 287 $newname =~ s/\[h264-720p\]/[720p]/i;
226 $newname =~ s/\[h264-1080p FLAC\]/[1080p]/i; 288 $newname =~ s/\[h264-1080p FLAC\]/[1080p]/i;
227 $newname =~ s/\[BD\]\[h264-1080p AC3\]/[1080p BD]/i; 289 $newname =~ s/\[BD\]\[h264-1080p AC3\]/[1080p BD]/i;
228 $newname =~ s/\[-/[/i; 290 $newname =~ s/\[-/[/i;
229 $newname =~ s/ \(1280x720 x264 AAC\)/ [720p]/i; 291 $newname =~ s/ \(1280x720 x264 AAC\)/ [720p]/i;
292 $newname =~ s/ *\( *\d+x(1080|960|720|576) *Blu-Ray *(FLAC|) *\) */[$1p BD]/i;
230 $newname =~ s/\[720p\]\[v2\]/[v2 720p]/i; 293 $newname =~ s/\[720p\]\[v2\]/[v2 720p]/i;
231 $newname =~ s/\[480p\]//i; 294 $newname =~ s/\[480p\]//i;
232 $newname =~ s/\[v2\]\[720p\]/[v2 720p]/i; 295 $newname =~ s/\[v2\]\[720p\]/[v2 720p]/i;
233 $newname =~ s/\[H264 - AAC\]//i; 296 $newname =~ s/\[H264 - AAC\]//i;
234 $newname =~ s/\[H264 1280x720 AAC\] /[720p]/i; 297 $newname =~ s/\[H264 1280x720 AAC\] /[720p]/i;
298 $newname =~ s/\[DVD 480p\]/[DVD]/i;
299 $newname =~ s/\[704x480 DVD\]/[DVD]/i;
235 $newname =~ s/\[720p\]\[End\]/[End 720p]/i; 300 $newname =~ s/\[720p\]\[End\]/[End 720p]/i;
236 $newname =~ s/ R2 DVD\(H264\.AC3\)/ [DVD]/i; 301 $newname =~ s/ R2 DVD\(H264\.AC3\)/ [DVD]/i;
237 $newname =~ s/ - Ep / - /i; 302 $newname =~ s/ - Ep / - /i;
238 $newname =~ s/(h|x)\.?264//i; 303 $newname =~ s/(h|x)\.?264//i;
239 $newname =~ s/\[BD\]\[1080p-?\]/[1080p BD]/; 304 $newname =~ s/\[BD\]\[1080p-?\]/[1080p BD]/;
248 $newname =~ s/ Ep(\d+)v2 / - $1 [v2]/; 313 $newname =~ s/ Ep(\d+)v2 / - $1 [v2]/;
249 $newname =~ s/ (\d+) / - $1 /; 314 $newname =~ s/ (\d+) / - $1 /;
250 $newname =~ s/ (\d+)v(2|3) / $1 [v${2}]/; 315 $newname =~ s/ (\d+)v(2|3) / $1 [v${2}]/;
251 $newname =~ s/\[720x480 AR FLAC\]//i; 316 $newname =~ s/\[720x480 AR FLAC\]//i;
252 $newname =~ s/\[DVD 640x480\]/[DVD]/; 317 $newname =~ s/\[DVD 640x480\]/[DVD]/;
318 $newname =~ s/\[BD 1280x720\]/[720p BD]/i;
319 $newname =~ s/\[v(\d+) (1280x)(720)\]/[v$1 $3p]/i;
253 $newname =~ s/ Episode (- )+(\d+) / - $2 /; 320 $newname =~ s/ Episode (- )+(\d+) / - $2 /;
321 $newname =~ s/ - (\d+) *v(\d) / - $1 [v$2]/i;
322 $newname =~ s/\[V(\d)\]/[v$1]/;
254 #DANGEROUS CLEANUPS 323 #DANGEROUS CLEANUPS
255 $newname =~ s/ \[v(2|3)\]\[(.+)\]\[([0-9A-Fa-f]{8})\]/ [v$1 $2][$3]/; 324 $newname =~ s/ \[v(2|3)\]\[(.+)\]\[([0-9A-Fa-f]{8})\]/ [v$1 $2][$3]/;
256 $newname =~ s/\]/] /g; 325 $newname =~ s/\]/] /g;
257 $newname =~ s/\[/ [/g; 326 $newname =~ s/\[/ [/g;
258 $newname =~ s/\] +\[/][/g; 327 $newname =~ s/\] +\[/][/g;
261 $newname =~ s/( -)+ / - /g; 330 $newname =~ s/( -)+ / - /g;
262 $newname =~ s/(\[|\()([0-9a-fA-F]{8})(\]|\))/[\U$2]/; 331 $newname =~ s/(\[|\()([0-9a-fA-F]{8})(\]|\))/[\U$2]/;
263 $newname =~ s/ +(\.\w{3})$/$1/; 332 $newname =~ s/ +(\.\w{3})$/$1/;
264 $newname =~ s/\[\]//g; 333 $newname =~ s/\[\]//g;
265 $newname =~ s/\(\)//g; 334 $newname =~ s/\(\)//g;
335 $newname =~ s/ - (\d+) - (\d+) / $1 - $2 /;
266 #EXCEPTIONS 336 #EXCEPTIONS
267 $newname =~ s/^\[DB&L-E\]/[DB L-E]/; 337 $newname =~ s/^\[DB&L-E\]/[DB L-E]/;
268 $newname =~ s/ VS Knight Lamune & - 40 fire / VS Knight Lamune & 40 fire /; 338 $newname =~ s/ VS Knight Lamune & - 40 fire / VS Knight Lamune & 40 fire /;
269 $newname =~ s/ RAINBOW / Rainbow /; 339 $newname =~ s/ RAINBOW / Rainbow /;
270 $newname =~ s/ Golgo - 13 / Golgo 13 /; 340 $newname =~ s/ Golgo - 13 / Golgo 13 /;
271 $newname =~ s/ Strike Witches - 2 / Strike Witches 2 - /; 341 $newname =~ s/ Strike Witches - 2 / Strike Witches 2 - /;
272 $newname =~ s/ 07-GHOST / 07-Ghost /; 342 $newname =~ s/ 07-GHOST / 07-Ghost /;
273 $newname =~ s/ K-ON!! B-Side Theater - Uraon!! - / K-ON!! B-Side Theater - Uraon!! /; 343 $newname =~ s/ K-ON!! B-Side Theater - Uraon!! - / K-ON!! B-Side Theater - Uraon!! /;
274 $newname =~ s/ Captain Tsubasa Road to - 2002 / Captain Tsubasa Road to 2002 /; 344 $newname =~ s/ Captain Tsubasa Road to - 2002 / Captain Tsubasa Road to 2002 /;
345 $newname =~ s/ Ultraviolet Code - 044 - / Ultraviolet Code 044 - /;
275 $newname =~ s/ SP0/ - Special /; 346 $newname =~ s/ SP0/ - Special /;
276 $newname =~ s/ Special - / - Special /; 347 $newname =~ s/ Special - / - Special /;
277 $newname =~ s/ Opening - / Opening /; 348 $newname =~ s/ Opening - / Opening /;
278 $newname =~ s/ Ending - / Ending /; 349 $newname =~ s/ Ending - / Ending /;
279 $newname =~ s/ Hidamari Sketch Hoshimittsu - Special / Hidamari Sketch Hoshimittsu Special - /; 350 $newname =~ s/ Hidamari Sketch Hoshimittsu - Special / Hidamari Sketch Hoshimittsu Special - /;
280 $newname =~ s/ Spice and Wolf S2 - BD Menu - 0/ Spice and Wolf S2 - BD Menu /; 351 $newname =~ s/ Spice and Wolf S2 - BD Menu - 0/ Spice and Wolf S2 - BD Menu /;
281 $newname =~ s/ Canvas - 2 - / Canvas 2 - /; 352 $newname =~ s/ Canvas - 2 - / Canvas 2 - /;
282 $newname =~ s/ Mitsudomoe - 2 - / Mitsudomoe 2 - /; 353 $newname =~ s/ Mitsudomoe - 2 - / Mitsudomoe 2 - /;
283 $newname =~ s/ Eyeshield - 21 - / Eyeshield 21 - /; 354 $newname =~ s/ Eyeshield - 21 - / Eyeshield 21 - /;
355 $newname =~ s/ - opening - (\d+) / - Opening $1 /i;
356 $newname =~ s/ - ending - (\d+) / - Ending $1 /i;
284 $newname =~ s/ Eyeshield 21 - (\d{2}) / Eyeshield 21 - 0$1 /; 357 $newname =~ s/ Eyeshield 21 - (\d{2}) / Eyeshield 21 - 0$1 /;
285 $newname =~ s/ Eyeshield 21 - (\d{2})-(\d{2}) / Eyeshield 21 - 0$1-0$2 /; 358 $newname =~ s/ Eyeshield 21 - (\d{2})-(\d{2}) / Eyeshield 21 - 0$1-0$2 /;
286 $newname =~ s/ - 2010 Young Animator / 2010 Young Animator /; 359 $newname =~ s/ - 2010 Young Animator / 2010 Young Animator /;
360 $newname =~ s/ Mahoujin Guruguru - 2 - Doki Doki Densetsu - / Mahoujin Guruguru 2 - Doki Doki Densetsu - /;
361 $newname =~ s/ The World God Only Knows - 2 - / The World God Only Knows 2 - /;
362 $newname =~ s/ Legend of Galactic Heroes Gaiden - 2 - / Legend of Galactic Heroes Gaiden 2 - /;
287 $newname =~ s/\[G P\]/[G_P]/i; 363 $newname =~ s/\[G P\]/[G_P]/i;
288 #SAFE CLEANUPS 364 #SAFE CLEANUPS
289 $newname =~ s/ +/ /g; 365 $newname =~ s/ +/ /g;
290 $newname =~ s/^ +//; 366 $newname =~ s/^ +//;
291 $newname =~ s/(- )+/- /; 367 $newname =~ s/(- )+/- /;
292 $newname =~ s/^\[N - F\]/[N-F]/; 368 $newname =~ s/^\[N - F\]/[N-F]/;
293 $newname =~ s/^\[K-F & AKUPX\]/[K-F AKUPX]/; 369 $newname =~ s/^\[K-F & AKUPX\]/[K-F AKUPX]/;
294 $newname =~ s/^\[([\s\w\- ]+)\] (Kyou Kara Maou|Bleach|Naruto|One Piece|Detective Conan) - (Opening \d+|Special \d+|\d+|\d+-\d+) /$2 - $3 [$1]/; 370 $newname =~ s/^\[([\.\s\w\- ]+)\] (Yawara|Ultraviolet Code 044|Gintama|Prince of Tennis|Lupin III S2|Kyou Kara Maou|Bleach|Naruto|One Piece|Detective Conan) - (Ending \d+|Opening \d+|Special \d+|\d+|\d+-\d+) /$2 - $3 [$1]/;
295 $newname =~ s/^Naruto - (\d{2}) /Naruto - 0$1 /; 371 $newname =~ s/^Naruto - (\d{2}) /Naruto - 0$1 /;
296 $newname =~ s/^Naruto - (\d{2})-(\d{2}) /Naruto - 0$1-0$2 /; 372 $newname =~ s/^Naruto - (\d{2})-(\d{2}) /Naruto - 0$1-0$2 /;
297 print(qq($_: $newname already exists, skipping\n)) and next() if -e $newname and $_ ne $newname; 373 print(qq($_: $newname already exists, skipping\n)) and next() if -e $newname and $_ ne $newname;
298 if ($_ eq $newname) { 374 if ($_ eq $newname) {
299 print("$_: no need to rename, skipping\n"); 375 print("$_: no need to rename, skipping\n");