Merge branch 'dev' of https://github.com/Dispatcharr/Dispatcharr into pr/sethwv/757

This commit is contained in:
SergeantPanda 2025-12-24 16:04:04 -06:00
commit 31b9868bfd
35 changed files with 1808 additions and 775 deletions

View file

@ -142,8 +142,12 @@ class CoreSettingsViewSet(viewsets.ModelViewSet):
},
status=status.HTTP_200_OK,
)
return Response(in_network, status=status.HTTP_200_OK)
response_data = {
**in_network,
"client_ip": str(client_ip)
}
return Response(response_data, status=status.HTTP_200_OK)
return Response({}, status=status.HTTP_200_OK)

View file

@ -513,7 +513,8 @@ def rehash_streams(keys):
for obj in batch:
# Generate new hash
new_hash = Stream.generate_hash_key(obj.name, obj.url, obj.tvg_id, keys, m3u_id=obj.m3u_account_id)
group_name = obj.channel_group.name if obj.channel_group else None
new_hash = Stream.generate_hash_key(obj.name, obj.url, obj.tvg_id, keys, m3u_id=obj.m3u_account_id, group=group_name)
# Check if this hash already exists in our tracking dict or in database
if new_hash in hash_keys:

View file

@ -37,7 +37,9 @@ def stream_view(request, channel_uuid):
"""
try:
redis_host = getattr(settings, "REDIS_HOST", "localhost")
redis_client = redis.Redis(host=settings.REDIS_HOST, port=6379, db=int(getattr(settings, "REDIS_DB", "0")))
redis_port = int(getattr(settings, "REDIS_PORT", 6379))
redis_db = int(getattr(settings, "REDIS_DB", "0"))
redis_client = redis.Redis(host=redis_host, port=redis_port, db=redis_db)
# Retrieve the channel by the provided stream_id.
channel = Channel.objects.get(uuid=channel_uuid)