diff --git a/app/class_file_convert.py b/app/class_file_convert.py index efd8a17..31ce993 100755 --- a/app/class_file_convert.py +++ b/app/class_file_convert.py @@ -27,6 +27,8 @@ class Convert: self.active_tasks.add(obj) logging.info(f"Warteschlange started Auftrag - {obj.task}") obj.status = 3 + await self.obj_websocket.send_websocket(self.obj_path.active_path_to_dict()) + await self.obj_websocket.send_websocket(self.obj_path.queue_path_to_dict()) if len(self.active_tasks) >= self.yaml["task_max"]: break @@ -43,7 +45,6 @@ class Convert: async def convert_video(self, obj): """Startet die Videokonvertierung asynchron.""" - obj_process = Process(self.obj_websocket) obj_stat = Stat() @@ -63,13 +64,11 @@ class Convert: self.active_process.add(obj) obj.process_start = time.time() - await self.obj_websocket.send_websocket(self.obj_path.active_path_to_dict()) - await self.obj_websocket.send_websocket(self.obj_path.queue_path_to_dict()) await obj_process.read_out(obj) await obj.process.wait() - # Prself.obj_websocket.send_websocket(self.obj_path.active_path_to_dict())ozess beendet, Status auswerten + # Prozess beendet, Status auswerten if obj.process.returncode == 0: obj.status = 0 result = "Finished" diff --git a/client/media_conversion.js b/client/media_conversion.js index 82f7e70..6ef585a 100755 --- a/client/media_conversion.js +++ b/client/media_conversion.js @@ -78,7 +78,7 @@ function sendCommand(command, id){ function deleteVideoElement(packet) { for (let key in videoActive){ if (!(key in packet.data_convert)){ - const elem = document.getElementById(key); + const elem = document.getElementById(`convert_${key}`); if(elem){ elem.remove(); } @@ -97,7 +97,7 @@ function createVideoElement(packet){ if(!videoActive[key]){ const card = document.createElement('div'); card.className = 'video-card'; - card.id = key + card.id = `convert_${key}` card.innerHTML = `