Beispiel #1
0
	def __init__(self, job, device, mountpoint):
		Task.__init__(self, job, ("mount"))
		self.setTool("mount")
		options = "rw,sync"
		self.mountpoint = mountpoint
		self.args += [ device, mountpoint, "-o"+options ]
		self.weighting = 1
Beispiel #2
0
 def __init__(self, job, cmdline, srcfile, destfile, name):
     Task.__init__(self, job, name)
     self.setCmdline(cmdline)
     self.srcfile = srcfile
     self.destfile = destfile
     self.ProgressTimer = eTimer()
     self.ProgressTimer.callback.append(self.ProgressUpdate)
Beispiel #3
0
	def __init__(self, job, title, clip_num):
		Task.__init__(self, job, "Create BDMV Clip Info File")
		self.title = title
		self.clip_num = clip_num
		self.job = job
		self.weighting = 10
		self.postconditions.append(GenericPostcondition())
Beispiel #4
0
	def __init__(self, job, project):
		Task.__init__(self, job, "Create BDMV Meta Info Files")
		self.project = project
		self.job = job
		self.weighting = 10
		self.postconditions.append(GenericPostcondition())
		self.languageCode = iso639language.get_dvd_id(self.project.menutemplate.settings.menulang.getValue())
Beispiel #5
0
	def __init__(self, job, url, fileName, agent=None):
		print "[DownloadTask] url='%s', fileName='%s'" %(url, fileName)
		Task.__init__(self, job, ("download task"))
		self.agent = agent
		self.end = 100
		self.url = url
		self.local = fileName
Beispiel #6
0
	def __init__(self, job, xmlfile, inputfile, outputfile):
		Task.__init__(self, job, "Muxing buttons into menu")
		self.setTool("spumux")
		self.args += [xmlfile]
		self.inputFile = inputfile
		self.dumpFile = outputfile
		self.weighting = 15
Beispiel #7
0
	def __init__(self, job):
		Task.__init__(self, job, "Authoring DVD")
		self.weighting = 20
		self.setTool("dvdauthor")
		self.CWD = self.job.workspace
		self.args += ["-x", self.job.workspace+"/dvdauthor.xml"]
		self.menupreview = job.menupreview
Beispiel #8
0
 def __init__(self, job, inputfile):
     Task.__init__(self, job, "Demux video into ES")
     title = job.project.titles[job.i]
     self.global_preconditions.append(DiskspacePrecondition(title.estimatedDiskspace))
     self.setTool("projectx")
     self.args += [
         inputfile,
         "-demux",
         "-set",
         "ExportPanel.Streamtype.Subpicture=0",
         "-set",
         "ExportPanel.Streamtype.Teletext=0",
         "-out",
         self.job.workspace,
     ]
     self.end = 300
     self.prog_state = 0
     self.weighting = 1000
     self.cutfile = self.job.workspace + "/cut_%d.Xcl" % (job.i + 1)
     self.cutlist = title.cutlist
     self.currentPID = None
     self.relevantAudioPIDs = []
     self.getRelevantAudioPIDs(title)
     self.generated_files = []
     self.mplex_audiofiles = {}
     self.mplex_videofile = ""
     self.mplex_streamfiles = []
     if len(self.cutlist) > 1:
         self.args += ["-cut", self.cutfile]
Beispiel #9
0
 def __init__(self, job, src_file, dst_file, src_isDir, do_copy):
     Task.__init__(self, job, '')
     nice = 'ionice -c 3'
     self.src_isDir = src_isDir
     self.src_file = src_file
     self.dst_isDir = False
     self.dst_file = dst_file + '/' + os.path.basename(src_file)
     src_file_append = ''
     if not src_isDir:
         src_file_fields = src_file.rsplit('.', 1)
         if len(src_file_fields):
             src_file = src_file_fields[0] + '.'
         src_file_append = '*'
     cmd = 'mv'
     if do_copy:
         cmd = 'cp -pr'
     cmdline = '%s %s "%s"%s "%s"' % (nice,
      cmd,
      src_file,
      src_file_append,
      dst_file)
     if self.dst_file.endswith('/'):
         self.dst_isDir = True
     self.setCmdline(cmdline)
     self.end = 100
     self.progressTimer = eTimer()
     self.progressTimer.callback.append(self.progressUpdate)
Beispiel #10
0
	def __init__(self, job, sourcefile, title_no):
		Task.__init__(self, job, "Copy thumbnail")
		self.setTool("cp")
		source = sourcefile.rsplit('.',1)[0] + ".png"
		dest = self.job.workspace+'BDMV/META/DL/thumb_%05d.png' % title_no
		self.args += [source, dest]
		self.weighting = 10
Beispiel #11
0
	def __init__(self, job, extra_args=[], tool="growisofs"):
		Task.__init__(self, job, job.name)
		self.weighting = 500
		self.end = 120 # 100 for writing, 10 for buffer flush, 10 for closing disc
		self.postconditions.append(BurnTaskPostcondition())
		self.setTool(tool)
		self.args += extra_args
Beispiel #12
0
	def __init__(self, job, title, mpls_num):
		Task.__init__(self, job, "Create BDMV Playlist File")
		self.title = title
		self.mpls_num = mpls_num
		self.job = job
		self.weighting = 10
		self.postconditions.append(GenericPostcondition())
Beispiel #13
0
	def __init__(self, job, extra_args=[]):
		Task.__init__(self, job, ("RW medium format"))
		self.toolbox = job.toolbox
		self.postconditions.append(DVDformatTaskPostcondition())
		self.setTool("dvd+rw-format")
		self.args += [ "/dev/" + harddiskmanager.getCD() ]
		self.end = 1100
		self.retryargs = [ ]
Beispiel #14
0
 def __init__(self, job, cmdline, srcfile, destfile, eventname):
     Task.__init__(self, job, eventname)
     self.toolbox = job.toolbox
     self.setCmdline(cmdline)
     self.srcfile = config.usage.timeshift_path.value + srcfile + '.copy'
     self.destfile = destfile + '.ts'
     self.ProgressTimer = eTimer()
     self.ProgressTimer.callback.append(self.ProgressUpdate)
Beispiel #15
0
 def __init__(self, job, path, md5):
     Task.__init__(self, job, "md5sum")
     self.postconditions.append(md5Postcondition())
     self.weighting = 5
     self.cwd = path
     self.setTool("md5sum")
     self.args += ["-c", "-s"]
     self.initial_input = md5
Beispiel #16
0
 def __init__(self, job, cmdline, srcfile, destfile, eventname):
     Task.__init__(self, job, eventname)
     self.toolbox = job.toolbox
     self.setCmdline(cmdline)
     self.srcfile = config.usage.autorecord_path.value + srcfile
     self.destfile = config.usage.autorecord_path.value + destfile
     self.ProgressTimer = eTimer()
     self.ProgressTimer.callback.append(self.ProgressUpdate)
Beispiel #17
0
	def __init__(self, job, cmdline, filename, filetitle):
		Task.__init__(self, job, filetitle)
#		self.postconditions.append(downloadTaskPostcondition())
		self.setCmdline(cmdline)
		self.filename = filename
		self.toolbox = job.toolbox
		self.error = None
		self.lasterrormsg = None
Beispiel #18
0
 def __init__(self, job, param, box):
     Task.__init__(self, job, ("Writing image file to NAND Flash"))
     self.setTool(eEnv.resolve("${libdir}/enigma2/python/Plugins/SystemPlugins/NFIFlash/writenfi-mipsel-2.6.18-r1"))
     if box == "dm7025":
         self.end = 256
     elif box[:5] == "dm800":
         self.end = 512
     self.args += param
     self.weighting = 95
Beispiel #19
0
	def __init__(self, job):
		Task.__init__(self, job, ("Copying USB flasher boot image to stick..."))
		self.job = job
		self.setTool("dd")
		self.args += ["if=%s" % self.job.imagefilename, "of=%s1" % self.job.device]
		self.weighting = 20
		self.end = 20
		self.delayTimer = eTimer()
		self.delayTimer.callback.append(self.progress_increment)
Beispiel #20
0
	def __init__(self, job):
		Task.__init__(self, job, ("partitioning"))
		self.postconditions.append(PartitionTaskPostcondition())
		self.job = job
		self.setTool("sfdisk")
		self.args += [self.job.device]
		self.weighting = 10
		self.initial_input = "0 - 0x6 *\n;\n;\n;\ny"
		self.errormsg = ""
Beispiel #21
0
	def __init__(self, job):
		Task.__init__(self, job, ("Unpacking USB flasher image..."))
		self.job = job
		self.setTool("tar")
		self.args += ["-xjvf", self.job.downloadfilename]
		self.weighting = 80
		self.end = 80
		self.delayTimer = eTimer()
		self.delayTimer.callback.append(self.progress_increment)
Beispiel #22
0
	def __init__(self, job, outputfile, inputfiles=None, demux_task=None, weighting = 500):
		Task.__init__(self, job, "Mux ES into PS")
		self.weighting = weighting
		self.demux_task = demux_task
		self.postconditions.append(MplexTaskPostcondition())
		self.setTool("mplex")
		self.args += ["-f8", "-o", outputfile, "-v1"]
		if inputfiles:
			self.args += inputfiles
Beispiel #23
0
	def __init__(self, job, menu_count, spuxmlfilename, menubgpngfilename, highlightpngfilename):
		Task.__init__(self, job, "Create Menu %d Image" % menu_count)
		self.postconditions.append(ImagingPostcondition())
		self.weighting = 10
		self.job = job
		self.Menus = job.Menus
		self.menu_count = menu_count
		self.spuxmlfilename = spuxmlfilename
		self.menubgpngfilename = menubgpngfilename
		self.highlightpngfilename = highlightpngfilename
Beispiel #24
0
	def __init__(self,job,param,box):
		Task.__init__(self,job, ("Writing image file to NAND Flash"))
		self.setTool("/usr/lib/enigma2/python/Plugins/SystemPlugins/NFIFlash/mywritenand")
		if box == "dm7025":
			self.end = 256
		elif box[:5] == "dm800":
			self.end = 512
		if box == "dm8000":
			self.setTool("/usr/lib/enigma2/python/Plugins/SystemPlugins/NFIFlash/dm8000_writenand")
		self.args += param
		self.weighting = 1
Beispiel #25
0
	def __init__(self, job, sourcefile):
		Task.__init__(self, job, "Copy title meta files")
		self.setTool("cp")
		from os import listdir
		path, filename = sourcefile.rstrip("/").rsplit("/",1)
		tsfiles = listdir(path)
		for file in tsfiles:
			if file.startswith(filename+"."):
				self.args += [path+'/'+file]
		self.args += [self.job.workspace]
		self.weighting = 15
Beispiel #26
0
	def __init__(self, job, session, name, inpath, outpath, inlen, outlen, cmd, args):
		Task.__init__(self, job, name)
		self.session = session
		self.name = name
		self.inpath = inpath
		self.outpath = outpath
		self.inlen = inlen
		self.outlen = outlen
		self.setCommandline(cmd, [cmd] + args)
		self.progressTimer = eTimer()
		self.progressTimer.callback.append(self.progressUpdate)
Beispiel #27
0
	def __init__(self, job, url, path):
		Task.__init__(self, job, _("Downloading"))
		self.postconditions.append(DownloaderPostcondition())
		self.job = job
		self.url = url
		self.path = path
		self.error_message = ""
		self.last_recvbytes = 0
		self.error_message = None
		self.download = None
		self.aborted = False
Beispiel #28
0
	def __init__(self, job):
		Task.__init__(self, job, "Checking free space")
		totalsize = 0 # require an extra safety 50 MB
		maxsize = 0
		for title in job.project.titles:
			titlesize = title.estimatedDiskspace
			if titlesize > maxsize: maxsize = titlesize
			totalsize += titlesize
		diskSpaceNeeded = totalsize + maxsize
		job.estimateddvdsize = totalsize / 1024 / 1024
		totalsize += 50*1024*1024 # require an extra safety 50 MB
		self.global_preconditions.append(DiskspacePrecondition(diskSpaceNeeded))
		self.weighting = 5
Beispiel #29
0
	def __init__(self, job, title, title_no):
		Task.__init__(self, job, "Remultiplex Movie")
		self.global_preconditions.append(DiskspacePrecondition(title.estimatedDiskspace))
		self.postconditions.append(GenericPostcondition())
		self.setTool("bdremux")
		self.title = title
		self.title_no = title_no
		self.job = job
		inputfile = title.inputfile
		self.outputfile = self.job.workspace+'BDMV/STREAM/%05d.m2ts' % self.title_no
		self.args += [inputfile, self.outputfile, "--entrypoints", "--cutlist"]
		self.args += self.getPIDs()
		self.end = ( self.title.filesize / 188 )
		self.weighting = 1000
Beispiel #30
0
	def __init__(self, job, src_file, dst_file, src_isDir, do_copy):
		Task.__init__(self, job, "")
		nice = "ionice -c 3"
		self.src_isDir = src_isDir
		self.src_file = src_file
		self.dst_isDir = False
		self.dst_file = dst_file + "/" + os.path.basename(src_file)
		src_file_append = ""
		if not src_isDir:
			src_file_fields = src_file.rsplit(".",1)
			if len(src_file_fields):
				src_file = src_file_fields[0] + "."
			src_file_append = "*"
		cmd = "mv"
		if do_copy:
			cmd = "cp -pr"
		cmdline = '%s %s "%s"%s "%s"' % (nice, cmd, src_file, src_file_append, dst_file)
		if self.dst_file.endswith("/"):
			self.dst_isDir = True
		self.setCmdline(cmdline)
		self.end = 100
		self.progressTimer = eTimer()
		self.progressTimer.callback.append(self.progressUpdate)
Beispiel #31
0
 def __init__(self, job, path):
     Task.__init__(self, job, "Preview")
     self.postconditions.append(PreviewTaskPostcondition())
     self.job = job
     self.path = path
     self.weighting = 10
Beispiel #32
0
	def __init__(self, job):
		Task.__init__(self, job, "Create BDMV Movie Objects File")
		self.job = job
		self.weighting = 10
		self.postconditions.append(GenericPostcondition())
Beispiel #33
0
 def __init__(self, job, number):
     Task.__init__(self, job, "Make FIFO nodes")
     self.setTool("mknod")
     nodename = self.job.workspace + "/dvd_title_%d" % number + ".mpg"
     self.args += [nodename, "p"]
     self.weighting = 10
Beispiel #34
0
 def __init__(self, job):
     Task.__init__(self, job, _("please wait, loading picture..."))
     self.postconditions.append(ImagingPostcondition())
     self.weighting = 20
     self.job = job
     self.Menus = job.Menus
Beispiel #35
0
 def __init__(self, job, inputfile, outputfile):
     Task.__init__(self, job, "Creating menu video")
     self.setTool("png2yuv")
     self.args += ["-n1", "-Ip", "-f25", "-j", inputfile]
     self.dumpFile = outputfile
     self.weighting = 15
Beispiel #36
0
 def __init__(self, job, sourcefile, link_name):
     Task.__init__(self, job, "Creating symlink for source titles")
     self.setTool("ln")
     self.args += ["-s", sourcefile, link_name]
     self.weighting = 10
 def __init__(self, job, demux_task):
     Task.__init__(self, job, "Remove temp. files")
     self.demux_task = demux_task
     self.setTool("rm")
     self.weighting = 10
 def __init__(self, job, inputfile, outputfile):
     Task.__init__(self, job, "Encoding menu video")
     self.setTool("mpeg2enc")
     self.args += ["-f8", "-np", "-a2", "-o", outputfile]
     self.inputFile = inputfile
     self.weighting = 25
 def __init__(self, job, outputfile, inputfile):
     Task.__init__(self, job, "ReMux TS into PS")
     self.weighting = 1000
     self.setTool("replex")
     self.args += ["-t", "DVD", "-j", "-o", outputfile, inputfile]
 def __init__(self, job):
     Task.__init__(self, job, "dvdauthor finalize")
     self.setTool("dvdauthor")
     self.args += ["-T", "-o", self.job.workspace + "/dvd"]
 def __init__(self, job):
     Task.__init__(self, job, "waiting for dvdauthor to finalize")
 def __init__(self, job):
     Task.__init__(self, job, "Remove temp. files")
     self.setTool("rm")
     self.args += ["-rf", self.job.workspace]
     self.weighting = 10
Beispiel #43
0
 def __init__(self, job, mountpoint):
     Task.__init__(self, job, ("mount"))
     self.setTool("umount")
     self.args += [mountpoint]
     self.weighting = 1
Beispiel #44
0
	def __init__(self, job):
		Task.__init__(self, job, "Creating BDMV Directory Structure")
		self.job = job
		self.weighting = 10
		self.postconditions.append(GenericPostcondition())
Beispiel #45
0
	def __init__(self, job, cmdline, eventname):
		Task.__init__(self, job, eventname)
		self.toolbox = job.toolbox
		self.setCmdline(cmdline)