diff options
-rwxr-xr-x | comic-rename.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/comic-rename.py b/comic-rename.py index 15b6046..93037de 100755 --- a/comic-rename.py +++ b/comic-rename.py @@ -7,14 +7,14 @@ import string def cleanup_filename(strname): (strfile, strext) = os.path.splitext(strname) strext = string.strip(strext) - if strext == '.cbr' or strext == '.cbz': + if strext.lower() == '.cbr' or strext.lower() == '.cbz': pattobj = re.compile("\(+(.*)") pattobj2 = re.compile("__") pattobj3 = re.compile("_") name = re.sub(pattobj, "", strfile) name = re.sub(pattobj2, " ", name) name = re.sub(pattobj3, " ", name) - return name.rstrip() + strext + return name.rstrip() + strext.lower() else: return '' |