#155 Update example(s)
This commit is contained in:
parent
dc90219442
commit
3d04f359d0
|
@ -124,7 +124,7 @@ def play(track_id_str: str):
|
||||||
stderr=subprocess.DEVNULL,
|
stderr=subprocess.DEVNULL,
|
||||||
)
|
)
|
||||||
while True:
|
while True:
|
||||||
byte = stream.input_stream.stream().read()
|
byte = stream.input_stream.stream().read(1)
|
||||||
if byte == -1:
|
if byte == -1:
|
||||||
return
|
return
|
||||||
ffplay.stdin.write(bytes([byte]))
|
ffplay.stdin.write(bytes([byte]))
|
||||||
|
|
|
@ -110,7 +110,7 @@ def response(client: socket.socket, uri: str, header: dict,
|
||||||
if (stream.input_stream.stream().pos() >=
|
if (stream.input_stream.stream().pos() >=
|
||||||
stream.input_stream.stream().size()):
|
stream.input_stream.stream().size()):
|
||||||
break
|
break
|
||||||
byte = stream.input_stream.stream().read()
|
byte = stream.input_stream.stream().read(1)
|
||||||
client.send(bytes([byte]))
|
client.send(bytes([byte]))
|
||||||
return "", [], b"", True
|
return "", [], b"", True
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue