Now creates the ISO file
Shows the output from dvdauthor in the progress bar Now takes into account the childs when adding a process as dependency for another
This commit is contained in:
parent
54a2dd0b03
commit
6b2596d432
5 changed files with 86 additions and 0 deletions
|
|
@ -51,6 +51,8 @@ class dvdauthor_converter(devede.executor.executor):
|
|||
return
|
||||
|
||||
def process_stderr(self,data):
|
||||
if data != None:
|
||||
self.progress_bar[1].set_text(data[0])
|
||||
return
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -49,10 +49,19 @@ class executor(GObject.GObject):
|
|||
self.pulse_mode = False
|
||||
self.use_pulse_mode = False
|
||||
self.pulse_text = None
|
||||
self.handle = None
|
||||
|
||||
|
||||
def add_dependency(self, dep):
|
||||
|
||||
self.add_dependency2(dep)
|
||||
|
||||
for child in dep.childs:
|
||||
self.add_dependency2(child)
|
||||
|
||||
|
||||
def add_dependency2(self, dep):
|
||||
|
||||
if (self.dependencies == None):
|
||||
self.dependencies = []
|
||||
|
||||
|
|
|
|||
|
|
@ -158,6 +158,14 @@ class file_movie(devede.interface_manager.interface_manager):
|
|||
|
||||
def set_final_size_aspect(self):
|
||||
|
||||
if self.is_mpeg_ps:
|
||||
self.width_midle = self.original_width
|
||||
self.width_final = self.original_width
|
||||
self.height_midle = self.original_height
|
||||
self.height_final = self.original_height
|
||||
self.aspect_ratio_final = self.original_aspect_ratio
|
||||
return
|
||||
|
||||
if self.format_pal:
|
||||
final_size = self.final_size_pal
|
||||
else:
|
||||
|
|
|
|||
62
src/devede/mkisofs.py
Normal file
62
src/devede/mkisofs.py
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright 2014 (C) Raster Software Vigo (Sergio Costas)
|
||||
#
|
||||
# This file is part of DeVeDe-NG
|
||||
#
|
||||
# DeVeDe-NG is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# DeVeDe-NG is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
import os
|
||||
import devede.configuration_data
|
||||
import devede.executor
|
||||
|
||||
class mkisofs(devede.executor.executor):
|
||||
|
||||
def __init__(self):
|
||||
|
||||
devede.executor.executor.__init__(self)
|
||||
self.config = devede.configuration_data.configuration.get_config()
|
||||
|
||||
def create_iso (self, path, name):
|
||||
|
||||
filesystem_path = os.path.join(path,name)
|
||||
final_path = os.path.join(path,name+".iso")
|
||||
|
||||
self.command_var=[]
|
||||
self.command_var.append("mkisofs")
|
||||
self.command_var.append("-dvd-video")
|
||||
self.command_var.append("-V")
|
||||
self.command_var.append("DVDVIDEO")
|
||||
self.command_var.append("-v")
|
||||
self.command_var.append("-udf")
|
||||
self.command_var.append("-o")
|
||||
self.command_var.append(final_path)
|
||||
self.command_var.append(filesystem_path)
|
||||
self.text = _("Creating ISO image")
|
||||
|
||||
|
||||
def process_stdout(self,data):
|
||||
return
|
||||
|
||||
def process_stderr(self,data):
|
||||
|
||||
if (data[0].find("% done") == -1):
|
||||
return
|
||||
|
||||
l = data[0].split("%")
|
||||
p = float(l[0])
|
||||
self.progress_bar[1].set_fraction(p)
|
||||
self.progress_bar[1].set_text("%.1f%%" % (p))
|
||||
|
||||
return
|
||||
|
|
@ -27,6 +27,7 @@ import devede.create_disk_window
|
|||
import devede.runner
|
||||
import devede.settings
|
||||
import devede.dvdauthor_converter
|
||||
import devede.mkisofs
|
||||
|
||||
class devede_project:
|
||||
|
||||
|
|
@ -298,6 +299,10 @@ class devede_project:
|
|||
for element in final_dependencies:
|
||||
dvdauthor.add_dependency(element)
|
||||
run_window.add_process(dvdauthor)
|
||||
isocreator = devede.mkisofs.mkisofs()
|
||||
isocreator.create_iso(data.path, data.name)
|
||||
isocreator.add_dependency(dvdauthor)
|
||||
run_window.add_process(isocreator)
|
||||
|
||||
run_window.connect("done",self.disc_done)
|
||||
self.wmain_window.hide()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue