| 1 |
#!/usr/bin/env python3 |
| 2 |
|
| 3 |
# Copyright 2014 (C) Raster Software Vigo (Sergio Costas) |
| 4 |
# |
| 5 |
# This file is part of DeVeDe-NG |
| 6 |
# |
| 7 |
# DeVeDe-NG is free software; you can redistribute it and/or modify |
| 8 |
# it under the terms of the GNU General Public License version 3 |
| 9 |
# as published by the Free Software Foundation. |
| 10 |
# |
| 11 |
# DeVeDe-NG is distributed in the hope that it will be useful, |
| 12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
# GNU General Public License for more details. |
| 15 |
# |
| 16 |
# You should have received a copy of the GNU General Public License |
| 17 |
# along with this program. If not, see <http://www.gnu.org/licenses/> |
| 18 |
|
| 19 |
import os |
| 20 |
import devedeng.configuration_data |
| 21 |
import devedeng.executor |
| 22 |
|
| 23 |
|
| 24 |
class vcdimager_converter(devedeng.executor.executor): |
| 25 |
|
| 26 |
def __init__(self): |
| 27 |
|
| 28 |
devedeng.executor.executor.__init__(self) |
| 29 |
self.config = devedeng.configuration_data.configuration.get_config() |
| 30 |
|
| 31 |
def create_cd_project(self, path, name, file_movies): |
| 32 |
|
| 33 |
self.command_var = [] |
| 34 |
self.command_var.append("vcdimager") |
| 35 |
self.command_var.append("-c") |
| 36 |
self.command_var.append(os.path.join(path, name + ".cue")) |
| 37 |
self.command_var.append("-b") |
| 38 |
self.command_var.append(os.path.join(path, name + ".bin")) |
| 39 |
self.command_var.append("-t") |
| 40 |
if self.config.disc_type == "vcd": |
| 41 |
self.command_var.append("vcd2") |
| 42 |
else: |
| 43 |
self.command_var.append("svcd") |
| 44 |
for element in file_movies: |
| 45 |
if element.element_type != "file_movie": |
| 46 |
continue |
| 47 |
self.command_var.append(element.converted_filename) |
| 48 |
self.text = _("Creating CD image") |
| 49 |
|
| 50 |
def process_stdout(self, data): |
| 51 |
print("Stdout: " + str(data)) |
| 52 |
return |
| 53 |
|
| 54 |
def process_stderr(self, data): |
| 55 |
print("Stderr: " + str(data)) |
| 56 |
return |