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

Function decrement_stream_count

apps/channels/utils.py:34–44  ·  view source on GitHub ↗
(account)

Source from the content-addressed store, hash-verified

32 account.save(update_fields=['active_streams'])
33
34def decrement_stream_count(account):
35 with lock:
36 current_usage = active_streams_map.get(account.id, 0)
37 if current_usage > 0:
38 current_usage -= 1
39 if current_usage == 0:
40 del active_streams_map[account.id]
41 else:
42 active_streams_map[account.id] = current_usage
43 account.active_streams = current_usage
44 account.save(update_fields=['active_streams'])
45
46
47def auto_apply_epg_logos_enabled(custom_properties):

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected