Check if output folder exists before the program starts

This commit is contained in:
2025-08-13 20:14:03 +01:00
parent 87d7e31449
commit f19c79ac89

View File

@@ -19,7 +19,7 @@ def ripDvd(driveName):
print("- Movie could not be found, will use name " + driveName)
print("- Will now procede to ripping DVD")
movieName = driveName
os.system('HandBrakeCLI -i /dev/sr0 -o "' + movieName + '.mp4" --preset-import-file preset.json')
os.system('HandBrakeCLI -i /dev/sr0 -o output/"' + movieName + '.mp4" --preset-import-file preset.json')
def waitForDvd():
print("- Insert a DVD into drive")
@@ -35,6 +35,12 @@ def waitForDvd():
fh.close()
time.sleep(1)
def addOutputFolder():
if (os.path.isdir('output') == False):
os.mkdir('output')
addOutputFolder()
print("-----------------------------------------------")
print("- Auto DVD Ripper -")
print("-----------------------------------------------")