mirror of
https://github.com/evilhero/mylar
synced 2024-12-23 08:12:41 +00:00
updated ComicRN script to allow for . in filenames, as well as a little additional verbosity when not being able to rename files
This commit is contained in:
parent
6854500a6e
commit
ccd9fdb7b7
1 changed files with 6 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
# ComicBook Renamer v1.02.a (the 'a' means 'alpha')
|
||||
# ComicBook Renamer v1.02.b (the 'b' means 'beta-alpha')
|
||||
|
||||
# This is an add-on script for SABnzbd
|
||||
# Used in conjunction with several other scripts
|
||||
|
@ -221,8 +221,8 @@ for root, dirnames, filenames in os.walk(maindir):
|
|||
# confile = filename.replace(' ','_')
|
||||
#else: confile = filename.replace('_', ' ')
|
||||
#errors are cause when the confile doesn't have special characters..let's account.
|
||||
confile = re.sub(r'[\s\-\:\!\@\%\&\$\_\']', '', confile)
|
||||
comyx = re.sub(r'[\s\-\:\!\@\%\&\$\_\']', '', comyx)
|
||||
confile = re.sub(r'[\s\-\:\!\@\%\&\$\_\.\']', '', confile)
|
||||
comyx = re.sub(r'[\s\-\:\!\@\%\&\$\_\.\']', '', comyx)
|
||||
if str(comyx).lower() in str(confile).lower():
|
||||
print ("Found: " + str(filename))
|
||||
ext = os.path.splitext(filename)[1]
|
||||
|
@ -236,5 +236,8 @@ for root, dirnames, filenames in os.walk(maindir):
|
|||
print ("Removed useless directory: " + maindir)
|
||||
else:
|
||||
print ("incorrect directory passed to Removal: " + maindir)
|
||||
else:
|
||||
print ("Could not find a match for : " + str(comyx) )
|
||||
print ("I compared it to : " + str(confile) )
|
||||
countit+=1
|
||||
|
||||
|
|
Loading…
Reference in a new issue