mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-30 13:30:05 +00:00
Add tvc-guide-id (gracenote ID) to channel when using bulk creation.
This commit is contained in:
parent
500e0941e2
commit
5cae2e595e
1 changed files with 5 additions and 0 deletions
|
|
@ -427,6 +427,10 @@ class ChannelViewSet(viewsets.ModelViewSet):
|
|||
channel_number = float(stream_custom_props['tvg-chno'])
|
||||
elif 'channel-number' in stream_custom_props:
|
||||
channel_number = float(stream_custom_props['channel-number'])
|
||||
# Get the tvc_guide_stationid from custom properties if it exists
|
||||
tvc_guide_stationid = None
|
||||
if 'tvc-guide-stationid' in stream_custom_props:
|
||||
tvc_guide_stationid = stream_custom_props['tvc-guide-stationid']
|
||||
|
||||
# Determine channel number: if provided, use it (if free); else auto assign.
|
||||
if channel_number is None:
|
||||
|
|
@ -447,6 +451,7 @@ class ChannelViewSet(viewsets.ModelViewSet):
|
|||
channel_data = {
|
||||
"channel_number": channel_number,
|
||||
"name": name,
|
||||
'tvc_guide_stationid': tvc_guide_stationid,
|
||||
"tvg_id": stream.tvg_id,
|
||||
"channel_group_id": channel_group.id,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue