Reduce debug message that were flooding the bus

parent 1e837e54
...@@ -3215,19 +3215,12 @@ class QtVideoPlayer(QObject): ...@@ -3215,19 +3215,12 @@ class QtVideoPlayer(QObject):
def _on_position_changed(self, position: int, duration: int): def _on_position_changed(self, position: int, duration: int):
"""Handle position changes from player window""" """Handle position changes from player window"""
try: try:
# Send progress update via message bus # Progress updates are now handled by the throttled periodic _send_progress_update method
if duration > 0: # to prevent flooding the message bus with VIDEO_PROGRESS messages
percentage = (position / duration) * 100 pass
progress_message = MessageBuilder.video_progress(
sender=self.name,
position=position / 1000.0, # Convert to seconds
duration=duration / 1000.0, # Convert to seconds
percentage=percentage
)
self.message_bus.publish(progress_message, broadcast=True)
except Exception as e: except Exception as e:
logger.error(f"Failed to send progress update: {e}") logger.error(f"Failed to handle position change: {e}")
def _on_video_loaded(self, file_path: str): def _on_video_loaded(self, file_path: str):
"""Handle video loaded event""" """Handle video loaded event"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment