MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / stop_output_profile

Method stop_output_profile

apps/proxy/live_proxy/server.py:1405–1426  ·  view source on GitHub ↗

Stop a profile transcode manager and remove its buffer.

(self, channel_id, profile_id)

Source from the content-addressed store, hash-verified

1403 return False
1404
1405 def stop_output_profile(self, channel_id, profile_id):
1406 """Stop a profile transcode manager and remove its buffer."""
1407 logger.debug(f"[Profile:{profile_id}:{channel_id[:8]}] stop_output_profile() called")
1408 channel_managers = self.profile_managers.get(channel_id, {})
1409 manager = channel_managers.pop(profile_id, None)
1410 if not channel_managers:
1411 self.profile_managers.pop(channel_id, None)
1412
1413 self.profile_buffers.get(channel_id, {}).pop(profile_id, None)
1414 if not self.profile_buffers.get(channel_id):
1415 self.profile_buffers.pop(channel_id, None)
1416
1417 if manager:
1418 try:
1419 manager.stop()
1420 logger.info(
1421 f"[Profile:{profile_id}:{channel_id[:8]}] Transcode stopped"
1422 )
1423 except Exception as e:
1424 logger.error(
1425 f"[Profile:{profile_id}:{channel_id[:8]}] Error stopping: {e}"
1426 )
1427
1428 def stop_all_output_profiles(self, channel_id):
1429 """Stop all profile transcode managers for a channel."""

Callers 3

cleanup_taskMethod · 0.95

Calls 2

getMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected