Fixes rename for new exception handler in multimode
After creating an exception handler for decoding error in certain asian names the previous handler for the renamer and the direct multi mode got broken. This fixes that issue.
@@ -3020,6 +3020,7 @@ if __name__ == '__main__':
print (j[1])
print('////////////////////////////////////////////////////////////')
'''
+ tnamefile=False
for f in args.direct_multi:
if f == 'calculate':
#BASE
@@ -3074,7 +3075,11 @@ if __name__ == '__main__':
ctitl=f.get_title(baseid)
f.flush()
f.close()
+ if ctitl=='DLC' or ctitl=='-':
+ tnamefile=True
except:
+ tnamefile=True
+ if tnamefile==True:
ctitl=str(os.path.basename(os.path.abspath(basefile)))
tid1=list()
tid2=list()
@@ -3125,7 +3130,11 @@ if __name__ == '__main__':
ctitl=f.get_title(updid)
f.flush()
f.close()
+ if ctitl=='DLC' or ctitl=='-':
+ tnamefile=True
except:
+ tnamefile=True
+ if tnamefile==True:
ctitl=str(os.path.basename(os.path.abspath(updfile)))
tid1=list()
tid2=list()
@@ -4802,6 +4811,8 @@ if __name__ == '__main__':
#print(baseid)
f.flush()
f.close()
+ if ctitl=='DLC' or ctitl=='-':
+ ctitl=''
elif updid !="":
basename=str(os.path.basename(os.path.abspath(filepath)))
basename2=basename.upper()
@@ -4828,6 +4839,8 @@ if __name__ == '__main__':
#print(updid)
f.flush()
f.close()
+ if ctitl=='DLC' or ctitl=='-':
+ ctitl=''
elif dlcid !="":
basename=str(os.path.basename(os.path.abspath(filepath)))
basename2=basename.upper()
@@ -5116,6 +5129,8 @@ if __name__ == '__main__':
ctitl=f.get_title(baseid)
f.flush()
f.close()
+ if ctitl=='DLC' or ctitl=='-':
+ ctitl=''
elif updid !="":
if updfile.endswith('.xci'):
f = Fs.Xci(updfile)
@@ -5124,6 +5139,8 @@ if __name__ == '__main__':
ctitl=f.get_title(updid)
f.flush()
f.close()
+ if ctitl=='DLC' or ctitl=='-':
+ ctitl=''
elif dlcid !="":
ctitl=get_title
if dlcfile.endswith('.xci'):
