Fixed HDHR

Changed URLs so they would properly work as a HDHR device.
This commit is contained in:
Dispatcharr 2025-03-06 18:43:14 -06:00
parent 01f5b99f72
commit e305f1cba0
3 changed files with 10 additions and 2 deletions

View file

@ -81,7 +81,7 @@ class LineupAPIView(APIView):
{
"GuideNumber": str(ch.channel_number),
"GuideName": ch.channel_name,
"URL": request.build_absolute_uri(f"/player/stream/{ch.id}")
"URL": request.build_absolute_uri(f"/output/stream/{ch.id}")
}
for ch in channels
]

View file

@ -81,7 +81,7 @@ class LineupAPIView(APIView):
{
"GuideNumber": str(ch.channel_number),
"GuideName": ch.channel_name,
"URL": request.build_absolute_uri(f"/player/stream/{ch.id}")
"URL": request.build_absolute_uri(f"/output/stream/{ch.id}")
}
for ch in channels
]

View file

@ -7,6 +7,8 @@ from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
from .routing import websocket_urlpatterns
from apps.hdhr.api_views import HDHRDeviceViewSet, DiscoverAPIView, LineupAPIView, LineupStatusAPIView, HDHRDeviceXMLAPIView, hdhr_dashboard_view
# Define schema_view for Swagger
schema_view = get_schema_view(
@ -39,6 +41,12 @@ urlpatterns = [
path('hdhr', RedirectView.as_view(url='/hdhr/', permanent=True)), # This fixes the issue
path('hdhr/', include(('apps.hdhr.urls', 'hdhr'), namespace='hdhr')),
path('discover.json', DiscoverAPIView.as_view(), name='discover'),
path('lineup.json', LineupAPIView.as_view(), name='lineup'),
path('lineup_status.json', LineupStatusAPIView.as_view(), name='lineup_status'),
path('device.xml', HDHRDeviceXMLAPIView.as_view(), name='device_xml'),
# Swagger UI
path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),