remove debugging /streams endpoint
This commit is contained in:
parent
e2663f6d57
commit
8107e97304
1 changed files with 0 additions and 10 deletions
|
@ -273,7 +273,6 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||||
app = web.Application()
|
app = web.Application()
|
||||||
app.router.add_get('/lbryapi', self.handle_old_jsonrpc)
|
app.router.add_get('/lbryapi', self.handle_old_jsonrpc)
|
||||||
app.router.add_post('/lbryapi', self.handle_old_jsonrpc)
|
app.router.add_post('/lbryapi', self.handle_old_jsonrpc)
|
||||||
app.router.add_get('/streams', self.handle_streams_index)
|
|
||||||
app.router.add_get('/get/{claim_name}', self.handle_stream_get_request)
|
app.router.add_get('/get/{claim_name}', self.handle_stream_get_request)
|
||||||
app.router.add_get('/get/{claim_name}/{claim_id}', self.handle_stream_get_request)
|
app.router.add_get('/get/{claim_name}/{claim_id}', self.handle_stream_get_request)
|
||||||
app.router.add_get('/stream/{sd_hash}', self.handle_stream_range_request)
|
app.router.add_get('/stream/{sd_hash}', self.handle_stream_range_request)
|
||||||
|
@ -457,15 +456,6 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||||
content_type='application/json'
|
content_type='application/json'
|
||||||
)
|
)
|
||||||
|
|
||||||
async def handle_streams_index(self, request: web.Request):
|
|
||||||
return web.Response(
|
|
||||||
body="<ul>" + "".join([
|
|
||||||
f'<li><a href="/stream/{sd_hash}">lbry://{stream.claim_name}</a></li>'
|
|
||||||
for sd_hash, stream in self.stream_manager.streams.items()
|
|
||||||
]) + "</ul>",
|
|
||||||
content_type='text/html'
|
|
||||||
)
|
|
||||||
|
|
||||||
async def handle_stream_get_request(self, request: web.Request):
|
async def handle_stream_get_request(self, request: web.Request):
|
||||||
name_and_claim_id = request.path.split("/get/")[1]
|
name_and_claim_id = request.path.split("/get/")[1]
|
||||||
if "/" not in name_and_claim_id:
|
if "/" not in name_and_claim_id:
|
||||||
|
|
Loading…
Add table
Reference in a new issue