| 1 |
# Copyright 2014 (C) Raster Software Vigo (Sergio Costas) |
| 2 |
# |
| 3 |
# This file is part of DeVeDe-NG |
| 4 |
# |
| 5 |
# DeVeDe-NG is free software; you can redistribute it and/or modify |
| 6 |
# it under the terms of the GNU General Public License version 3 |
| 7 |
# as published by the Free Software Foundation. |
| 8 |
# |
| 9 |
# DeVeDe-NG is distributed in the hope that it will be useful, |
| 10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
# GNU General Public License for more details. |
| 13 |
# |
| 14 |
# You should have received a copy of the GNU General Public License |
| 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/> |
| 16 |
|
| 17 |
import subprocess |
| 18 |
import devedeng.configuration_data |
| 19 |
import devedeng.executor |
| 20 |
|
| 21 |
|
| 22 |
class k3b(devedeng.executor.executor): |
| 23 |
|
| 24 |
supports_analize = False |
| 25 |
supports_play = False |
| 26 |
supports_convert = False |
| 27 |
supports_menu = False |
| 28 |
supports_mkiso = False |
| 29 |
supports_burn = True |
| 30 |
display_name = "K3B" |
| 31 |
|
| 32 |
@staticmethod |
| 33 |
def check_is_installed(): |
| 34 |
try: |
| 35 |
handle = subprocess.Popen( |
| 36 |
["k3b", "--help"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 37 |
(stdout, stderr) = handle.communicate() |
| 38 |
if 0 == handle.wait(): |
| 39 |
return True |
| 40 |
else: |
| 41 |
return False |
| 42 |
except: |
| 43 |
return False |
| 44 |
|
| 45 |
def __init__(self): |
| 46 |
|
| 47 |
devedeng.executor.executor.__init__(self) |
| 48 |
self.config = devedeng.configuration_data.configuration.get_config() |
| 49 |
|
| 50 |
def burn(self, file_name): |
| 51 |
|
| 52 |
self.command_var = ["k3b", file_name] |
| 53 |
|
| 54 |
def process_stdout(self, data): |
| 55 |
return |
| 56 |
|
| 57 |
def process_stderr(self, data): |
| 58 |
return |