Reduce debug message that were flooding the bus

parent 1e837e54
......@@ -3215,19 +3215,12 @@ class QtVideoPlayer(QObject):
def _on_position_changed(self, position: int, duration: int):
"""Handle position changes from player window"""
try:
# Send progress update via message bus
if duration > 0:
percentage = (position / duration) * 100
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)
# Progress updates are now handled by the throttled periodic _send_progress_update method
# to prevent flooding the message bus with VIDEO_PROGRESS messages
pass
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):
"""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