mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-08-03 07:12:30 +00:00
Updated HDHR to use proxy
This commit is contained in:
parent
87fa1b4ed2
commit
106999d32d
2 changed files with 6 additions and 6 deletions
|
|
@ -39,7 +39,7 @@ class DiscoverAPIView(APIView):
|
|||
responses={200: openapi.Response("HDHR Discovery JSON")}
|
||||
)
|
||||
def get(self, request):
|
||||
base_url = request.build_absolute_uri('/hdhr/').rstrip('/')
|
||||
base_url = request.build_absolute_uri('/').rstrip('/')
|
||||
device = HDHRDevice.objects.first()
|
||||
|
||||
if not device:
|
||||
|
|
@ -81,7 +81,7 @@ class LineupAPIView(APIView):
|
|||
{
|
||||
"GuideNumber": str(ch.channel_number),
|
||||
"GuideName": ch.name,
|
||||
"URL": request.build_absolute_uri(f"/output/stream/{ch.id}")
|
||||
"URL": request.build_absolute_uri(f"/proxy/ts/stream/{ch.uuid}")
|
||||
}
|
||||
for ch in channels
|
||||
]
|
||||
|
|
@ -115,7 +115,7 @@ class HDHRDeviceXMLAPIView(APIView):
|
|||
responses={200: openapi.Response("HDHR Device XML")}
|
||||
)
|
||||
def get(self, request):
|
||||
base_url = request.build_absolute_uri('/hdhr/').rstrip('/')
|
||||
base_url = request.build_absolute_uri('/').rstrip('/')
|
||||
|
||||
xml_response = f"""<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class DiscoverAPIView(APIView):
|
|||
responses={200: openapi.Response("HDHR Discovery JSON")}
|
||||
)
|
||||
def get(self, request):
|
||||
base_url = request.build_absolute_uri('/hdhr/').rstrip('/')
|
||||
base_url = request.build_absolute_uri('/').rstrip('/')
|
||||
device = HDHRDevice.objects.first()
|
||||
|
||||
if not device:
|
||||
|
|
@ -81,7 +81,7 @@ class LineupAPIView(APIView):
|
|||
{
|
||||
"GuideNumber": str(ch.channel_number),
|
||||
"GuideName": ch.name,
|
||||
"URL": request.build_absolute_uri(f"/output/stream/{ch.id}")
|
||||
"URL": request.build_absolute_uri(f"/proxy/ts/stream/{ch.uuid}")
|
||||
}
|
||||
for ch in channels
|
||||
]
|
||||
|
|
@ -115,7 +115,7 @@ class HDHRDeviceXMLAPIView(APIView):
|
|||
responses={200: openapi.Response("HDHR Device XML")}
|
||||
)
|
||||
def get(self, request):
|
||||
base_url = request.build_absolute_uri('/hdhr/').rstrip('/')
|
||||
base_url = request.build_absolute_uri('/').rstrip('/')
|
||||
|
||||
xml_response = f"""<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue