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

Method create

core/api_views.py:144–160  ·  view source on GitHub ↗
(self, request, *args, **kwargs)

Source from the content-addressed store, hash-verified

142 return response
143
144 def create(self, request, *args, **kwargs):
145 response = super().create(request, *args, **kwargs)
146 # If creating DVR settings with offset values, reschedule upcoming recordings
147 try:
148 key = request.data.get("key")
149 if key == DVR_SETTINGS_KEY:
150 value = request.data.get("value", {})
151 if isinstance(value, dict) and ("pre_offset_minutes" in value or "post_offset_minutes" in value):
152 try:
153 from apps.channels.tasks import reschedule_upcoming_recordings_for_offset_change
154 reschedule_upcoming_recordings_for_offset_change.delay()
155 except Exception:
156 from apps.channels.tasks import reschedule_upcoming_recordings_for_offset_change_impl
157 reschedule_upcoming_recordings_for_offset_change_impl()
158 except Exception:
159 pass
160 return response
161 @action(detail=False, methods=["post"], url_path="check")
162 def check(self, request, *args, **kwargs):
163 data = request.data

Callers 15

log_system_eventFunction · 0.45
add_vlc_profileFunction · 0.45
preload_core_settingsFunction · 0.45
preload_user_agentFunction · 0.45
preload_core_settingsFunction · 0.45
preload_core_settingsFunction · 0.45
lock_or_create_profilesFunction · 0.45
preload_stream_profilesFunction · 0.45
preload_core_settingsFunction · 0.45