Quote:
Originally Posted by capink
Also if someone can explain what the code below is trying to do — especially the part highlighted in red — I would appreciate it.
Code:
if external_app_path.lower().endswith('calibredb.exe'):
print('running a calibredb command.')
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
fred = 'calibredb add --library-path="C:/Users/Declan/Documents/Calibre Library" -d "D:/Downloads/Merlin-Thered Been A Time - A_Fallen_Sister.epub"'
p = subprocess.Popen(fred, shell=True, startupinfo=startupinfo)
rc = p.wait()
if rc != 0:
if DEBUG: print("FAILURE for: ", fred)
else:
if DEBUG: print("...success for...", fred)
|
That is something I was experimenting with a long time ago. From memory, there was some claim posted about how calibredb.exe had to be run and I was trying work out if they were correct. At around the same time, I was also trying to work out if Sigil needed to still be handled separately. The highlighted line was just me hardcoding something so that I knew exactly what the results should be. And didn't clobber the real library.
You can safely remove it.