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

Method _parse_output_key

apps/proxy/live_proxy/server.py:1234–1247  ·  view source on GitHub ↗

Split a compound output manager key into (base_format, profile_id). 'fmp4' -> ('fmp4', None) 'fmp4:p1' -> ('fmp4', 1) 'hls:p3' -> ('hls', 3)

(fmt)

Source from the content-addressed store, hash-verified

1232
1233 @staticmethod
1234 def _parse_output_key(fmt):
1235 """
1236 Split a compound output manager key into (base_format, profile_id).
1237 'fmp4' -> ('fmp4', None)
1238 'fmp4:p1' -> ('fmp4', 1)
1239 'hls:p3' -> ('hls', 3)
1240 """
1241 if ':p' in fmt:
1242 base, _, suffix = fmt.rpartition(':p')
1243 try:
1244 return base, int(suffix)
1245 except ValueError:
1246 pass
1247 return fmt, None
1248
1249 def stop_output_format(self, channel_id, fmt):
1250 """Stop and remove a specific output format manager for this channel."""

Callers 1

ensure_output_formatMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected