diff --git a/shunt_tags b/shunt_tags index 9ba5425..62fb39b 100755 --- a/shunt_tags +++ b/shunt_tags @@ -64,7 +64,7 @@ function fixup($input) { } while (! array_key_exists($tmp, $seen)); return $tmp; }; - + // Some files using underscore instead of space // Except - preserve "G_P", that's a known sub group // Iterate until fixed point @@ -159,12 +159,7 @@ function fixup($input) { return $tmp; }); - /* - // Move tags from middle to end - $tmp = $fixed_point_iterate($tmp, function($tmp) { - return preg_replace('~([^\[\]]+)(\[[^\]]+?\])([^\[\]]+)~', '\1\3\2', $tmp); - }); - */ + // Cleanup commas inside tags ( [720p,Bluray] => [720p Bluray] ) $tmp = preg_replace_callback('~\[(.+)\]~', function($matches) { return str_replace(',', ' ', $matches[0]); }, $tmp);