mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Removed HDHR from root url
This commit is contained in:
parent
3c8971d792
commit
aa6cbf3b65
4 changed files with 5 additions and 13 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('/').rstrip('/')
|
||||
base_url = request.build_absolute_uri('/hdhr/').rstrip('/')
|
||||
device = HDHRDevice.objects.first()
|
||||
|
||||
if not device:
|
||||
|
|
@ -115,7 +115,7 @@ class HDHRDeviceXMLAPIView(APIView):
|
|||
responses={200: openapi.Response("HDHR Device XML")}
|
||||
)
|
||||
def get(self, request):
|
||||
base_url = request.build_absolute_uri('/').rstrip('/')
|
||||
base_url = request.build_absolute_uri('/hdhr/').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('/').rstrip('/')
|
||||
base_url = request.build_absolute_uri('/hdhr/').rstrip('/')
|
||||
device = HDHRDevice.objects.first()
|
||||
|
||||
if not device:
|
||||
|
|
@ -115,7 +115,7 @@ class HDHRDeviceXMLAPIView(APIView):
|
|||
responses={200: openapi.Response("HDHR Device XML")}
|
||||
)
|
||||
def get(self, request):
|
||||
base_url = request.build_absolute_uri('/').rstrip('/')
|
||||
base_url = request.build_absolute_uri('/hdhr/').rstrip('/')
|
||||
|
||||
xml_response = f"""<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ def refresh_single_m3u_account(account_id):
|
|||
return err_msg
|
||||
|
||||
headers = {"User-Agent": account.user_agent.user_agent}
|
||||
response = requests.get(account.server_url, timeout=60, headers=headers)
|
||||
response = requests.get(account.server_url, headers=headers)
|
||||
response.raise_for_status()
|
||||
lines = response.text.splitlines()
|
||||
elif account.uploaded_file:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ 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
|
||||
|
|
@ -45,13 +44,6 @@ urlpatterns = [
|
|||
path('proxy/', include(('apps.proxy.urls', 'proxy'), namespace='proxy')),
|
||||
path('proxy', RedirectView.as_view(url='/proxy/', permanent=True)),
|
||||
|
||||
# HDHR API
|
||||
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'),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue