Index: bk_manager/trunk/functions/functions.py =================================================================== diff --git a/bk_manager/trunk/functions/functions.py b/bk_manager/trunk/functions/functions.py --- a/bk_manager/trunk/functions/functions.py (revision 78) +++ b/bk_manager/trunk/functions/functions.py (revision 79) @@ -9,6 +9,7 @@ import subprocess import commands import shutil +import functions2 #--------------------------------------------- Entero a cadena agregando ceros delante ------------------------------------------------- @@ -207,7 +208,7 @@ for k in range(0, len(var_lines2) / 5): var_lines=["\n"] var_lines.append(" "+self.var_Elabel+" "+i2s(var_n)+"/"+i2s(self.var_Discs)+"\n") - var_lines.append("Year Doy Folder"+" "*6+"Set"+" "*9+"Time range\n") + var_lines.append("Year Doy Folder"+" "*9+"Set"+" "*11+"Time range\n") var_lines.extend(var_lines2[(5*k):(5*(k+1))]) var_lines.append("\n") var_labels.append(var_lines) @@ -271,20 +272,22 @@ def cmd_burn(self): var_Rpath_iso=self.var_Rpath+"/iso" - file_iso=var_Rpath_iso+"/"+functions.i2s(self.var_disc_n)+".iso" + file_iso=var_Rpath_iso+"/"+i2s(self.var_disc_n)+".iso" var_index = ( ( (self.var_disc_n - 1) * self.var_Copys) + (self.var_copy_n - 1) - self.var_burned_discs ) % len(self.var_devices) var_dev_tmp = self.var_devices[var_index] var_cmd = "wodim -v dev="+var_dev_tmp+" speed=16 "+ file_iso return var_cmd + +def cmd_check(self): + var_cmd = "echo 'function check'" + return var_cmd def remove_iso(self): var_Rpath_iso=self.var_Rpath+"/iso" - file_iso=var_Rpath_iso+"/"+functions.i2s(self.var_disc_n)+".iso" - - self.txtInfo.append("Deleting iso file: "+functions.i2s(self.var_disc_n)+".iso") - + file_iso=var_Rpath_iso+"/"+i2s(self.var_disc_n)+".iso" +# shutil.rmtree(self.var_Rpath+'/'+var_dir, True) if os.path.isfile(file_iso): os.remove(file_iso) @@ -298,6 +301,10 @@ #Define cual es el siguiente disco a grabar y que paso seguir def next_disc(self, error = False): if self.var_copy_n == self.var_Copys: + #borrado del iso + self.txtInfo.append("Deleting iso file: "+i2s(self.var_disc_n)+".iso") + remove_iso(self) + self.var_disc_n += 1 self.var_copy_n = 1 self.var_step = 0 @@ -306,6 +313,9 @@ self.var_copy_n += 1 self.var_step = 1 + functions2.make_burning_conf(self) # Si el proceso no ha sido detenido manualmente + #crea el archivo burning.conf para el seguimiento de los discos grabados + var_index = ( ( (self.var_disc_n - 1) * self.var_Copys) + (self.var_copy_n - 1) - self.var_burned_discs ) % len(self.var_devices) self.txtInfo.append("NEXT DISC: "+str(self.var_disc_n)+" COPY: "+str(self.var_copy_n) Index: bk_manager/trunk/functions/functions2.py =================================================================== diff --git a/bk_manager/trunk/functions/functions2.py b/bk_manager/trunk/functions/functions2.py --- a/bk_manager/trunk/functions/functions2.py (revision 78) +++ b/bk_manager/trunk/functions/functions2.py (revision 79) @@ -154,7 +154,7 @@ def make_burning_conf(self): var_file = open("burning.conf","w") - var_n_burned_discs = ( ( (self.var_disc_n - 1) * self.var_Copys) + self.var_copy_n -1 ) + var_n_burned_discs = ( ( (self.var_disc_n - 1) * self.var_Copys) + self.var_copy_n - 1 ) var_file.write(str(var_n_burned_discs)+"\n") #0 Numero de discos ya grabados var_file.write(str(self.var_disc_n)+"\n") #1 Disco actual para grabar var_file.write(str(self.var_copy_n)+"\n") #2 Numero de copia actual para grabar Index: bk_manager/trunk/ui/MainWindow.py =================================================================== diff --git a/bk_manager/trunk/ui/MainWindow.py b/bk_manager/trunk/ui/MainWindow.py --- a/bk_manager/trunk/ui/MainWindow.py (revision 78) +++ b/bk_manager/trunk/ui/MainWindow.py (revision 79) @@ -32,8 +32,10 @@ def setupUi2(self): - self.var_real = False - + self.var_real_iso = True + self.var_real_burn = False + self.var_real_check = False + self.var_real_eject = False # Reconocimiento de los dispositivos de grabacion # functions2.detect_devices(self) #busca los dispositivos de grabacion #################################### @@ -81,8 +83,7 @@ self.txtInfo.append("Current copy: "+str(self.var_copy_n)) self.txtInfo.append("Burned discs: "+str(self.var_burned_discs)) self.btnStartburn.setText("Continue") - - + self.actionChange_Parameters.setEnabled(False) self.connect(self.actionChange_Parameters, QtCore.SIGNAL("triggered()"), self.changeParameters) self.connect(self.actionAbout, QtCore.SIGNAL("triggered()"), self.about) @@ -117,6 +118,11 @@ self.txtInfo.append("Changed parameters") self.var_burned_discs = ( ( (self.var_disc_n - 1) * self.var_Copys) + self.var_copy_n -1 ) self.bool_first_iso = True + self.txtInfo.append("Current disc: "+str(self.var_disc_n)) + self.txtInfo.append("Current copy: "+str(self.var_copy_n)) + self.txtInfo.append("Nro Copys: "+str(self.var_Copys)) + functions2.make_parameters_conf(self) + self.txtCopys.setValue(self.var_Copys) #Actualizo mananualmente el valor Copys @@ -381,7 +387,7 @@ return if self.process_iso.exitCode() == 0: - self.txtInfo.append("------Iso file: "+functions.i2s(self.var_disc_n)+" created successfully") + self.txtInfo.append("------Iso file: "+functions.i2s(self.var_disc_n)+" created successfully\n") self.var_step = 1 self.function_burn() @@ -390,6 +396,7 @@ +" , code "+QtCore.QString(self.process_iso.exitCode())) self.txtInfo.append("Please check the data") self.txtInfo.append("FATAL ERROR") + #----------------------------------------------------- Funciones del proceso de grabado --------------------------------------------------------------- def readOuput_burn(self): @@ -405,9 +412,6 @@ if not(self.bool_state_burning): return - functions2.make_burning_conf(self) # Si el proceso no ha sido detenido manualmente - #crea el archivo burning.conf para el seguimiento de los discos grabados - if self.process_burn.exitCode() == 0: self.txtInfo.append("-----Complete recording, disc: "+str(self.var_disc_n)+" copy: "+str(self.var_copy_n)) functions2.update_message(1, "COMPLETED", self) @@ -494,7 +498,7 @@ self.txtInfo.append("########## Disc number: "+str(self.var_disc_n)+"##########") self.txtInfo.append("------Creating iso file number: "+str(self.var_disc_n)) - if self.var_real == True: + if self.var_real_iso == True: var_cmd = functions.cmd_iso(self) else: self.txtInfo.append('**function_iso') @@ -504,12 +508,17 @@ def function_burn(self): #Grabacion de los DVDs + if self.var_step == 1: - self.txtInfo.append("------Recording disc: "+str(self.var_copy_n)+", copy:"+str(self.var_copy_n)) + self.txtInfo.append("------Recording disc: "+str(self.var_disc_n)+", copy:"+str(self.var_copy_n)) functions2.update_message(1, "BURNING", self) - if self.var_real == True: + if self.var_real_burn == True: var_cmd = functions.cmd_burn(self) + ######################################### + return###################################### + ######################################## + else: self.txtInfo.append('**function_burn') var_cmd="echo 'function_burn'" @@ -519,10 +528,10 @@ def function_check(self): #Verificacion de los discos if self.var_step == 2: - self.txtInfo.append("-----------checking disc:"+str(self.var_copy_n)+", copy:"+str(self.var_copy_n)) + self.txtInfo.append("-----------checking disc:"+str(self.var_disc_n)+", copy:"+str(self.var_copy_n)) functions2.update_message(2, "CHECKING", self) - if self.var_real == True: + if self.var_real_check == True: var_cmd = functions.cmd_check(self) else: self.txtInfo.append('**function_check') @@ -535,7 +544,7 @@ self.txtInfo.append("Ejecting recording devices") self.txtInfo.append("Please insert blank discs") - if self.var_real == True: + if self.var_real_eject == True: functions2.eject_devices(self) # Expulsa las bandejas de los dispostivos de grabacion else: self.txtInfo.append("**functions2.eject_devices")