fix proxychains ffprobe
This commit is contained in:
parent
0627cb817f
commit
f9d9dc2eb9
@ -113,7 +113,8 @@ class Audio(discord.AudioSource):
|
||||
if url in self._durations:
|
||||
return
|
||||
self._durations.setdefault(url, "")
|
||||
args = []
|
||||
internal = url.startswith("http://adaas:5000/cachedx/")
|
||||
args = [] if internal else ["proxychains"]
|
||||
args += [
|
||||
"ffprobe",
|
||||
*("-i", url),
|
||||
@ -129,6 +130,8 @@ class Audio(discord.AudioSource):
|
||||
pass
|
||||
else:
|
||||
assert ap.stdout is not None
|
||||
if not internal:
|
||||
await ap.stdout.readline()
|
||||
self._durations[url] = (
|
||||
(await ap.stdout.read()).decode().strip().split(".")[0]
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user