Now uses the folder dvd_tree to store the DVD structure, reducing even more the number of needed folders

This commit is contained in:
Sergio Costas 2014-08-10 11:29:00 +02:00
parent 325cfcc22f
commit c914b5e66c
4 changed files with 9 additions and 11 deletions

View file

@ -28,15 +28,17 @@ class dvdauthor_converter(devede.executor.executor):
devede.executor.executor.__init__(self) devede.executor.executor.__init__(self)
self.config = devede.configuration_data.configuration.get_config() self.config = devede.configuration_data.configuration.get_config()
def create_dvd_project (self, path, name, file_movies, menu_entries, start_with_menu): def create_dvd_project (self, path, name, file_movies, menu_entries, start_with_menu):
xml_file = self.create_dvdauthor_xml(path, file_movies, menu_entries, start_with_menu) movie_path = os.path.join(path,"dvd_tree")
movie_path = os.path.join(path,name)
try: try:
os.makedirs(movie_path) os.makedirs(movie_path)
except: except:
pass pass
xml_file = self.create_dvdauthor_xml(path, file_movies, menu_entries, start_with_menu)
self.command_var=[] self.command_var=[]
self.command_var.append("dvdauthor") self.command_var.append("dvdauthor")
self.command_var.append("-o") self.command_var.append("-o")
@ -50,6 +52,7 @@ class dvdauthor_converter(devede.executor.executor):
def process_stdout(self,data): def process_stdout(self,data):
return return
def process_stderr(self,data): def process_stderr(self,data):
if (data != None) and (data[0] != ""): if (data != None) and (data[0] != ""):
self.progress_bar[1].set_text(data[0]) self.progress_bar[1].set_text(data[0])
@ -65,10 +68,6 @@ class dvdauthor_converter(devede.executor.executor):
os.makedirs(xmlpath) os.makedirs(xmlpath)
except: except:
pass pass
try:
os.makedirs(datapath)
except:
pass
if (len(file_movies) == 1) and (menu_entries == None): if (len(file_movies) == 1) and (menu_entries == None):
onlyone = True onlyone = True
@ -424,6 +423,7 @@ class dvdauthor_converter(devede.executor.executor):
return xml_file_path return xml_file_path
def return_time(self,seconds,empty): def return_time(self,seconds,empty):
""" cuts a time in seconds into seconds, minutes and hours """ """ cuts a time in seconds into seconds, minutes and hours """

View file

@ -51,7 +51,7 @@ class genisoimage(devede.executor.executor):
def create_iso (self, path, name): def create_iso (self, path, name):
filesystem_path = os.path.join(path,name) filesystem_path = os.path.join(path,"dvd_tree")
final_path = os.path.join(path,name+".iso") final_path = os.path.join(path,name+".iso")
self.command_var=[] self.command_var=[]

View file

@ -51,7 +51,7 @@ class mkisofs(devede.executor.executor):
def create_iso (self, path, name): def create_iso (self, path, name):
filesystem_path = os.path.join(path,name) filesystem_path = os.path.join(path,"dvd_tree")
final_path = os.path.join(path,name+".iso") final_path = os.path.join(path,name+".iso")
self.command_var=[] self.command_var=[]

View file

@ -414,11 +414,9 @@ class devede_project:
if retval: if retval:
# delete only the bare minimun needed # delete only the bare minimun needed
shutil.rmtree(os.path.join(data.path,"dvd_tree"),True) shutil.rmtree(os.path.join(data.path,"dvd_tree"),True)
print("Delete "+str(os.path.join(data.path,"dvd_tree")))
shutil.rmtree(os.path.join(data.path,"menu"),True) shutil.rmtree(os.path.join(data.path,"menu"),True)
shutil.rmtree(os.path.join(data.path,"movies"),True) shutil.rmtree(os.path.join(data.path,"movies"),True)
shutil.rmtree(os.path.join(data.path,"xml_data"),True) shutil.rmtree(os.path.join(data.path,"xml_data"),True)
shutil.rmtree(os.path.join(data.path,data.name),True)
if self.config.disc_type == "dvd": if self.config.disc_type == "dvd":
try: try:
os.unlink(os.path.join(data.path,data.name+".iso")) os.unlink(os.path.join(data.path,data.name+".iso"))