create & purge unique one-time temp directory for each burning job and
authorAndreas Frisch <andreas.frisch@multimedia-labs.de>
Tue, 8 Jul 2008 09:24:18 +0000 (09:24 +0000)
committerAndreas Frisch <andreas.frisch@multimedia-labs.de>
Tue, 8 Jul 2008 09:24:18 +0000 (09:24 +0000)
lib/python/Plugins/Extensions/DVDBurn/Process.py

index 9163b8a..5123ea5 100644 (file)
@@ -180,13 +180,17 @@ class RemoveDVDFolder(Task):
        def __init__(self, job):
                Task.__init__(self, job, "Remove temp. files")
                self.setTool("/bin/rm")
-               self.args += ["-rf", self.job.workspace + "/dvd"]
+               self.args += ["-rf", self.job.workspace]
 
 class DVDJob(Job):
        def __init__(self, cue):
                Job.__init__(self, "DVD Burn")
                self.cue = cue
-               self.workspace = "/media/hdd/tmp"
+               from time import strftime
+               from Tools.Directories import SCOPE_HDD, resolveFilename, createDir
+               new_workspace = resolveFilename(SCOPE_HDD) + "tmp/" + strftime("%Y%m%d%H%M%S")
+               createDir(new_workspace)
+               self.workspace = new_workspace
                self.fromDescription(self.createDescription())
 
        def fromDescription(self, description):